All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
@ 2013-12-03  6:50 AceLan Kao
  2013-12-03  7:07 ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: AceLan Kao @ 2013-12-03  6:50 UTC (permalink / raw)
  To: platform-driver-x86, Matthew Garrett

The acpi_video0 interface doesn't not work on Dell Inspiron 3138,
so using the vendor brightness interface, instead of the acpi one.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/platform/x86/dell-laptop.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index c608b1d..9d2a4af 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -62,6 +62,7 @@ struct calling_interface_structure {
 
 struct quirk_entry {
 	u8 touchpad_led;
+	u8 vendor_backlight;
 };
 
 static struct quirk_entry *quirks;
@@ -70,6 +71,10 @@ static struct quirk_entry quirk_dell_vostro_v130 = {
 	.touchpad_led = 1,
 };
 
+static struct quirk_entry quirk_dell_inspiron_3138 = {
+	.vendor_backlight = 1,
+};
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
 	quirks = dmi->driver_data;
@@ -268,6 +273,15 @@ static struct dmi_system_id dell_quirks[] = {
 		},
 		.driver_data = &quirk_dell_vostro_v130,
 	},
+	{
+		.callback = dmi_matched,
+		.ident = "Dell Inspiron 3138",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 3138"),
+		},
+		.driver_data = &quirk_dell_inspiron_3138,
+	},
 	{ }
 };
 
@@ -843,6 +857,9 @@ static int __init dell_init(void)
 				    &dell_debugfs_fops);
 
 #ifdef CONFIG_ACPI
+	if (quirks && quirks->vendor_backlight)
+		acpi_video_dmi_promote_vendor();
+
 	/* In the event of an ACPI backlight being available, don't
 	 * register the platform controller.
 	 */
-- 
1.8.3.2

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

