linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1
@ 2010-12-24  8:49 Mourad De Clerck
  2011-01-04 22:36 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Mourad De Clerck @ 2010-12-24  8:49 UTC (permalink / raw)
  To: Richard Purdie; +Cc: linux-kernel

Add support for the MacBookPro7,1 (13" mid 2010) to the mbp_nvidia_bl
driver.

Signed-off-by: Mourad De Clerck <mourad@aquazul.com>
---
 drivers/video/backlight/mbp_nvidia_bl.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/video/backlight/mbp_nvidia_bl.c
b/drivers/video/backlight/mbp_nvidia_bl.c
index 9fb533f..9c44314 100644
--- a/drivers/video/backlight/mbp_nvidia_bl.c
+++ b/drivers/video/backlight/mbp_nvidia_bl.c
@@ -335,6 +335,15 @@ static const struct dmi_system_id __initdata
mbp_device_table[] = {
 		},
 		.driver_data	= (void *)&nvidia_chipset_data,
 	},
+	{
+		.callback	= mbp_dmi_match,
+		.ident		= "MacBookPro 7,1",
+		.matches	= {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro7,1"),
+		},
+		.driver_data	= (void *)&nvidia_chipset_data,
+	},
 	{ }
 };


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1
  2010-12-24  8:49 [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1 Mourad De Clerck
@ 2011-01-04 22:36 ` Andrew Morton
  2011-01-11 16:42   ` mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1) Mourad De Clerck
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2011-01-04 22:36 UTC (permalink / raw)
  To: Mourad De Clerck; +Cc: Richard Purdie, linux-kernel, Matthew Garrett

On Fri, 24 Dec 2010 09:49:57 +0100
Mourad De Clerck <mourad@aquazul.com> wrote:

> Add support for the MacBookPro7,1 (13" mid 2010) to the mbp_nvidia_bl
> driver.
> 
> Signed-off-by: Mourad De Clerck <mourad@aquazul.com>
> ---
>  drivers/video/backlight/mbp_nvidia_bl.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/backlight/mbp_nvidia_bl.c
> b/drivers/video/backlight/mbp_nvidia_bl.c
> index 9fb533f..9c44314 100644
> --- a/drivers/video/backlight/mbp_nvidia_bl.c
> +++ b/drivers/video/backlight/mbp_nvidia_bl.c
> @@ -335,6 +335,15 @@ static const struct dmi_system_id __initdata
> mbp_device_table[] = {
>  		},
>  		.driver_data	= (void *)&nvidia_chipset_data,
>  	},
> +	{
> +		.callback	= mbp_dmi_match,
> +		.ident		= "MacBookPro 7,1",
> +		.matches	= {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro7,1"),
> +		},
> +		.driver_data	= (void *)&nvidia_chipset_data,
> +	},
>  	{ }
>  };

I applied this, and now I'll unapply it because Matthew's patch series
"mbp_nvidia_bl: Remove DMI dependency" appears to make your change
obsolete.

I'll cc you on those three patches - it will be great if you are able
to find time to test them, thanks.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
  2011-01-04 22:36 ` Andrew Morton
@ 2011-01-11 16:42   ` Mourad De Clerck
  2011-01-11 16:48     ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: Mourad De Clerck @ 2011-01-11 16:42 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Richard Purdie, linux-kernel, Matthew Garrett, Richard Hughes

On 04/01/11 23:36, Andrew Morton wrote:
> I applied this, and now I'll unapply it because Matthew's patch series
> "mbp_nvidia_bl: Remove DMI dependency" appears to make your change
> obsolete.
> 
> I'll cc you on those three patches - it will be great if you are able
> to find time to test them, thanks.

A bit late, but I tested this patch series and it works for me.

The only slight change is that gnome-power-manager needs to be updated
to use /sys/class/backlight/apple_backlight instead of mbp_backlight.

Thanks,

Mourad

PS: something like this, maybe?
--
diff --git a/src/gpm-backlight-helper.c b/src/gpm-backlight-helper.c
index 27aed09..a8ef608 100644
--- a/src/gpm-backlight-helper.c
+++ b/src/gpm-backlight-helper.c
@@ -58,6 +58,7 @@ gcm_backlight_helper_get_best_backlight ()
                "thinkpad_screen",
                "acpi_video1",
                "mbp_backlight",
+               "apple_backlight",
                "acpi_video0",
                "fujitsu-laptop",
                "sony",

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
  2011-01-11 16:42   ` mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1) Mourad De Clerck
@ 2011-01-11 16:48     ` Matthew Garrett
  2011-01-11 17:05       ` Richard Hughes
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2011-01-11 16:48 UTC (permalink / raw)
  To: Mourad De Clerck
  Cc: Andrew Morton, Richard Purdie, linux-kernel, Richard Hughes

On Tue, Jan 11, 2011 at 05:42:12PM +0100, Mourad De Clerck wrote:
> A bit late, but I tested this patch series and it works for me.
> 
> The only slight change is that gnome-power-manager needs to be updated
> to use /sys/class/backlight/apple_backlight instead of mbp_backlight.

gnome-power-manager needs not to have a hardcoded list of backlights. 
Richard?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
  2011-01-11 16:48     ` Matthew Garrett
@ 2011-01-11 17:05       ` Richard Hughes
  2011-01-11 18:07         ` mbp_nvidia_bl: Remove DMI dependency Mourad De Clerck
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Hughes @ 2011-01-11 17:05 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Mourad De Clerck, Andrew Morton, Richard Purdie, linux-kernel,
	Richard Hughes

On 11 January 2011 16:48, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Tue, Jan 11, 2011 at 05:42:12PM +0100, Mourad De Clerck wrote:
>> A bit late, but I tested this patch series and it works for me.
>>
>> The only slight change is that gnome-power-manager needs to be updated
>> to use /sys/class/backlight/apple_backlight instead of mbp_backlight.
>
> gnome-power-manager needs not to have a hardcoded list of backlights.

It's only uses the PolicyKit-enabled utility if there is no XBACKLIGHT
driver support. The list is put there as for a long time people had
multiple backlights, where, for instance thinkpad_screen worked but
not acpi_video1.

If the named backlight file isn't present in the override list, then
we just use the first one in /sys/class/backlight

Mourad, how many devices do you have in /sys/class/backlight?

Richard.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mbp_nvidia_bl: Remove DMI dependency
  2011-01-11 17:05       ` Richard Hughes
@ 2011-01-11 18:07         ` Mourad De Clerck
  0 siblings, 0 replies; 6+ messages in thread
From: Mourad De Clerck @ 2011-01-11 18:07 UTC (permalink / raw)
  To: Richard Hughes
  Cc: Matthew Garrett, Andrew Morton, Richard Purdie, linux-kernel,
	Richard Hughes

On 11/01/11 18:05, Richard Hughes wrote:
>>> The only slight change is that gnome-power-manager needs to be updated
>>> to use /sys/class/backlight/apple_backlight instead of mbp_backlight.
>>
>> gnome-power-manager needs not to have a hardcoded list of backlights.
> 
> Mourad, how many devices do you have in /sys/class/backlight?

I have two: nv_backlight and mbp_backlight (now apple_backlight). The
trouble is that nouveau's nv_backlight is broken on my hardware (NVAF).

(I think it's this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=625171 - max_brightness is
wrong)

When I remove nv_backlight completely and just have apple_backlight,
g-p-m works properly. When they're both there, g-p-m prefers nv_backlight.

-- Mourad

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-11 18:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-24  8:49 [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1 Mourad De Clerck
2011-01-04 22:36 ` Andrew Morton
2011-01-11 16:42   ` mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1) Mourad De Clerck
2011-01-11 16:48     ` Matthew Garrett
2011-01-11 17:05       ` Richard Hughes
2011-01-11 18:07         ` mbp_nvidia_bl: Remove DMI dependency Mourad De Clerck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).