From: Philipp Zabel Date: Wed, 8 Oct 2014 15:19:13 +0000 (+0200) Subject: imx-drm: ipuv3-plane: move stride setting out of base setup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7cd9bebee609c4a2e382ad5089f1c24e6098f493;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git imx-drm: ipuv3-plane: move stride setting out of base setup Setting the stride can only be done on inactive channels, while the buffer base address can also be updated for running channels using the hardware double buffering feature. Signed-off-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c index 48cbeef73934..85f49e6fdee9 100644 --- a/drivers/staging/imx-drm/ipuv3-plane.c +++ b/drivers/staging/imx-drm/ipuv3-plane.c @@ -74,8 +74,6 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb, dev_dbg(ipu_plane->base.dev->dev, "phys = %pad, x = %d, y = %d", &cma_obj->paddr, x, y); - ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); - eba = cma_obj->paddr + fb->offsets[0] + fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x; ipu_cpmem_set_buffer(ipu_plane->ipu_ch, 0, eba); @@ -189,6 +187,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, return ret; } ipu_cpmem_set_high_priority(ipu_plane->ipu_ch); + ipu_cpmem_set_stride(ipu_plane->ipu_ch, fb->pitches[0]); ret = ipu_plane_set_base(ipu_plane, fb, src_x, src_y); if (ret < 0)