diff options
author | Liu Ying <gnuiyl@gmail.com> | 2016-10-10 02:50:06 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-10-18 05:02:10 -0400 |
commit | 43daa01323da37a3692cabe1579ef5c2c4372e06 (patch) | |
tree | 009cca999fd1d79c388b9f7e035dbf9a5674d24b | |
parent | 4ad3e92c28057950c30ca19e32530eff9ee111bb (diff) |
drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modeset
We added active plane reconfiguration support by forcing a full modeset
operation. So, looking at old_plane_state->fb to determine whether we need to
switch EBA buffer(for hardware double buffering) in ipu_plane_atomic_set_base()
or not is no more correct. Instead, we should do that only when we don't need
modeset, otherwise, we initialize the two EBA buffers with the buffer address.
Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support")
Cc: stable@vger.kernel.org # 4.8
Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r-- | drivers/gpu/drm/imx/ipuv3-plane.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index ce22d0a0ddc8..f5861d9b0df7 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c | |||
@@ -108,6 +108,7 @@ static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane, | |||
108 | { | 108 | { |
109 | struct drm_plane *plane = &ipu_plane->base; | 109 | struct drm_plane *plane = &ipu_plane->base; |
110 | struct drm_plane_state *state = plane->state; | 110 | struct drm_plane_state *state = plane->state; |
111 | struct drm_crtc_state *crtc_state = state->crtc->state; | ||
111 | struct drm_framebuffer *fb = state->fb; | 112 | struct drm_framebuffer *fb = state->fb; |
112 | unsigned long eba, ubo, vbo; | 113 | unsigned long eba, ubo, vbo; |
113 | int active; | 114 | int active; |
@@ -149,7 +150,7 @@ static void ipu_plane_atomic_set_base(struct ipu_plane *ipu_plane, | |||
149 | break; | 150 | break; |
150 | } | 151 | } |
151 | 152 | ||
152 | if (old_state->fb) { | 153 | if (!drm_atomic_crtc_needs_modeset(crtc_state)) { |
153 | active = ipu_idmac_get_current_buffer(ipu_plane->ipu_ch); | 154 | active = ipu_idmac_get_current_buffer(ipu_plane->ipu_ch); |
154 | ipu_cpmem_set_buffer(ipu_plane->ipu_ch, !active, eba); | 155 | ipu_cpmem_set_buffer(ipu_plane->ipu_ch, !active, eba); |
155 | ipu_idmac_select_buffer(ipu_plane->ipu_ch, !active); | 156 | ipu_idmac_select_buffer(ipu_plane->ipu_ch, !active); |