From: Philipp Zabel
Subject: [PATCH v2 2/4] imx-drm: ipuv3-plane: move stride setting out of base
setup
Date: Tue, 9 Sep 2014 13:36:55 +0200
Message-ID: <1410262617-1732-2-git-send-email-p.zabel@pengutronix.de>
References: <1410262617-1732-1-git-send-email-p.zabel@pengutronix.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Return-path:
In-Reply-To: <1410262617-1732-1-git-send-email-p.zabel@pengutronix.de>
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: driverdev-devel-bounces@linuxdriverproject.org
Sender: driverdev-devel-bounces@linuxdriverproject.org
To: Russell King
Cc: Fabio Estevam , devel@driverdev.osuosl.org, kernel@pengutronix.de, Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, Philipp Zabel
List-Id: dri-devel@lists.freedesktop.org
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
---
drivers/staging/imx-drm/ipuv3-plane.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c
index 43e36ea..9f79a17 100644
--- a/drivers/staging/imx-drm/ipuv3-plane.c
+++ b/drivers/staging/imx-drm/ipuv3-plane.c
@@ -76,8 +76,6 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb,
&cma_obj->paddr, x, y);
cpmem = ipu_get_cpmem(ipu_plane->ipu_ch);
- ipu_cpmem_set_stride(cpmem, fb->pitches[0]);
-
eba = cma_obj->paddr + fb->offsets[0] +
fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x;
ipu_cpmem_set_buffer(cpmem, 0, eba);
@@ -193,6 +191,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(cpmem, fb->pitches[0]);
ret = ipu_plane_set_base(ipu_plane, fb, src_x, src_y);
if (ret < 0)
--
2.1.0