Commit adacb228d72b9529f8de0769cc33414c3012054d ("drm: Exynos: Respect framebuffer pitch for FIMD/Mixer") changed the way of buffer size calcularion: it replaced fb_width by fb_pitch entry. fb_pitch however already contains '(win_data->bpp >> 3)' factor, so it should be removed from final buffer size calculation formula. This patch fixes this issue, solving possible IOMMU page fault caused by FIMD module accessing memory outside of the given display buffer. Signed-off by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> CC: stable@xxxxxxxxxxxxxxx # v4.0+ --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0e93ed792224..f29a13e0524c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -689,7 +689,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)); -- 1.9.2 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html