All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <archit@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/6] OMAPDSS: APPLY: set infos to dirty on enable
Date: Mon, 25 Nov 2013 01:18:50 +0000	[thread overview]
Message-ID: <5292A2AA.6090001@ti.com> (raw)
In-Reply-To: <1384779009-10512-2-git-send-email-tomi.valkeinen@ti.com>

On Monday 18 November 2013 06:20 PM, Tomi Valkeinen wrote:
> Currently when DISPC is suspended, the driver stores all DISPC registers
> to memory, so that they can be restored on resume. This is a bad way to
> handle suspend/resume, as it's prone to failures and requires somewhat
> large amount of extra space to store the registers.
>
> A better approach is to program the DISPC from scratch when resuming.
> This can be easily accomplished in apply layer by setting the manager
> and overlay infos to dirty when the manager is to be enabled.

I guess this won't work if we wanted to support DSI command mode 
displays. I.e, only shut DSS off and keep the panel up. In that case, we 
would need to mark the flags dirty in dss_mgr_start_update_compat().

We don't support the above use case anyway, but just pointing out :)

Archit

>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/video/omap2/dss/apply.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>
> diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
> index 60758db..6ab4cb6 100644
> --- a/drivers/video/omap2/dss/apply.c
> +++ b/drivers/video/omap2/dss/apply.c
> @@ -1072,6 +1072,7 @@ static void dss_setup_fifos(void)
>   static int dss_mgr_enable_compat(struct omap_overlay_manager *mgr)
>   {
>   	struct mgr_priv_data *mp = get_mgr_priv(mgr);
> +	struct omap_overlay *ovl;
>   	unsigned long flags;
>   	int r;
>
> @@ -1091,6 +1092,27 @@ static int dss_mgr_enable_compat(struct omap_overlay_manager *mgr)
>   		goto err;
>   	}
>
> +	/*
> +	 * Mark the info & extra_info dirty for the manager and its enabled
> +	 * overlays to force register writes. This ensures that the relevant
> +	 * registers are set after DSS has been off and the registers have been
> +	 * reset.
> +	 */
> +
> +	mp->info_dirty = true;
> +	mp->extra_info_dirty = true;
> +
> +	list_for_each_entry(ovl, &mgr->overlays, list) {
> +		struct ovl_priv_data *op = get_ovl_priv(ovl);
> +
> +		if (!op->enabled)
> +			continue;
> +
> +		op->info_dirty = true;
> +		op->extra_info_dirty = true;
> +		dispc_ovl_set_channel_out(ovl->id, mgr->id);
> +	}
> +
>   	dss_setup_fifos();
>
>   	dss_write_regs();
>


WARNING: multiple messages have this Message-ID (diff)
From: Archit Taneja <archit@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/6] OMAPDSS: APPLY: set infos to dirty on enable
Date: Mon, 25 Nov 2013 06:36:50 +0530	[thread overview]
Message-ID: <5292A2AA.6090001@ti.com> (raw)
In-Reply-To: <1384779009-10512-2-git-send-email-tomi.valkeinen@ti.com>

On Monday 18 November 2013 06:20 PM, Tomi Valkeinen wrote:
> Currently when DISPC is suspended, the driver stores all DISPC registers
> to memory, so that they can be restored on resume. This is a bad way to
> handle suspend/resume, as it's prone to failures and requires somewhat
> large amount of extra space to store the registers.
>
> A better approach is to program the DISPC from scratch when resuming.
> This can be easily accomplished in apply layer by setting the manager
> and overlay infos to dirty when the manager is to be enabled.

I guess this won't work if we wanted to support DSI command mode 
displays. I.e, only shut DSS off and keep the panel up. In that case, we 
would need to mark the flags dirty in dss_mgr_start_update_compat().

We don't support the above use case anyway, but just pointing out :)

Archit

>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/video/omap2/dss/apply.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>
> diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
> index 60758db..6ab4cb6 100644
> --- a/drivers/video/omap2/dss/apply.c
> +++ b/drivers/video/omap2/dss/apply.c
> @@ -1072,6 +1072,7 @@ static void dss_setup_fifos(void)
>   static int dss_mgr_enable_compat(struct omap_overlay_manager *mgr)
>   {
>   	struct mgr_priv_data *mp = get_mgr_priv(mgr);
> +	struct omap_overlay *ovl;
>   	unsigned long flags;
>   	int r;
>
> @@ -1091,6 +1092,27 @@ static int dss_mgr_enable_compat(struct omap_overlay_manager *mgr)
>   		goto err;
>   	}
>
> +	/*
> +	 * Mark the info & extra_info dirty for the manager and its enabled
> +	 * overlays to force register writes. This ensures that the relevant
> +	 * registers are set after DSS has been off and the registers have been
> +	 * reset.
> +	 */
> +
> +	mp->info_dirty = true;
> +	mp->extra_info_dirty = true;
> +
> +	list_for_each_entry(ovl, &mgr->overlays, list) {
> +		struct ovl_priv_data *op = get_ovl_priv(ovl);
> +
> +		if (!op->enabled)
> +			continue;
> +
> +		op->info_dirty = true;
> +		op->extra_info_dirty = true;
> +		dispc_ovl_set_channel_out(ovl->id, mgr->id);
> +	}
> +
>   	dss_setup_fifos();
>
>   	dss_write_regs();
>


  reply	other threads:[~2013-11-25  1:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 12:50 [PATCH 0/6] OMAPDSS: suspend/resume improvements Tomi Valkeinen
2013-11-18 12:50 ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 1/6] OMAPDSS: APPLY: set infos to dirty on enable Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-25  1:06   ` Archit Taneja [this message]
2013-11-25  1:18     ` Archit Taneja
2013-11-26 10:21     ` Tomi Valkeinen
2013-11-26 10:21       ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 2/6] OMAPDSS: DISPC: Remove context restore Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 3/6] OMAPDSS: DSS remove ctx stuff Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 4/6] OMAPDSS: remove dss_get_ctx_loss_count Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 5/6] OMAPDSS: add debug print for runtime suspend/resume Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-18 12:50 ` [PATCH 6/6] OMAPDSS: use runtime PM's autosuspend Tomi Valkeinen
2013-11-18 12:50   ` Tomi Valkeinen
2013-11-25  1:29   ` Archit Taneja
2013-11-25  1:41     ` Archit Taneja
2013-11-26 10:27     ` Tomi Valkeinen
2013-11-26 10:27       ` 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=5292A2AA.6090001@ti.com \
    --to=archit@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.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.