* [PATCH] drm/i915: Fix inconsistent backlight level during disabled
@ 2011-11-16 9:58 Takashi Iwai
2011-11-16 13:19 ` Alex Davis
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Takashi Iwai @ 2011-11-16 9:58 UTC (permalink / raw)
To: Keith Packard; +Cc: intel-gfx, linux-kernel, Alex Davis, Kamal Mostafa, mjg
When the brightness property is inquired while the backlight is disabled,
the driver returns a wrong value (zero) because it probes the value after
the backlight was turned off. This caused a black screen even after the
backlight is enabled again. It should return the internal backlight_level
instead, so that it won't be influenced by the backlight-enable state.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=41926
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652
Tested-by: Kamal Mostafa <kamal@canonical.com>
Cc: Alex Davis <alex14641@yahoo.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/i915/intel_panel.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 499d4c0..21f60b7 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)
static int intel_panel_get_brightness(struct backlight_device *bd)
{
struct drm_device *dev = bl_get_data(bd);
- return intel_panel_get_backlight(dev);
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ return dev_priv->backlight_level;
}
static const struct backlight_ops intel_panel_bl_ops = {
--
1.7.7
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Fix inconsistent backlight level during disabled
2011-11-16 9:58 [PATCH] drm/i915: Fix inconsistent backlight level during disabled Takashi Iwai
@ 2011-11-16 13:19 ` Alex Davis
2011-11-20 16:28 ` Alex Davis
2011-11-17 21:00 ` Keith Packard
2011-11-19 20:02 ` Woody Suwalski
2 siblings, 1 reply; 5+ messages in thread
From: Alex Davis @ 2011-11-16 13:19 UTC (permalink / raw)
To: Takashi Iwai, Keith Packard
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Kamal Mostafa, mjg@redhat.com
>diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
>index 499d4c0..21f60b7 100644
>--- a/drivers/gpu/drm/i915/intel_panel.c
>+++ b/drivers/gpu/drm/i915/intel_panel.c
>@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)
>static int intel_panel_get_brightness(struct backlight_device *bd)
>{
> struct drm_device *dev = bl_get_data(bd);
>- return intel_panel_get_backlight(dev);
>+ struct drm_i915_private *dev_priv = dev->dev_private;
>+ return dev_priv->backlight_level;
>}
>
>static const struct backlight_ops intel_panel_bl_ops = {
>--
>1.7.7
I'll test this patch sometime this weekend.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Fix inconsistent backlight level during disabled
2011-11-16 9:58 [PATCH] drm/i915: Fix inconsistent backlight level during disabled Takashi Iwai
2011-11-16 13:19 ` Alex Davis
@ 2011-11-17 21:00 ` Keith Packard
2011-11-19 20:02 ` Woody Suwalski
2 siblings, 0 replies; 5+ messages in thread
From: Keith Packard @ 2011-11-17 21:00 UTC (permalink / raw)
To: Takashi Iwai; +Cc: intel-gfx, linux-kernel, Alex Davis, Kamal Mostafa, mjg
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Wed, 16 Nov 2011 10:58:03 +0100, Takashi Iwai <tiwai@suse.de> wrote:
> When the brightness property is inquired while the backlight is disabled,
> the driver returns a wrong value (zero) because it probes the value after
> the backlight was turned off. This caused a black screen even after the
> backlight is enabled again. It should return the internal backlight_level
> instead, so that it won't be influenced by the backlight-enable state.
Yes, this looks correct by inspection to me. I'll stick it into
drm-intel-fixes.
--
keith.packard@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Fix inconsistent backlight level during disabled
2011-11-16 9:58 [PATCH] drm/i915: Fix inconsistent backlight level during disabled Takashi Iwai
2011-11-16 13:19 ` Alex Davis
2011-11-17 21:00 ` Keith Packard
@ 2011-11-19 20:02 ` Woody Suwalski
2 siblings, 0 replies; 5+ messages in thread
From: Woody Suwalski @ 2011-11-19 20:02 UTC (permalink / raw)
To: Takashi Iwai
Cc: Keith Packard, intel-gfx, linux-kernel, Alex Davis, Kamal Mostafa,
mjg
Takashi Iwai wrote:
> When the brightness property is inquired while the backlight is disabled,
> the driver returns a wrong value (zero) because it probes the value after
> the backlight was turned off. This caused a black screen even after the
> backlight is enabled again. It should return the internal backlight_level
> instead, so that it won't be influenced by the backlight-enable state.
>
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=41926
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652
>
> Tested-by: Kamal Mostafa<kamal@canonical.com>
> Cc: Alex Davis<alex14641@yahoo.com>
> Cc:<stable@kernel.org>
> Signed-off-by: Takashi Iwai<tiwai@suse.de>
> ---
> drivers/gpu/drm/i915/intel_panel.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index 499d4c0..21f60b7 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)
> static int intel_panel_get_brightness(struct backlight_device *bd)
> {
> struct drm_device *dev = bl_get_data(bd);
> - return intel_panel_get_backlight(dev);
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + return dev_priv->backlight_level;
> }
>
> static const struct backlight_ops intel_panel_bl_ops = {
Seems to be fixing a black-screen regression since 3.0 on EeePC devices
as well...
Thanks, Woody
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Fix inconsistent backlight level during disabled
2011-11-16 13:19 ` Alex Davis
@ 2011-11-20 16:28 ` Alex Davis
0 siblings, 0 replies; 5+ messages in thread
From: Alex Davis @ 2011-11-20 16:28 UTC (permalink / raw)
To: Takashi Iwai, Keith Packard
Cc: linux-kernel@vger.kernel.org, Kamal Mostafa, mjg@redhat.com
>>diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
>>index 499d4c0..21f60b7 100644
>>--- a/drivers/gpu/drm/i915/intel_panel.c
>>+++ b/drivers/gpu/drm/i915/intel_panel.c
>>@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)
>>static int intel_panel_get_brightness(struct backlight_device *bd)
>>{
>> struct drm_device *dev = bl_get_data(bd);
>>- return intel_panel_get_backlight(dev);
>>+ struct drm_i915_private *dev_priv = dev->dev_private;
>>+ return dev_priv->backlight_level;
>>}
>>
>>static const struct backlight_ops intel_panel_bl_ops = {
>>--
>>1.7.7
>
>I'll test this patch sometime this weekend.
This patch works for me.
Tested-by: Alex Davis<alex14641@yahoo.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-20 16:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16 9:58 [PATCH] drm/i915: Fix inconsistent backlight level during disabled Takashi Iwai
2011-11-16 13:19 ` Alex Davis
2011-11-20 16:28 ` Alex Davis
2011-11-17 21:00 ` Keith Packard
2011-11-19 20:02 ` Woody Suwalski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox