All of lore.kernel.org
 help / color / mirror / Atom feed
From: "stanley.miao" <stanley.miao@windriver.com>
To: Laine Walker-Avina <lwalkera@ieee.org>
Cc: tomi.valkeinen@nokia.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP: DSS2: don't power off a panel twice
Date: Wed, 11 Aug 2010 11:09:30 +0800	[thread overview]
Message-ID: <4C62146A.4090006@windriver.com> (raw)
In-Reply-To: <AANLkTi=rq_myAkvRJLdZ3yHHTNr7sPYF2K9pEK-QEMtB@mail.gmail.com>

Laine Walker-Avina wrote:
> On Tue, Aug 10, 2010 at 5:16 AM, Stanley.Miao
> <stanley.miao@windriver.com> wrote:
>   
>> <snip>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>     
>
> Instead of adding a new variable and a bunch of extra code, I solved
> this problem on my local tree by just not doing anything if we're
> already not active. See the follwoing for the generic panel driver.
>
> diff --git a/drivers/video/omap2/displays/panel-generic.c
> b/drivers/video/omap2/displays/panel-generic.c
> index 300eff5..abc03f4 100644
> --- a/drivers/video/omap2/displays/panel-generic.c
> +++ b/drivers/video/omap2/displays/panel-generic.c
> @@ -91,9 +91,12 @@ static int generic_panel_enable(struct
> omap_dss_device *dssdev)
>
>  static void generic_panel_disable(struct omap_dss_device *dssdev)
>  {
> -	generic_panel_power_off(dssdev);
> +	if(dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
> +	{
> +		generic_panel_power_off(dssdev);
>
> -	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
> +		dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
> +	}
>  }
>
>   

Yes, This is a good idea. If we add this check into power_off(), will it 
be better ? How do you think ?

Stanley.

>  static int generic_panel_suspend(struct omap_dss_device *dssdev)
>   


  reply	other threads:[~2010-08-11  2:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 12:16 [PATCH] OMAP: DSS2: don't power off a panel twice Stanley.Miao
2010-08-10 22:04 ` Laine Walker-Avina
2010-08-11  3:09   ` stanley.miao [this message]
2010-08-11  5:29     ` Bryan Wu
2010-08-17 10:41 ` 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=4C62146A.4090006@windriver.com \
    --to=stanley.miao@windriver.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lwalkera@ieee.org \
    --cc=tomi.valkeinen@nokia.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.