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

Commit 68a29134 authored by Daniel Stone's avatar Daniel Stone Committed by Inki Dae
Browse files

drm/exynos: Fix FIMD buffer size calculation



Commit adacb228 ("drm: Exynos: Respect framebuffer pitch for
FIMD/Mixer") fixed the buffer size calculation by using the FB
pitch value but later commit 26b9c2813ede1 ("drm/exynos: remove
struct *_win_data abstraction on planes") added a regression so
fix the buffer size calculation again.

Tested on Chromebook Snow / Peach Pit.

Fixes: 26b9c2813ede1 ("drm/exynos: remove struct *_win_data abstraction on planes")
Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
Tested-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 1c363c7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -663,7 +663,7 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
	writel(val, ctx->regs + VIDWx_BUF_START(win, 0));

	/* buffer end address */
	size = plane->pitch * plane->crtc_height * (plane->bpp >> 3);
	size = plane->pitch * plane->crtc_height;
	val = (unsigned long)(dma_addr + size);
	writel(val, ctx->regs + VIDWx_BUF_END(win, 0));

@@ -673,7 +673,7 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
			plane->crtc_width, plane->crtc_height);

	/* buffer size */
	buf_offsize = (plane->fb_width - plane->crtc_width) * (plane->bpp >> 3);
	buf_offsize = plane->pitch - (plane->crtc_width * (plane->bpp >> 3));
	line_size = plane->crtc_width * (plane->bpp >> 3);
	val = VIDW_BUF_SIZE_OFFSET(buf_offsize) |
		VIDW_BUF_SIZE_PAGEWIDTH(line_size) |