Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee2e072e authored by Philipp Zabel's avatar Philipp Zabel Committed by Greg Kroah-Hartman
Browse files

staging: drm/imx: set second plane base address



Even though we do not enable the hardware double buffering feature
right now, set the second base address pointer (EBA1) as well to
increase robustness.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69ba8358
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb,
{
	struct ipu_ch_param __iomem *cpmem;
	struct drm_gem_cma_object *cma_obj;
	unsigned long eba;

	cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
	if (!cma_obj) {
@@ -76,8 +77,10 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb,

	cpmem = ipu_get_cpmem(ipu_plane->ipu_ch);
	ipu_cpmem_set_stride(cpmem, fb->pitches[0]);
	ipu_cpmem_set_buffer(cpmem, 0, cma_obj->paddr + fb->offsets[0] +
			     fb->pitches[0] * y + x);

	eba = cma_obj->paddr + fb->offsets[0] + fb->pitches[0] * y + x;
	ipu_cpmem_set_buffer(cpmem, 0, eba);
	ipu_cpmem_set_buffer(cpmem, 1, eba);

	return 0;
}