mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
drm/bridge: analogix_dp: mv mode_set to bridge .atomic_pre_enable
Change-Id: I4cabcb05cb1d67df6280f601ec1c920cb42bb6ce Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This commit is contained in:
@@ -52,6 +52,9 @@ struct bridge_init {
|
||||
struct device_node *node;
|
||||
};
|
||||
|
||||
static void analogix_dp_bridge_mode_set(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *adj_mode);
|
||||
|
||||
static bool analogix_dp_bandwidth_ok(struct analogix_dp_device *dp,
|
||||
const struct drm_display_mode *mode,
|
||||
unsigned int rate, unsigned int lanes)
|
||||
@@ -1575,13 +1578,17 @@ analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge,
|
||||
struct drm_atomic_state *old_state = old_bridge_state->base.state;
|
||||
struct analogix_dp_device *dp = bridge->driver_private;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
|
||||
|
||||
crtc = analogix_dp_get_new_crtc(dp, old_state);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(old_state, crtc);
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(old_state, crtc);
|
||||
analogix_dp_bridge_mode_set(bridge, &new_crtc_state->adjusted_mode);
|
||||
|
||||
/* Don't touch the panel if we're coming back from PSR */
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
return;
|
||||
@@ -1790,7 +1797,6 @@ analogix_dp_bridge_atomic_post_disable(struct drm_bridge *bridge,
|
||||
}
|
||||
|
||||
static void analogix_dp_bridge_mode_set(struct drm_bridge *bridge,
|
||||
const struct drm_display_mode *orig_mode,
|
||||
const struct drm_display_mode *adj_mode)
|
||||
{
|
||||
struct analogix_dp_device *dp = bridge->driver_private;
|
||||
@@ -1934,7 +1940,6 @@ static const struct drm_bridge_funcs analogix_dp_bridge_funcs = {
|
||||
.atomic_enable = analogix_dp_bridge_atomic_enable,
|
||||
.atomic_disable = analogix_dp_bridge_atomic_disable,
|
||||
.atomic_post_disable = analogix_dp_bridge_atomic_post_disable,
|
||||
.mode_set = analogix_dp_bridge_mode_set,
|
||||
.attach = analogix_dp_bridge_attach,
|
||||
.detach = analogix_dp_bridge_detach,
|
||||
.mode_valid = analogix_dp_bridge_mode_valid,
|
||||
|
||||
Reference in New Issue
Block a user