All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Rahul Sharma <rahul.sharma@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, joshi@samsung.com,
	dri-devel@lists.freedesktop.org,
	Prathyush K <prathyush.k@samsung.com>
Subject: Re: [PATCH] drm/exynos: use 4WORD dma burst length for small fbs
Date: Wed, 21 May 2014 20:13:09 +0900	[thread overview]
Message-ID: <537C8A45.6040407@samsung.com> (raw)
In-Reply-To: <1399461922-27131-1-git-send-email-rahul.sharma@samsung.com>


Hi Rahul,

On 2014년 05월 07일 20:25, Rahul Sharma wrote:
> From: Rahul Sharma <Rahul.Sharma@samsung.com>
> 
> In case of exynos, setting dma-burst to 16Word causes permanent
> tearing for very small buffers, e.g. cursor buffer. Burst Mode
> switching, which is based on overlay size is not recommended as
> overlay size varies a lot towards the end of the screen. This
> causes unstable DMA which results into tearing again.
> 
> Rendering small buffers with lower burst size doesn't
> cause any noticable performance overhead. 128 pixel width is
> selected based on mulitple experiments with exynos5 SoCs.
> 
> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com>
> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> ---
> Based on Inki Dae's exynos-drm-next branch.
> 
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 40fd6cc..ef56077 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -38,6 +38,7 @@
>   */
>  
>  #define FIMD_DEFAULT_FRAMERATE 60
> +#define MIN_FB_WIDTH_FOR_16WORD_BURST 128
>  
>  /* position control register for hardware window 0, 2 ~ 4.*/
>  #define VIDOSD_A(win)		(VIDOSD_BASE + 0x00 + (win) * 16)
> @@ -446,6 +447,19 @@ static void fimd_win_set_pixfmt(struct fimd_context *ctx, unsigned int win)
>  
>  	DRM_DEBUG_KMS("bpp = %d\n", win_data->bpp);
>  
> +	/*
> +	 * In case of exynos, setting dma-burst to 16Word causes permanent
> +	 * tearing for very small buffers, e.g. cursor buffer. Burst Mode
> +	 * switching which is based on overlay size is not recommended as
> +	 * overlay size varies alot towards the end of the screen and rapid
> +	 * movement causes unstable DMA which results into iommu crash/tear.

FIMD has width limitation so width of hardware overlay may need to be
aligned to 16 pixels.
We had faced with similar issue and the issue had been resolved by
aligning it to 16 pixels.

So can you try to align it instead of changing burst len size?

Thanks,
Inki Dae

> +	 */
> +
> +	if (win_data->fb_width < MIN_FB_WIDTH_FOR_16WORD_BURST) {
> +		val &= ~WINCONx_BURSTLEN_MASK;
> +		val |= WINCONx_BURSTLEN_4WORD;
> +	}
> +
>  	writel(val, ctx->regs + WINCON(win));
>  }
>  
> 

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

  reply	other threads:[~2014-05-21 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 11:25 [PATCH] drm/exynos: use 4WORD dma burst length for small fbs Rahul Sharma
2014-05-21 11:13 ` Inki Dae [this message]
2014-05-22  4:36   ` Rahul Sharma
2014-05-22  6:55     ` Inki Dae
2014-05-22  8:39       ` Rahul Sharma
2014-05-22 12:14         ` Inki Dae

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=537C8A45.6040407@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joshi@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prathyush.k@samsung.com \
    --cc=rahul.sharma@samsung.com \
    /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 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.