mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: Alex Davis <alex14641@yahoo.com>,
	Keith Packard <keithp@keithp.com>,
	"mjg@redhat.com" <mjg@redhat.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] i915: Fix bug where screen brightness is not restored
Date: Tue, 15 Nov 2011 11:58:38 -0800	[thread overview]
Message-ID: <1321387118.27038.17.camel@fourier> (raw)
In-Reply-To: <1321324952.13838.YahooMailNeo@web130105.mail.mud.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 2603 bytes --]

On Mon, 2011-11-14 at 18:42 -0800, Alex Davis wrote:
> From: Alex Davis<alex14641@yahoo.com>
> 
> This patch fixes an issue where the screen would remain dark when
> 
> a key was pressed when the laptop lid was reopened or after the
> laptop had gone into power-save mode.

[cross-posting to intel-gfx]

Keith, also note that Alex and I did respond to your request to test the
already committed patch "drm/i915/panel: Always record the backlight
level again (but cleverly)".  We both determined that patch does *not*
fix the problem.  Alex's patch below does fix it.

Matthew, any comment on the question that I fielded?:

>> Why does intel_panel_disable_backlight even want to set the
>> brightness to 0 anyway?...  Its only caller is just about to turn
>> off power to the panel.  Is that call to
>> intel_panel_{,actually_}set_backlight(dev, 0) really necessary
>> or useful on *any* systems?

 -Kamal


> It seems that there are a number of people with different machines
> that have this problem:
> 
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652
> https://launchpad.net/~kamalmostafa/+archive/stuck-backlight
> and https://bugs.freedesktop.org/show_bug.cgi?id=41926
> 
> This patch is against Linux 3.1
> 
> Putting printk's in ./drivers/gpu/drm/i915/intel_panel.c showed that 
> intel_get_brightness was being called after the panel was disabled,
> which caused a 0 to be saved as the value to restore the brightness. 
> intel_panel_disable_backlight merely sets the brightness to 0. Commenting
> out this call allows the correct brightness value to be saved.
> 
> Signed-off-by: Alex Davis <alex14641@yahoo.com>
> Tested-by: Kamal Mostafa <kamal@canonical.com>
> -----
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index a9e0c7b..6f56676 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -262,8 +262,6 @@ void intel_panel_disable_backlight(struct drm_device *dev)
>                 dev_priv->backlight_level = intel_panel_get_backlight(dev);
>                 dev_priv->backlight_enabled = false;
>         }
> -
> -       intel_panel_set_backlight(dev, 0);
>  }
> 
>  void intel_panel_enable_backlight(struct drm_device *dev)
> 
>  
> 
> I code, therefore I am
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-11-15 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  2:42 Alex Davis
2011-11-15 19:58 ` Kamal Mostafa [this message]
2011-11-15 20:28   ` [Intel-gfx] " Takashi Iwai
2011-11-15 21:54     ` Kamal Mostafa
2011-11-16  8:01       ` Takashi Iwai

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=1321387118.27038.17.camel@fourier \
    --to=kamal@canonical.com \
    --cc=alex14641@yahoo.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®