aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2015-04-08 11:39:06 -0400
committerInki Dae <inki.dae@samsung.com>2015-04-12 22:48:20 -0400
commit68a2913407d8defac36f381e4877507a06e57c8e (patch)
tree2a88deddc2c1b742537f0eeff79be89967fa8614 /drivers/gpu
parent1c363c7cccf64128087002b0779986ad16aff6dc (diff)
drm/exynos: Fix FIMD buffer size calculation
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> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c4
1 files 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 6d2858ae6ad5..9819fa6a9e2a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -663,7 +663,7 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
663 writel(val, ctx->regs + VIDWx_BUF_START(win, 0)); 663 writel(val, ctx->regs + VIDWx_BUF_START(win, 0));
664 664
665 /* buffer end address */ 665 /* buffer end address */
666 size = plane->pitch * plane->crtc_height * (plane->bpp >> 3); 666 size = plane->pitch * plane->crtc_height;
667 val = (unsigned long)(dma_addr + size); 667 val = (unsigned long)(dma_addr + size);
668 writel(val, ctx->regs + VIDWx_BUF_END(win, 0)); 668 writel(val, ctx->regs + VIDWx_BUF_END(win, 0));
669 669
@@ -673,7 +673,7 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
673 plane->crtc_width, plane->crtc_height); 673 plane->crtc_width, plane->crtc_height);
674 674
675 /* buffer size */ 675 /* buffer size */
676 buf_offsize = (plane->fb_width - plane->crtc_width) * (plane->bpp >> 3); 676 buf_offsize = plane->pitch - (plane->crtc_width * (plane->bpp >> 3));
677 line_size = plane->crtc_width * (plane->bpp >> 3); 677 line_size = plane->crtc_width * (plane->bpp >> 3);
678 val = VIDW_BUF_SIZE_OFFSET(buf_offsize) | 678 val = VIDW_BUF_SIZE_OFFSET(buf_offsize) |
679 VIDW_BUF_SIZE_PAGEWIDTH(line_size) | 679 VIDW_BUF_SIZE_PAGEWIDTH(line_size) |