* Re: [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
  2013-12-03  6:50 [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138 AceLan Kao
@ 2013-12-03  7:07 ` Matthew Garrett
  2013-12-03  7:31   ` AceLan Kao
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2013-12-03  7:07 UTC (permalink / raw)
  To: AceLan Kao; +Cc: platform-driver-x86

On Tue, Dec 03, 2013 at 02:50:07PM +0800, AceLan Kao wrote:
> The acpi_video0 interface doesn't not work on Dell Inspiron 3138,
> so using the vendor brightness interface, instead of the acpi one.

No, this needs to be fixed properly by disabling the ACPI interface on 
Windows 8 systems.

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

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

* Re: [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
  2013-12-03  7:07 ` Matthew Garrett
@ 2013-12-03  7:31   ` AceLan Kao
  2013-12-03  7:40     ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: AceLan Kao @ 2013-12-03  7:31 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: platform-driver-x86@vger.kernel.org

Hi Matthew,

Sorry, I don't understand what you mean.

Let me explain it again.
The BIOS engineer refuse to remove the ACPI functions(_BCM) in BIOS code,
so we'll have acpi_video0 interface be created under
/sys/class/backlight/ and that interface doesn't work.
This patch is equal to add this kernel command line "acpi_backlight=vendor"
So that, there will be no acpi_video0 be create, and we will use
intel_backlight interface instead.

Best regards,
AceLan Kao.

2013/12/3 Matthew Garrett <mjg59@srcf.ucam.org>:
> On Tue, Dec 03, 2013 at 02:50:07PM +0800, AceLan Kao wrote:
>> The acpi_video0 interface doesn't not work on Dell Inspiron 3138,
>> so using the vendor brightness interface, instead of the acpi one.
>
> No, this needs to be fixed properly by disabling the ACPI interface on
> Windows 8 systems.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)

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

* Re: [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
  2013-12-03  7:31   ` AceLan Kao
@ 2013-12-03  7:40     ` Matthew Garrett
  2013-12-04  8:14       ` AceLan Kao
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Garrett @ 2013-12-03  7:40 UTC (permalink / raw)
  To: AceLan Kao; +Cc: platform-driver-x86@vger.kernel.org

On Tue, Dec 03, 2013 at 03:31:45PM +0800, AceLan Kao wrote:
> Hi Matthew,
> 
> Sorry, I don't understand what you mean.
> 
> Let me explain it again.
> The BIOS engineer refuse to remove the ACPI functions(_BCM) in BIOS code,
> so we'll have acpi_video0 interface be created under
> /sys/class/backlight/ and that interface doesn't work.
> This patch is equal to add this kernel command line "acpi_backlight=vendor"
> So that, there will be no acpi_video0 be create, and we will use
> intel_backlight interface instead.

Right. This isn't a Dell-specific problem. Windows 8 doesn't use the 
ACPI backlight interface, so any system that calls _OSI("Windows 2012") 
should use the Intel interface instead. It needs to be fixed in general, 
not in the platform drivers.

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

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

* Re: [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
  2013-12-03  7:40     ` Matthew Garrett
@ 2013-12-04  8:14       ` AceLan Kao
  2013-12-04 11:15         ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: AceLan Kao @ 2013-12-04  8:14 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: platform-driver-x86@vger.kernel.org

Hi Matthew,

I'm reading this commit
fbc9fe1 ACPI / video: Do not register backlight if win8 and native
interface exists

It does what you say above.
But, the variable use_native_backlight is false by default, and user
has to enable this by adding one kernel parameter
video.use_native_backlight=1
I don't see this do any difference with acpi_backlight=vendor as user
has to add the kernel command line explicitly to get rid of the broken
acpi_video0.

We always encourage OEM BIOS to follow the ACPI spec., if not, we'll
ask them to remove _BCL, _BCM, _BQC functions.
And Dell Inspiron 3138 is the first one that they refuse our request,
so I would like to fix it in the kernel.
I don't know if this kind of case will increase or not, but Windows
doesn't use ACPI is not from Win8, but Win7 or even earlier.
Taking into account that use_native_backlight is false by default,
that commit doesn't fix my issue, and I don't know when is the
suitable time to enable it by default in the future.
So, I think we probably need some quirks to disable acpi_video0 by the
mean while before use_native_backlight is default true.

Best regards,
AceLan Kao.

2013/12/3 Matthew Garrett <mjg59@srcf.ucam.org>:
> On Tue, Dec 03, 2013 at 03:31:45PM +0800, AceLan Kao wrote:
>> Hi Matthew,
>>
>> Sorry, I don't understand what you mean.
>>
>> Let me explain it again.
>> The BIOS engineer refuse to remove the ACPI functions(_BCM) in BIOS code,
>> so we'll have acpi_video0 interface be created under
>> /sys/class/backlight/ and that interface doesn't work.
>> This patch is equal to add this kernel command line "acpi_backlight=vendor"
>> So that, there will be no acpi_video0 be create, and we will use
>> intel_backlight interface instead.
>
> Right. This isn't a Dell-specific problem. Windows 8 doesn't use the
> ACPI backlight interface, so any system that calls _OSI("Windows 2012")
> should use the Intel interface instead. It needs to be fixed in general,
> not in the platform drivers.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)

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

* Re: [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
  2013-12-04  8:14       ` AceLan Kao
@ 2013-12-04 11:15         ` Matthew Garrett
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew Garrett @ 2013-12-04 11:15 UTC (permalink / raw)
  To: AceLan Kao; +Cc: platform-driver-x86@vger.kernel.org

On Wed, Dec 04, 2013 at 04:14:15PM +0800, AceLan Kao wrote:

> It does what you say above.
> But, the variable use_native_backlight is false by default, and user
> has to enable this by adding one kernel parameter
> video.use_native_backlight=1
> I don't see this do any difference with acpi_backlight=vendor as user
> has to add the kernel command line explicitly to get rid of the broken
> acpi_video0.

Right. The default needs to be changed.

> We always encourage OEM BIOS to follow the ACPI spec., if not, we'll
> ask them to remove _BCL, _BCM, _BQC functions.
> And Dell Inspiron 3138 is the first one that they refuse our request,
> so I would like to fix it in the kernel.

The best thing to do is to send a patch that flips the default on 
Windows 8 systems and get it pushed through the drm-next tree in order 
to work out the remaining bugs in the intel backlight driver.

> So, I think we probably need some quirks to disable acpi_video0 by the
> mean while before use_native_backlight is default true.

Sorry, I'm not adding any machine-specific quirks to fix generic 
problems.

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

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

end of thread, other threads:[~2013-12-04 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03  6:50 [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138 AceLan Kao
2013-12-03  7:07 ` Matthew Garrett
2013-12-03  7:31   ` AceLan Kao
2013-12-03  7:40     ` Matthew Garrett
2013-12-04  8:14       ` AceLan Kao
2013-12-04 11:15         ` Matthew Garrett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.