diff options
author | Rob Clark <robdclark@gmail.com> | 2016-11-05 00:12:44 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-11-27 19:23:13 +0300 |
commit | f5903bad80fe94ee92ba1ff93b4761790846a39e (patch) | |
tree | 43ddeca08036bd5b42b82bdb9fba2aca7828a9d6 /drivers/gpu/drm/msm | |
parent | 6ff3ddca2a69add204d0168787213eaec1411868 (diff) | |
download | linux-f5903bad80fe94ee92ba1ff93b4761790846a39e.tar.xz |
drm/msm/mdp5: rip out mode_changed
It wasn't really doing the right thing if, for example, position or
height changed.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 20 |
2 files changed, 4 insertions, 21 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h index a2b60b18f502..d5e40afb3474 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h @@ -76,11 +76,6 @@ struct mdp5_plane_state { /* assigned by crtc blender */ enum mdp_mixer_stage_id stage; - /* some additional transactional status to help us know in the - * apply path whether we need to update SMP allocation, and - * whether current update is still pending: - */ - bool mode_changed : 1; bool pending : 1; }; #define to_mdp5_plane_state(x) \ diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c index 629ff7ab17e3..91b154703473 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c @@ -191,7 +191,6 @@ mdp5_plane_atomic_print_state(struct drm_printer *p, drm_printf(p, "\tzpos=%u\n", pstate->zpos); drm_printf(p, "\talpha=%u\n", pstate->alpha); drm_printf(p, "\tstage=%s\n", stage2name(pstate->stage)); - drm_printf(p, "\tmode_changed=%u\n", pstate->mode_changed); drm_printf(p, "\tpending=%u\n", pstate->pending); } @@ -233,7 +232,6 @@ mdp5_plane_duplicate_state(struct drm_plane *plane) if (mdp5_state && mdp5_state->base.fb) drm_framebuffer_reference(mdp5_state->base.fb); - mdp5_state->mode_changed = false; mdp5_state->pending = false; return &mdp5_state->base; @@ -291,7 +289,6 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *state) { struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); - struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state); struct drm_plane_state *old_state = plane->state; const struct mdp_format *format; bool vflip, hflip; @@ -354,10 +351,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane, struct drm_crtc_state *crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc); crtc_state->mode_changed = true; - mdp5_state->mode_changed = true; } - } else { - mdp5_state->mode_changed = true; } return 0; @@ -366,17 +360,16 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane, static void mdp5_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *old_state) { - struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); struct drm_plane_state *state = plane->state; struct mdp5_plane_state *mdp5_state = to_mdp5_plane_state(state); DBG("%s: update", plane->name); - if (!plane_enabled(state)) { - mdp5_state->pending = true; - } else if (mdp5_state->mode_changed) { + mdp5_state->pending = true; + + if (plane_enabled(state)) { int ret; - mdp5_state->pending = true; + ret = mdp5_plane_mode_set(plane, state->crtc, state->fb, state->crtc_x, state->crtc_y, @@ -385,11 +378,6 @@ static void mdp5_plane_atomic_update(struct drm_plane *plane, state->src_w, state->src_h); /* atomic_check should have ensured that this doesn't fail */ WARN_ON(ret < 0); - } else { - unsigned long flags; - spin_lock_irqsave(&mdp5_plane->pipe_lock, flags); - set_scanout_locked(plane, state->fb); - spin_unlock_irqrestore(&mdp5_plane->pipe_lock, flags); } } |