Patchwork [Maverick,SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path

login
register
mail settings
Submitter Keng-Yu Lin
Date Nov. 26, 2010, 9:40 a.m.
Message ID <1290764426-5299-1-git-send-email-keng-yu.lin@canonical.com>
Download mbox | patch
Permalink /patch/73163/
State Accepted
Delegated to: Brad Figg
Headers show

Comments

Keng-Yu Lin - Nov. 26, 2010, 9:40 a.m.
This patch gets merged in 2.6.36. Since the last stable release 
of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.

SRU Justification:

Impact:
The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.

Fix:
Call acpi_video_register() on the failure path.

Testcase:
Cameron Matheson verified on Toshiba NB305.
David Woodhouse verified on Lenovo IdeaPad S10-3

---
From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse@intel.com>
Date: Fri, 13 Aug 2010 00:56:54 +0100
Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path

BugLink: http://bugs.launchpad.net/bugs/615947
upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c

If i915 opregion is present, the acpi_video driver doesn't register
itself immediately; it defers that until the i915 opregion code is done.
But if that *fails*, the acpi_video driver was never getting registered.
And thus I have no backlight support on my Lenovo IdeaPad S10-3.

Call acpi_video_register() on the failure path, and it works again.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Matthew Garrett <mjg@redhat.com>
Tested-by: Cameron Matheson <cameron.matheson@gmail.com>
Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
---
 drivers/gpu/drm/i915/i915_opregion.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Tim Gardner - Nov. 29, 2010, 1:52 p.m.
On 11/26/2010 02:40 AM, Keng-Yu Lin wrote:
> This patch gets merged in 2.6.36. Since the last stable release
> of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.
>
> SRU Justification:
>
> Impact:
> The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.
>
> Fix:
> Call acpi_video_register() on the failure path.
>
> Testcase:
> Cameron Matheson verified on Toshiba NB305.
> David Woodhouse verified on Lenovo IdeaPad S10-3
>
> ---
>  From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
> From: David Woodhouse<David.Woodhouse@intel.com>
> Date: Fri, 13 Aug 2010 00:56:54 +0100
> Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path
>
> BugLink: http://bugs.launchpad.net/bugs/615947
> upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c
>
> If i915 opregion is present, the acpi_video driver doesn't register
> itself immediately; it defers that until the i915 opregion code is done.
> But if that *fails*, the acpi_video driver was never getting registered.
> And thus I have no backlight support on my Lenovo IdeaPad S10-3.
>
> Call acpi_video_register() on the failure path, and it works again.
>
> Signed-off-by: David Woodhouse<David.Woodhouse@intel.com>
> Acked-by: Jesse Barnes<jbarnes@virtuousgeek.org>
> Acked-by: Matthew Garrett<mjg@redhat.com>
> Tested-by: Cameron Matheson<cameron.matheson@gmail.com>
> Signed-off-by: Keng-Yu Lin<keng-yu.lin@canonical.com>
> ---
>   drivers/gpu/drm/i915/i915_opregion.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
> index 8fcc75c..d1bf92b 100644
> --- a/drivers/gpu/drm/i915/i915_opregion.c
> +++ b/drivers/gpu/drm/i915/i915_opregion.c
> @@ -535,6 +535,7 @@ int intel_opregion_init(struct drm_device *dev, int resume)
>   err_out:
>   	iounmap(opregion->header);
>   	opregion->header = NULL;
> +	acpi_video_register();
>   	return err;
>   }
>

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader - Nov. 29, 2010, 1:54 p.m.
On 11/26/2010 10:40 AM, Keng-Yu Lin wrote:
> This patch gets merged in 2.6.36. Since the last stable release 
> of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.
> 
> SRU Justification:
> 
> Impact:
> The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.
> 
> Fix:
> Call acpi_video_register() on the failure path.
> 
> Testcase:
> Cameron Matheson verified on Toshiba NB305.
> David Woodhouse verified on Lenovo IdeaPad S10-3
> 
> ---
> From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
> From: David Woodhouse <David.Woodhouse@intel.com>
> Date: Fri, 13 Aug 2010 00:56:54 +0100
> Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path
> 
> BugLink: http://bugs.launchpad.net/bugs/615947
> upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c
> 
> If i915 opregion is present, the acpi_video driver doesn't register
> itself immediately; it defers that until the i915 opregion code is done.
> But if that *fails*, the acpi_video driver was never getting registered.
> And thus I have no backlight support on my Lenovo IdeaPad S10-3.
> 
> Call acpi_video_register() on the failure path, and it works again.
> 
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Acked-by: Matthew Garrett <mjg@redhat.com>
> Tested-by: Cameron Matheson <cameron.matheson@gmail.com>
> Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
> ---
>  drivers/gpu/drm/i915/i915_opregion.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
> index 8fcc75c..d1bf92b 100644
> --- a/drivers/gpu/drm/i915/i915_opregion.c
> +++ b/drivers/gpu/drm/i915/i915_opregion.c
> @@ -535,6 +535,7 @@ int intel_opregion_init(struct drm_device *dev, int resume)
>  err_out:
>  	iounmap(opregion->header);
>  	opregion->header = NULL;
> +	acpi_video_register();
>  	return err;
>  }
>  
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Brad Figg - Nov. 29, 2010, 7:05 p.m.
On 11/29/2010 05:54 AM, Stefan Bader wrote:
> On 11/26/2010 10:40 AM, Keng-Yu Lin wrote:
>> This patch gets merged in 2.6.36. Since the last stable release
>> of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.
>>
>> SRU Justification:
>>
>> Impact:
>> The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.
>>
>> Fix:
>> Call acpi_video_register() on the failure path.
>>
>> Testcase:
>> Cameron Matheson verified on Toshiba NB305.
>> David Woodhouse verified on Lenovo IdeaPad S10-3
>>
>> ---
>>  From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
>> From: David Woodhouse<David.Woodhouse@intel.com>
>> Date: Fri, 13 Aug 2010 00:56:54 +0100
>> Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path
>>
>> BugLink: http://bugs.launchpad.net/bugs/615947
>> upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c
>>
>> If i915 opregion is present, the acpi_video driver doesn't register
>> itself immediately; it defers that until the i915 opregion code is done.
>> But if that *fails*, the acpi_video driver was never getting registered.
>> And thus I have no backlight support on my Lenovo IdeaPad S10-3.
>>
>> Call acpi_video_register() on the failure path, and it works again.
>>
>> Signed-off-by: David Woodhouse<David.Woodhouse@intel.com>
>> Acked-by: Jesse Barnes<jbarnes@virtuousgeek.org>
>> Acked-by: Matthew Garrett<mjg@redhat.com>
>> Tested-by: Cameron Matheson<cameron.matheson@gmail.com>
>> Signed-off-by: Keng-Yu Lin<keng-yu.lin@canonical.com>
>> ---
>>   drivers/gpu/drm/i915/i915_opregion.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
>> index 8fcc75c..d1bf92b 100644
>> --- a/drivers/gpu/drm/i915/i915_opregion.c
>> +++ b/drivers/gpu/drm/i915/i915_opregion.c
>> @@ -535,6 +535,7 @@ int intel_opregion_init(struct drm_device *dev, int resume)
>>   err_out:
>>   	iounmap(opregion->header);
>>   	opregion->header = NULL;
>> +	acpi_video_register();
>>   	return err;
>>   }
>>
> Acked-by: Stefan Bader<stefan.bader@canonical.com>
>


