All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/exynos: Fix FIMD buffer size calculation
@ 2015-04-08 15:39 Daniel Stone
  2015-04-08 17:00 ` Gustavo Padovan
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Stone @ 2015-04-08 15:39 UTC (permalink / raw)
  To: inki.dae; +Cc: gustavo.padovan, dri-devel

Commit adacb228d72b ("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: Daniel Stone <daniels@collabora.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 7964b278eefb..90111b87c963 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -662,7 +662,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));
 
@@ -672,7 +672,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) |
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] drm/exynos: Fix FIMD buffer size calculation
  2015-04-08 15:39 [PATCH 1/1] drm/exynos: Fix FIMD buffer size calculation Daniel Stone
@ 2015-04-08 17:00 ` Gustavo Padovan
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2015-04-08 17:00 UTC (permalink / raw)
  To: Daniel Stone; +Cc: gustavo.padovan, dri-devel

2015-04-08 Daniel Stone <daniels@collabora.com>:

> Commit adacb228d72b ("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: Daniel Stone <daniels@collabora.com>
> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

	Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-08 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 15:39 [PATCH 1/1] drm/exynos: Fix FIMD buffer size calculation Daniel Stone
2015-04-08 17:00 ` Gustavo Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.