From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] omapdss: dispc: Preload more data in pipeline DMAs for OMAP4+ SoCs
Date: Wed, 08 Jan 2014 13:52:38 +0000 [thread overview]
Message-ID: <52CD5826.9010501@ti.com> (raw)
In-Reply-To: <1387278621-10966-1-git-send-email-archit@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3045 bytes --]
On 2013-12-17 13:10, Archit Taneja wrote:
> DISPC pipeline DMAs preload some bytes of pixel data in the vertical blanking
> region before the start of each frame. The preload ensures the pipeline doesn't
> underflow when the active region of the display starts.
>
> DISPC_GFX/VIDp_PRELOAD registers allow us to program how many bytes of data
> should be preloaded for each pipeline. Calculating a precise preload value
> would be a complex function of the pixel clock of the connected display, the
> vertical blanking duration and the interconnect traffic at that instance. If
> the register is left untouched, a default value is preloaded.
>
> We observe underflows for OMAP4+ SoCs for certain bandwidth intensive use cases
> with many other initiators active, and in situations where memory access isn't
> very efficient(like accessing Tiler mapped buffers and EMIF configured in
> non-interleaved more). The cause of the underflow is because the default preload
> value isn't sufficient for the DMA to reach a steady state. We configure the
> PRELOAD register such that the pipelines preload data up to the high threshold
> of the FIFO.
>
> Preloading lot of data for older SoCs can have a negative impact. Due to slower
> interconnects, it's possible that the DISPC DMA cannot preload up to the high
> threshold within the vertical blanking region of the panel. We leave the PRELOAD
> registers to their reset values since we haven't faced underflows with these
> SoCs because of low value of PRELOAD.
>
> Signed-off-by: Archit Taneja <archit@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index 6578540..ace179e 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -90,6 +90,8 @@ struct dispc_features {
>
> /* revert to the OMAP4 mechanism of DISPC Smart Standby operation */
> bool mstandby_workaround:1;
> +
> + bool set_max_preload:1;
> };
>
> #define DISPC_MAX_NR_FIFOS 5
> @@ -1200,6 +1202,15 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
> dispc_write_reg(DISPC_OVL_FIFO_THRESHOLD(plane),
> FLD_VAL(high, hi_start, hi_end) |
> FLD_VAL(low, lo_start, lo_end));
> +
> + /*
> + * configure the preload to the pipeline's high threhold, if HT it's too
> + * large for the preload field, set the threshold to the maximum value
> + * that can be held by the preload register
> + */
> + if (dss_has_feature(FEAT_PRELOAD) && dispc.feat->set_max_preload &&
> + plane != OMAP_DSS_WB)
> + dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfff));
This causes compile warning:
drivers/video/omap2/dss/dispc.c: In function ‘dispc_ovl_set_fifo_threshold’:
drivers/video/omap2/dss/dispc.c:1213:152: warning: comparison of
distinct pointer types lacks a cast
I fixed it by changing 0xfff to 0xfffu
Queued for 3.14.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] omapdss: dispc: Preload more data in pipeline DMAs for OMAP4+ SoCs
Date: Wed, 8 Jan 2014 15:52:38 +0200 [thread overview]
Message-ID: <52CD5826.9010501@ti.com> (raw)
In-Reply-To: <1387278621-10966-1-git-send-email-archit@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3045 bytes --]
On 2013-12-17 13:10, Archit Taneja wrote:
> DISPC pipeline DMAs preload some bytes of pixel data in the vertical blanking
> region before the start of each frame. The preload ensures the pipeline doesn't
> underflow when the active region of the display starts.
>
> DISPC_GFX/VIDp_PRELOAD registers allow us to program how many bytes of data
> should be preloaded for each pipeline. Calculating a precise preload value
> would be a complex function of the pixel clock of the connected display, the
> vertical blanking duration and the interconnect traffic at that instance. If
> the register is left untouched, a default value is preloaded.
>
> We observe underflows for OMAP4+ SoCs for certain bandwidth intensive use cases
> with many other initiators active, and in situations where memory access isn't
> very efficient(like accessing Tiler mapped buffers and EMIF configured in
> non-interleaved more). The cause of the underflow is because the default preload
> value isn't sufficient for the DMA to reach a steady state. We configure the
> PRELOAD register such that the pipelines preload data up to the high threshold
> of the FIFO.
>
> Preloading lot of data for older SoCs can have a negative impact. Due to slower
> interconnects, it's possible that the DISPC DMA cannot preload up to the high
> threshold within the vertical blanking region of the panel. We leave the PRELOAD
> registers to their reset values since we haven't faced underflows with these
> SoCs because of low value of PRELOAD.
>
> Signed-off-by: Archit Taneja <archit@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index 6578540..ace179e 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -90,6 +90,8 @@ struct dispc_features {
>
> /* revert to the OMAP4 mechanism of DISPC Smart Standby operation */
> bool mstandby_workaround:1;
> +
> + bool set_max_preload:1;
> };
>
> #define DISPC_MAX_NR_FIFOS 5
> @@ -1200,6 +1202,15 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
> dispc_write_reg(DISPC_OVL_FIFO_THRESHOLD(plane),
> FLD_VAL(high, hi_start, hi_end) |
> FLD_VAL(low, lo_start, lo_end));
> +
> + /*
> + * configure the preload to the pipeline's high threhold, if HT it's too
> + * large for the preload field, set the threshold to the maximum value
> + * that can be held by the preload register
> + */
> + if (dss_has_feature(FEAT_PRELOAD) && dispc.feat->set_max_preload &&
> + plane != OMAP_DSS_WB)
> + dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfff));
This causes compile warning:
drivers/video/omap2/dss/dispc.c: In function ‘dispc_ovl_set_fifo_threshold’:
drivers/video/omap2/dss/dispc.c:1213:152: warning: comparison of
distinct pointer types lacks a cast
I fixed it by changing 0xfff to 0xfffu
Queued for 3.14.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2014-01-08 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 11:10 [PATCH] omapdss: dispc: Preload more data in pipeline DMAs for OMAP4+ SoCs Archit Taneja
2013-12-17 11:22 ` Archit Taneja
2014-01-08 13:52 ` Tomi Valkeinen [this message]
2014-01-08 13:52 ` Tomi Valkeinen
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=52CD5826.9010501@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=archit@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@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 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.