Pulled and pushed to Maverick master-next.
Brad Figg - Dec. 7, 2010, 7:52 p.m.
On 11/26/2010 01:40 AM, Keng-Yu Lin wrote:
> This patch gets merged in 2.6.36. Since the last stable release
> of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.
>
> SRU Justification:
>
> Impact:
> The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.
>
> Fix:
> Call acpi_video_register() on the failure path.
>
> Testcase:
> Cameron Matheson verified on Toshiba NB305.
> David Woodhouse verified on Lenovo IdeaPad S10-3
>
> ---
>  From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
> From: David Woodhouse<David.Woodhouse@intel.com>
> Date: Fri, 13 Aug 2010 00:56:54 +0100
> Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in intel_opregion_init() failure path
>
> BugLink: http://bugs.launchpad.net/bugs/615947
> upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c
>
> If i915 opregion is present, the acpi_video driver doesn't register
> itself immediately; it defers that until the i915 opregion code is done.
> But if that *fails*, the acpi_video driver was never getting registered.
> And thus I have no backlight support on my Lenovo IdeaPad S10-3.
>
> Call acpi_video_register() on the failure path, and it works again.
>
> Signed-off-by: David Woodhouse<David.Woodhouse@intel.com>
> Acked-by: Jesse Barnes<jbarnes@virtuousgeek.org>
> Acked-by: Matthew Garrett<mjg@redhat.com>
> Tested-by: Cameron Matheson<cameron.matheson@gmail.com>
> Signed-off-by: Keng-Yu Lin<keng-yu.lin@canonical.com>
> ---
>   drivers/gpu/drm/i915/i915_opregion.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
> index 8fcc75c..d1bf92b 100644
> --- a/drivers/gpu/drm/i915/i915_opregion.c
> +++ b/drivers/gpu/drm/i915/i915_opregion.c
> @@ -535,6 +535,7 @@ int intel_opregion_init(struct drm_device *dev, int resume)
>   err_out:
>   	iounmap(opregion->header);
>   	opregion->header = NULL;
> +	acpi_video_register();
>   	return err;
>   }
>

