From: Inki Dae <inki.dae@samsung.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, stable@vger.kernel.org,
Andrzej Hajda <a.hajda@samsung.com>,
dri-devel@lists.freedesktop.org,
Daniel Stone <daniels@collabora.com>
Subject: Re: [PATCH] drm/exynos: fimd: fix buffer size calculation
Date: Mon, 13 Apr 2015 16:48:38 +0900 [thread overview]
Message-ID: <552B74D6.4080203@samsung.com> (raw)
In-Reply-To: <1428910167-14698-1-git-send-email-m.szyprowski@samsung.com>
On 2015년 04월 13일 16:28, Marek Szyprowski wrote:
> 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.
This fixup had already been posted by Daniel Stone,
https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm-next
Thanks,
Inki Dae
>
> Signed-off by: Marek Szyprowski <m.szyprowski@samsung.com>
> CC: stable@vger.kernel.org # 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));
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-04-13 7:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 7:28 [PATCH] drm/exynos: fimd: fix buffer size calculation Marek Szyprowski
2015-04-13 7:48 ` Inki Dae [this message]
2015-04-13 14:58 ` Daniel Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552B74D6.4080203@samsung.com \
--to=inki.dae@samsung.com \
--cc=a.hajda@samsung.com \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox