backlight: mbp_nvidia_bl - add support for MacBookPro7,1
Subsystems (2)
PATCH RESEND 1/1 backlight: mbp_nvidia_bl - add support for MacBookPro7,1
Add support for the MacBookPro7,1 (13" mid 2010) to the mbp_nvidia_bl driver.
--- drivers/video/backlight/mbp_nvidia_bl.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
(quoted diff) +0 -0
b/drivers/video/backlight/mbp_nvidia_bl.c
index 9fb533f..9c44314 100644
drivers/video/backlight/mbp_nvidia_bl.c +0 -0
@@ -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,
+ },
{ }
};
Quoted 19 lines · On Fri, 24 Dec 2010 09:49:57 +0100 Mourad De Clerck <[email protected]> wrote:
Add support for the MacBookPro7,1 (13" mid 2010) to the
mbp_nvidia_bldriver.Signed-off-by Mourad De Clerck <[email protected]>--- drivers/video/backlight/mbp_nvidia_bl.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)drivers/video/backlight/mbp_nvidia_bl.c +1
-0@@ -335,6 +335,15 @@ static const struct dmi_system_id __initdata mbp_device_table[] = { }, .driver_data = (void *)&nvidia_chipset_data, }, + {
drivers/video/backlight/mbp_nvidia_bl.c static const struct dmi_system_id __initdata · line 349
Quoted 10 lines
drivers/video/backlight/mbp_nvidia_bl.c +8
-0+ .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.
mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
Quoted 6 lines · Andrew Morton
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?
--
src/gpm-backlight-helper.c +1 -0
@@ -58,6 +58,7 @@ gcm_backlight_helper_get_best_backlight ()"thinkpad_screen" ,"acpi_video1" ,"mbp_backlight" , +"apple_backlight" ,"acpi_video0" ,"fujitsu-laptop" , "sony",
Re: mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
Quoted 4 lines · Mourad De Clerck
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_backlightinstead ofmbp_backlight.
gnome-power-manager needs not to have a hardcoded list of backlights. Richard?
Signature · 1 line
Matthew Garrett | [email protected]
Re: mbp_nvidia_bl: Remove DMI dependency (was: Re: [PATCH,RESEND] backlight: mbp_nvidia_bl - add support for MacBookPro7,1)
Quoted 7 lines · Matthew Garrett
Quoted 4 lines · Mourad De Clerck
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_backlightinstead ofmbp_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.
Re: mbp_nvidia_bl: Remove DMI dependency
Quoted 6 lines · Richard Hughes
Quoted 4 lines
Quoted 2 lines
The only slight change is that gnome-power-manager needs to be updated to use
/sys/class/backlight/apple_backlightinstead ofmbp_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