Keng-Yu,

What is the launchpad bug that this goes to? The buglink in the text is the
wrong bug.

Thanks,
Brad
Keng-Yu Lin - Dec. 8, 2010, 3:38 a.m.
On Wed, Dec 8, 2010 at 3:52 AM, Brad Figg <brad.figg@canonical.com> wrote:
> On 11/26/2010 01:40 AM, Keng-Yu Lin wrote:
>>
>> This patch gets merged in 2.6.36. Since the last stable release
>> of 2.6.35.9 is out. This patch may be included as an SRU in Ubuntu.
>>
>> SRU Justification:
>>
>> Impact:
>> The backlight brightness of laptop type Toshiba NB305 cannot be adjusted.
>>
>> Fix:
>> Call acpi_video_register() on the failure path.
>>
>> Testcase:
>> Cameron Matheson verified on Toshiba NB305.
>> David Woodhouse verified on Lenovo IdeaPad S10-3
>>
>> ---
>>  From 89dcb83236bb656f7e9eaa75b53c5783ff0b8418 Mon Sep 17 00:00:00 2001
>> From: David Woodhouse<David.Woodhouse@intel.com>
>> Date: Fri, 13 Aug 2010 00:56:54 +0100
>> Subject: [Maverick SRU] UBUNTU: [Upstream] Call acpi_video_register() in
>> intel_opregion_init() failure path
>>
>> BugLink: http://bugs.launchpad.net/bugs/615947
>> upstream commit: 54b9b308fa39e5147e2edde3492d8650b957be6c
>>
>> If i915 opregion is present, the acpi_video driver doesn't register
>> itself immediately; it defers that until the i915 opregion code is done.
>> But if that *fails*, the acpi_video driver was never getting registered.
>> And thus I have no backlight support on my Lenovo IdeaPad S10-3.
>>
>> Call acpi_video_register() on the failure path, and it works again.
>>
>> Signed-off-by: David Woodhouse<David.Woodhouse@intel.com>
>> Acked-by: Jesse Barnes<jbarnes@virtuousgeek.org>
>> Acked-by: Matthew Garrett<mjg@redhat.com>
>> Tested-by: Cameron Matheson<cameron.matheson@gmail.com>
>> Signed-off-by: Keng-Yu Lin<keng-yu.lin@canonical.com>
>> ---
>>  drivers/gpu/drm/i915/i915_opregion.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_opregion.c
>> b/drivers/gpu/drm/i915/i915_opregion.c
>> index 8fcc75c..d1bf92b 100644
>> --- a/drivers/gpu/drm/i915/i915_opregion.c
>> +++ b/drivers/gpu/drm/i915/i915_opregion.c
>> @@ -535,6 +535,7 @@ int intel_opregion_init(struct drm_device *dev, int
>> resume)
>>  err_out:
>>        iounmap(opregion->header);
>>        opregion->header = NULL;
>> +       acpi_video_register();
>>        return err;
>>  }
>>
>
> Keng-Yu,
>
> What is the launchpad bug that this goes to? The buglink in the text is the
> wrong bug.
>
> Thanks,
> Brad
> --
> Brad Figg brad.figg@canonical.com http://www.canonical.com
>

Hi Brad:
  My bad. It's http://launchpad.net/bugs/672876.

  Regards,
-kengyu

Patch

diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
index 8fcc75c..d1bf92b 100644
--- a/drivers/gpu/drm/i915/i915_opregion.c
+++ b/drivers/gpu/drm/i915/i915_opregion.c
@@ -535,6 +535,7 @@  int intel_opregion_init(struct drm_device *dev, int resume)
 err_out:
 	iounmap(opregion->header);
 	opregion->header = NULL;
+	acpi_video_register();
 	return err;
 }