Re: [PATCH] Added backlight driver for Acer Aspire 4736

26 messages, 3 authors, 2012-03-23 · open the first message on its own page

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Matthew Garrett <hidden>
Date: 2012-03-13 13:35:08

On Tue, Mar 13, 2012 at 06:56:16PM +0530, Pradeep Subrahmanion wrote:
I tried giving acpi_backlight = vendor . In that case hot key for
brightness control is working. But i think  , it is not calculating the
correct value for brightness because increasing brightness after maximum
level gives blank screen .
Which backlight device appears then?
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does 
nothing?

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

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-13 15:48:41

On Tue, 2012-03-13 at 13:34 +0000, Matthew Garrett wrote:
On Tue, Mar 13, 2012 at 06:56:16PM +0530, Pradeep Subrahmanion wrote:
quoted
I tried giving acpi_backlight = vendor . In that case hot key for
brightness control is working. But i think  , it is not calculating the
correct value for brightness because increasing brightness after maximum
level gives blank screen .
Which backlight device appears then?
'intel_backlight' appears when i gave option acpi_backlight = vendor. Writing to /sys/class/backlight/intel_backlight/brightness

does not cause any change in brightness.
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does 
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages , 

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi. 

I also tried writing directly to Embedded controller register .But no
change.

----

Thanks , 

Pradeep Subrahmanion
  

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-13 23:14:48

Hi Pradeep, 

於 二,2012-03-13 於 21:24 -0400,Pradeep Subrahmanion 提到:
On Tue, 2012-03-13 at 13:34 +0000, Matthew Garrett wrote:
quoted
On Tue, Mar 13, 2012 at 06:56:16PM +0530, Pradeep Subrahmanion wrote:
quoted
I tried giving acpi_backlight = vendor . In that case hot key for
brightness control is working. But i think  , it is not calculating the
correct value for brightness because increasing brightness after maximum
level gives blank screen .
Which backlight device appears then?
'intel_backlight' appears when i gave option acpi_backlight = vendor. Writing to /sys/class/backlight/intel_backlight/brightness

does not cause any change in brightness.
The above command not work, that means EC didn't change backlight
value:

Method (_BCM, 1, NotSerialized)
{
    Divide (Arg0, 0x0A, Local0, Local1)
    Decrement (Local1)
    Store (Local1, ^^^^LPC.EC0.BRTS)    <== write backlight value to EC
register
}

Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.

Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does 
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages , 

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi. 
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
----

Thanks , 

Pradeep Subrahmanion
  

Thanks a lot!
Joey Lee

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-14 02:43:57

Hi Joey , 
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ? 
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does 
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages , 

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi. 
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks , 

Pradeep Subrahmanion

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-14 05:53:01

於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
Hi Joey , 
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ? 
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
        If (LEqual (Arg0, One))
        {
            Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
            Or (BCLP, 0x80000000, BCLP)		<== touch BCLP register
            Store (0x02, ASLC)
        }

    Method (_BCM, 1, NotSerialized)
    {
        If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
        {
            AINT (One, Arg0)     <== call AINT method
            Store (Arg0, BRTL)
        }
    }


Just for reference, they should do that when EC didn't wire to
backlight. 
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does 
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages , 

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi. 
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks , 

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.


Thanks
Joey Lee

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-14 06:17:12

On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-15 08:07:35

Hi Pradeep, 

於 三,2012-03-14 於 11:47 +0530,Pradeep Subrahmanion 提到:
On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
quoted
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
quoted
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
That will be better leave LBB register only touched by i915 driver.

If 'acpi_backlight=vendor' works to you, maybe we can add a quirk to
video_detect.c. 
You can try the following patch.


Thanks a lot!
Joey Lee


From 038bd3c4e53b7195f34e9d46c999b8dcb279da5e Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Thu, 15 Mar 2012 16:03:45 +0800
Subject: [PATCH] acer-wmi: Add quirk table for video backlight vendor mode

Add quirk table for video backlight vendor mode

Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
---
 drivers/acpi/video_detect.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f3f0fe7..acb15d6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,32 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 	return AE_OK;
 }
 
+static int video_set_backlight_vendor(const struct dmi_system_id *d)
+{
+	acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer Aspire 4736",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer TravelMate 4750",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /*
  * Returns the video capabilities of a specific ACPI graphics device
  *
@@ -164,6 +190,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
 		 *		ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
 		 *}
 		 */
+		dmi_check_system(video_vendor_dmi_table);
 	} else {
 		status = acpi_bus_get_device(graphics_handle, &tmp_dev);
 		if (ACPI_FAILURE(status)) {
-- 
1.7.7


Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-18 05:12:47

On Thu, 2012-03-15 at 16:05 +0800, joeyli wrote:
Hi Pradeep, 

於 三,2012-03-14 於 11:47 +0530,Pradeep Subrahmanion 提到:
quoted
On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
quoted
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
quoted
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
That will be better leave LBB register only touched by i915 driver.

If 'acpi_backlight=vendor' works to you, maybe we can add a quirk to
video_detect.c. 
You can try the following patch.
Thanks . I tried your patch .acpi_backlight=vendor allows me to control
brightness with hot key.But there are problems with it like increasing
brightness after  maximum level causes blank screen.So I am trying it
sort it out.
 
Thank you , 

Pradeep Subrahmanion
quoted hunk

Thanks a lot!
Joey Lee

quoted
From 038bd3c4e53b7195f34e9d46c999b8dcb279da5e Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Thu, 15 Mar 2012 16:03:45 +0800
Subject: [PATCH] acer-wmi: Add quirk table for video backlight vendor mode

Add quirk table for video backlight vendor mode

Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
---
 drivers/acpi/video_detect.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f3f0fe7..acb15d6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,32 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 	return AE_OK;
 }
 
+static int video_set_backlight_vendor(const struct dmi_system_id *d)
+{
+	acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer Aspire 4736",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer TravelMate 4750",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /*
  * Returns the video capabilities of a specific ACPI graphics device
  *
@@ -164,6 +190,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
 		 *		ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
 		 *}
 		 */
+		dmi_check_system(video_vendor_dmi_table);
 	} else {
 		status = acpi_bus_get_device(graphics_handle, &tmp_dev);
 		if (ACPI_FAILURE(status)) {

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-18 05:13:32

On Thu, 2012-03-15 at 16:05 +0800, joeyli wrote:
Hi Pradeep, 

於 三,2012-03-14 於 11:47 +0530,Pradeep Subrahmanion 提到:
quoted
On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
quoted
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
quoted
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
That will be better leave LBB register only touched by i915 driver.

If 'acpi_backlight=vendor' works to you, maybe we can add a quirk to
video_detect.c. 
You can try the following patch.
Thanks . I tried your patch .acpi_backlight=vendor allows me to control
brightness with hot key.But there are problems with it like increasing
brightness after  maximum level causes blank screen.So I am trying it
sort it out.
 
Thank you , 

Pradeep Subrahmanion
quoted hunk

Thanks a lot!
Joey Lee

quoted
From 038bd3c4e53b7195f34e9d46c999b8dcb279da5e Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Thu, 15 Mar 2012 16:03:45 +0800
Subject: [PATCH] acer-wmi: Add quirk table for video backlight vendor mode

Add quirk table for video backlight vendor mode

Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
---
 drivers/acpi/video_detect.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f3f0fe7..acb15d6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,32 @@ find_video(acpi_handle handle, u32 lvl, void *context, void **rv)
 	return AE_OK;
 }
 
+static int video_set_backlight_vendor(const struct dmi_system_id *d)
+{
+	acpi_video_support |= ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer Aspire 4736",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+	 .callback = video_set_backlight_vendor,
+	 .ident = "Acer TravelMate 4750",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /*
  * Returns the video capabilities of a specific ACPI graphics device
  *
@@ -164,6 +190,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
 		 *		ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
 		 *}
 		 */
+		dmi_check_system(video_vendor_dmi_table);
 	} else {
 		status = acpi_bus_get_device(graphics_handle, &tmp_dev);
 		if (ACPI_FAILURE(status)) {

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-19 02:03:44

於 日,2012-03-18 於 10:40 +0530,Pradeep Subrahmanion 提到:
On Thu, 2012-03-15 at 16:05 +0800, joeyli wrote:
quoted
Hi Pradeep, 

於 三,2012-03-14 於 11:47 +0530,Pradeep Subrahmanion 提到:
quoted
On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
quoted
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
quoted
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
That will be better leave LBB register only touched by i915 driver.

If 'acpi_backlight=vendor' works to you, maybe we can add a quirk to
video_detect.c. 
You can try the following patch.
Thanks . I tried your patch .acpi_backlight=vendor allows me to control
brightness with hot key.But there are problems with it like increasing
OK, thanks for your testing, I will send out patch and add Cc. to you.
brightness after  maximum level causes blank screen.So I am trying it
sort it out.
 
Thank you , 

Pradeep Subrahmanion
For the maximum level causes blank screen...

Please kindly help to identify which driver handle the brightness
change, run the following 2 commands:

# echo 5 > /sys/class/backlight/acer-wmi/brightness 
# echo 5 > /sys/class/backlight/intel_backlight/brightness 

Which one works to change brightness on your machine?


Thanks a lot!
Joey Lee

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-19 17:03:33

For the maximum level causes blank screen...

Please kindly help to identify which driver handle the brightness
change, run the following 2 commands:

# echo 5 > /sys/class/backlight/acer-wmi/brightness 
# echo 5 > /sys/class/backlight/intel_backlight/brightness 

Which one works to change brightness on your machine?
	Both  of them do not work for me.Only hot keys are working. 

Writing to /sys/class/backlight/acer-wmi/brightness 

and /sys/class/backlight/intel_backlight/brightness do not cause any 

change in brightness.


Regards , 

Pradeep Subrahmanion

Thanks a lot!
Joey Lee


Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-20 03:57:29

Hi Pradeep, 

於 一,2012-03-19 於 17:03 +0530,Pradeep Subrahmanion 提到:
quoted
For the maximum level causes blank screen...

Please kindly help to identify which driver handle the brightness
change, run the following 2 commands:

# echo 5 > /sys/class/backlight/acer-wmi/brightness 
# echo 5 > /sys/class/backlight/intel_backlight/brightness 

Which one works to change brightness on your machine?
	Both  of them do not work for me.Only hot keys are working. 

Writing to /sys/class/backlight/acer-wmi/brightness 

and /sys/class/backlight/intel_backlight/brightness do not cause any 

change in brightness.


Regards , 

Pradeep Subrahmanion
A bit strange...

Could you please paste your /proc/cmdline ? Did you add
acpi_osi="Linux" ?


Thanks a lot!
Joey Lee

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-20 11:11:20

於 一,2012-03-19 於 10:01 +0800,joeyli 提到:
於 日,2012-03-18 於 10:40 +0530,Pradeep Subrahmanion 提到:
quoted
On Thu, 2012-03-15 at 16:05 +0800, joeyli wrote:
quoted
Hi Pradeep, 

於 三,2012-03-14 於 11:47 +0530,Pradeep Subrahmanion 提到:
quoted
On Wed, Mar 14, 2012 at 11:21 AM, joeyli [off-list ref] wrote:
quoted
於 三,2012-03-14 於 08:13 +0530,Pradeep Subrahmanion 提到:
quoted
Hi Joey ,
quoted
Per my understood, EC firmware should change brightness but didn't do
that, another
way is touch i915 register in _BCM.
  how do we do this ? you mean change the _BCM implementation ?
"BIOS guy" should do something like this:

 Method (AINT, 2, NotSerialized)
{
...
       If (LEqual (Arg0, One))
       {
           Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP)
           Or (BCLP, 0x80000000, BCLP)         <== touch BCLP register
           Store (0x02, ASLC)
       }

   Method (_BCM, 1, NotSerialized)
   {
       If (LAnd (LGreaterEqual (Arg0, Zero), LLessEqual (Arg0, 0x64)))
       {
           AINT (One, Arg0)     <== call AINT method
           Store (Arg0, BRTL)
       }
   }


Just for reference, they should do that when EC didn't wire to
backlight.
quoted
quoted
Acer machine provide a broken _BCM implementation and they didn't test
it.
quoted
quoted
quoted
By ' ACPI interface' , I mean 'acpi_video0' inside the
/sys/class/backlight. I havn't tried the /sys/class/backlight interface
directly . I will try that also.
So writing values into /sys/class/backlight/acpi_video0/brightness does
nothing?

No change in value when writing
to /sys/class/backlight/acpi_video0/brightness.

Another thing is that when i did boot with acpi_backlight = 'acer_wmi' ,
in new kernel (3.3.0-rc7) , it shows following messages ,

[    8.350825] wmi: Mapper loaded
[   10.363975] acer_wmi: Acer Laptop ACPI-WMI Extras
[   10.396186] acer_wmi: Function bitmap for Communication Device: 0x91
[   10.396385] acer_wmi: Brightness must be controlled by generic video
driver

Also there was no interface inside /sys/class/backlight for acer_wmi.
Yes, acer_wmi support backlight control with AMW0 interface, your
machine didn't have AMW0 interface.

Normally, backlight should control by standard acpi interface.
quoted
I also tried writing directly to Embedded controller register .But no
change.
The machine has broken _BCM method, because EC should do something after
_BCM changed EC register.
Thanks ,

Pradeep Subrahmanion
Why they didn't find _BCM not work?

My guess is:

Because the backlight control is through WDDM driver on Windows platform
but not through standard ACPI method _BCM. They only test Windows
platform, so, they didn't find _BCM broken.

And, they also didn't really follow Microsoft WDDM spec:

 http://msdn.microsoft.com/en-us/windows/hardware/gg487382.aspx

Per spec,
ODM should keep _BCM works fine for any other OS didn't support WDDM
driver, but they didn't.

At last year, I told Acer PM one time for this issue, they said will
check but finally didn't response me.
quoted
Thanks
Joey Lee
So touching the PCI LBB register is the only feasible solution now
(even though it may not be a clean  method) ?

Thanks,
Pradeep Subrahmanion
That will be better leave LBB register only touched by i915 driver.

If 'acpi_backlight=vendor' works to you, maybe we can add a quirk to
video_detect.c. 
You can try the following patch.
Thanks . I tried your patch .acpi_backlight=vendor allows me to control
brightness with hot key.But there are problems with it like increasing
OK, thanks for your testing, I will send out patch and add Cc. to you.
Could you please kindly try this new patch? I follow Matthew's kindly
suggestion put the quirk table to acer-wmi driver.

Please help to apply the following patch to acer-wmi and remember remove
my last patch of video_detect.c, then rebuild your kernel.

Hope this patch also can fix your problem.


Thanks a lot!
Joey Lee

From 5da43d2ee6c87dcf17fda34f0b50fe11b04a16bf Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Tue, 20 Mar 2012 19:00:58 +0800
Subject: [PATCH] acer-wmi: add quirk table for video backlight vendor mode

There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/Kconfig    |    4 ++++
 drivers/platform/x86/acer-wmi.c |   38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 15dbd8c..fe3a494 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -26,6 +26,10 @@ config ACER_WMI
 	depends on RFKILL || RFKILL = n
 	depends on ACPI_WMI
 	select INPUT_SPARSEKMAP
+	# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
+	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+        select VIDEO_OUTPUT_CONTROL if ACPI
+        select ACPI_VIDEO if ACPI
 	---help---
 	  This is a driver for newer Acer (and Wistron) laptops. It adds
 	  wireless radio and bluetooth control, and on some laptops,
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 1e5290b..984a7b5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -43,6 +43,7 @@
 #include <linux/input/sparse-keymap.h>
 
 #include <acpi/acpi_drivers.h>
+#include <acpi/video.h>
 
 MODULE_AUTHOR("Carlos Corbacho");
 MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver");
@@ -478,6 +479,33 @@ static struct dmi_system_id acer_quirks[] = {
 	{}
 };
 
+static int video_set_backlight_video_vendor(const struct dmi_system_id *d)
+{
+	interface->capability &= ~ACER_CAP_BRIGHTNESS;
+	pr_info("Brightness must be controlled by generic video driver\n");
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer Aspire 4736",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer TravelMate 4750",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /* Find which quirks are needed for a particular vendor/ model pair */
 static void find_quirks(void)
 {
@@ -1981,9 +2009,13 @@ static int __init acer_wmi_init(void)
 	set_quirks();
 
 	if (acpi_video_backlight_support()) {
-		interface->capability &= ~ACER_CAP_BRIGHTNESS;
-		pr_info("Brightness must be controlled by "
-		       "generic video driver\n");
+		if (dmi_check_system(video_vendor_dmi_table)) {
+			acpi_video_unregister();
+		} else {
+			interface->capability &= ~ACER_CAP_BRIGHTNESS;
+			pr_info("Brightness must be controlled by "
+				"acpi video driver\n");
+		}
 	}
 
 	if (wmi_has_guid(WMID_GUID3)) {
-- 
1.7.7


Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-20 18:54:49

quoted hunk
quoted
From 5da43d2ee6c87dcf17fda34f0b50fe11b04a16bf Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Tue, 20 Mar 2012 19:00:58 +0800
Subject: [PATCH] acer-wmi: add quirk table for video backlight vendor mode

There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/Kconfig    |    4 ++++
 drivers/platform/x86/acer-wmi.c |   38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 15dbd8c..fe3a494 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -26,6 +26,10 @@ config ACER_WMI
 	depends on RFKILL || RFKILL = n
 	depends on ACPI_WMI
 	select INPUT_SPARSEKMAP
+	# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
+	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+        select VIDEO_OUTPUT_CONTROL if ACPI
+        select ACPI_VIDEO if ACPI
 	---help---
 	  This is a driver for newer Acer (and Wistron) laptops. It adds
 	  wireless radio and bluetooth control, and on some laptops,
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 1e5290b..984a7b5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -43,6 +43,7 @@
 #include <linux/input/sparse-keymap.h>
 
 #include <acpi/acpi_drivers.h>
+#include <acpi/video.h>
 
 MODULE_AUTHOR("Carlos Corbacho");
 MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver");
@@ -478,6 +479,33 @@ static struct dmi_system_id acer_quirks[] = {
 	{}
 };
 
+static int video_set_backlight_video_vendor(const struct dmi_system_id *d)
+{
+	interface->capability &= ~ACER_CAP_BRIGHTNESS;
+	pr_info("Brightness must be controlled by generic video driver\n");
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer Aspire 4736",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer TravelMate 4750",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /* Find which quirks are needed for a particular vendor/ model pair */
 static void find_quirks(void)
 {
@@ -1981,9 +2009,13 @@ static int __init acer_wmi_init(void)
 	set_quirks();
 
 	if (acpi_video_backlight_support()) {
-		interface->capability &= ~ACER_CAP_BRIGHTNESS;
-		pr_info("Brightness must be controlled by "
-		       "generic video driver\n");
+		if (dmi_check_system(video_vendor_dmi_table)) {
+			acpi_video_unregister();
+		} else {
+			interface->capability &= ~ACER_CAP_BRIGHTNESS;
+			pr_info("Brightness must be controlled by "
+				"acpi video driver\n");
+		}
 	}
 
 	if (wmi_has_guid(WMID_GUID3)) {
I tried out applied your patch . Boot message shows , 

[11.220410] acer_wmi: Brightness must be controlled by generic video
driver

Now 'acpi_video0' and 'intel_backlight' are present
inside /sys/class/backlight .Hot key works like earlier ( ie problem
after maximum level still exists).
I tried following commands , 

echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDð197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-21 03:02:45

於 三,2012-03-21 於 00:25 +0530,Pradeep Subrahmanion �到:
quoted
quoted
From 5da43d2ee6c87dcf17fda34f0b50fe11b04a16bf Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Tue, 20 Mar 2012 19:00:58 +0800
Subject: [PATCH] acer-wmi: add quirk table for video backlight vendor mode

There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/Kconfig    |    4 ++++
 drivers/platform/x86/acer-wmi.c |   38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 15dbd8c..fe3a494 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -26,6 +26,10 @@ config ACER_WMI
 	depends on RFKILL || RFKILL = n
 	depends on ACPI_WMI
 	select INPUT_SPARSEKMAP
+	# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
+	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+        select VIDEO_OUTPUT_CONTROL if ACPI
+        select ACPI_VIDEO if ACPI
 	---help---
 	  This is a driver for newer Acer (and Wistron) laptops. It adds
 	  wireless radio and bluetooth control, and on some laptops,
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 1e5290b..984a7b5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -43,6 +43,7 @@
 #include <linux/input/sparse-keymap.h>
 
 #include <acpi/acpi_drivers.h>
+#include <acpi/video.h>
 
 MODULE_AUTHOR("Carlos Corbacho");
 MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver");
@@ -478,6 +479,33 @@ static struct dmi_system_id acer_quirks[] = {
 	{}
 };
 
+static int video_set_backlight_video_vendor(const struct dmi_system_id *d)
+{
+	interface->capability &= ~ACER_CAP_BRIGHTNESS;
+	pr_info("Brightness must be controlled by generic video driver\n");
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer Aspire 4736",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer TravelMate 4750",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /* Find which quirks are needed for a particular vendor/ model pair */
 static void find_quirks(void)
 {
@@ -1981,9 +2009,13 @@ static int __init acer_wmi_init(void)
 	set_quirks();
 
 	if (acpi_video_backlight_support()) {
-		interface->capability &= ~ACER_CAP_BRIGHTNESS;
-		pr_info("Brightness must be controlled by "
-		       "generic video driver\n");
+		if (dmi_check_system(video_vendor_dmi_table)) {
+			acpi_video_unregister();
+		} else {
+			interface->capability &= ~ACER_CAP_BRIGHTNESS;
+			pr_info("Brightness must be controlled by "
+				"acpi video driver\n");
+		}
 	}
 
 	if (wmi_has_guid(WMID_GUID3)) {
I tried out applied your patch . Boot message shows , 

[11.220410] acer_wmi: Brightness must be controlled by generic video
driver

Now 'acpi_video0' and 'intel_backlight' are present
inside /sys/class/backlight .Hot key works like earlier ( ie problem
after maximum level still exists).
I tried following commands , 
It's not the expected behavior.

This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?


Thanks a lot!
Joey Lee


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-21 19:13:13

On Wed, 2012-03-21 at 11:00 +0800, joeyli wrote:
於 三,2012-03-21 於 00:25 +0530,Pradeep Subrahmanion �到:
quoted
quoted
quoted
From 5da43d2ee6c87dcf17fda34f0b50fe11b04a16bf Mon Sep 17 00:00:00 2001
From: "Lee, Chun-Yi" <jlee@suse.com>
Date: Tue, 20 Mar 2012 19:00:58 +0800
Subject: [PATCH] acer-wmi: add quirk table for video backlight vendor mode

There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
---
 drivers/platform/x86/Kconfig    |    4 ++++
 drivers/platform/x86/acer-wmi.c |   38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 15dbd8c..fe3a494 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -26,6 +26,10 @@ config ACER_WMI
 	depends on RFKILL || RFKILL = n
 	depends on ACPI_WMI
 	select INPUT_SPARSEKMAP
+	# Acer WMI depends on ACPI_VIDEO when ACPI is enabled
+	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
+        select VIDEO_OUTPUT_CONTROL if ACPI
+        select ACPI_VIDEO if ACPI
 	---help---
 	  This is a driver for newer Acer (and Wistron) laptops. It adds
 	  wireless radio and bluetooth control, and on some laptops,
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 1e5290b..984a7b5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -43,6 +43,7 @@
 #include <linux/input/sparse-keymap.h>
 
 #include <acpi/acpi_drivers.h>
+#include <acpi/video.h>
 
 MODULE_AUTHOR("Carlos Corbacho");
 MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver");
@@ -478,6 +479,33 @@ static struct dmi_system_id acer_quirks[] = {
 	{}
 };
 
+static int video_set_backlight_video_vendor(const struct dmi_system_id *d)
+{
+	interface->capability &= ~ACER_CAP_BRIGHTNESS;
+	pr_info("Brightness must be controlled by generic video driver\n");
+	return 0;
+}
+
+static const struct dmi_system_id video_vendor_dmi_table[] = {
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer Aspire 4736",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 4736"),
+		},
+	},
+	{
+		.callback = video_set_backlight_video_vendor,
+		.ident = "Acer TravelMate 4750",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
+		},
+	},
+	{}
+};
+
 /* Find which quirks are needed for a particular vendor/ model pair */
 static void find_quirks(void)
 {
@@ -1981,9 +2009,13 @@ static int __init acer_wmi_init(void)
 	set_quirks();
 
 	if (acpi_video_backlight_support()) {
-		interface->capability &= ~ACER_CAP_BRIGHTNESS;
-		pr_info("Brightness must be controlled by "
-		       "generic video driver\n");
+		if (dmi_check_system(video_vendor_dmi_table)) {
+			acpi_video_unregister();
+		} else {
+			interface->capability &= ~ACER_CAP_BRIGHTNESS;
+			pr_info("Brightness must be controlled by "
+				"acpi video driver\n");
+		}
 	}
 
 	if (wmi_has_guid(WMID_GUID3)) {
I tried out applied your patch . Boot message shows , 

[11.220410] acer_wmi: Brightness must be controlled by generic video
driver

Now 'acpi_video0' and 'intel_backlight' are present
inside /sys/class/backlight .Hot key works like earlier ( ie problem
after maximum level still exists).
I tried following commands , 
It's not the expected behavior.

This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?


quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?


Thanks a lot!
Joey Lee
Thanks , 

Pradeep Subrahmanion

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-22 01:35:56

於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?


Thanks a lot!
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-22 02:33:33

On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .

Thanks a lot!
Joey Lee
Thanks , 

Pradeep Subrahmanion


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-22 03:27:21

於 四,2012-03-22 於 08:03 +0530,Pradeep Subrahmanion �到:
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?


thanks
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-22 03:31:35

On Thu, 2012-03-22 at 11:25 +0800, joeyli wrote:
於 四,2012-03-22 於 08:03 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?
  
   It was Windows XP.

thanks
Joey Lee
Thanks , 

Pradeep Subrahmanion


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-22 03:56:47

於 四,2012-03-22 於 09:02 +0530,Pradeep Subrahmanion �到:
On Thu, 2012-03-22 at 11:25 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 08:03 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And, 
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness 
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change . 

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control 

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives , 

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux 


Thanks , 

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?
  
   It was Windows XP.
The WDDM driver didn't support by Windows XP, the brightness control on
XP should works with _BCM or OpRegion.

Wonder how does brightness control work on XP with your machine.

I will dig more in your dsdt...


Thanks
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-22 05:56:05

From acer acpi ,I came to know that the 4730 series uses new wmi interface .

http://code.google.com/p/aceracpi/wiki/SupportedHardware

Thanks ,

Pradeep Subrahmanion

On Thu, Mar 22, 2012 at 9:24 AM, joeyli [off-list ref] wrote:
©ó ¥|¡A2012-03-22 ©ó 09:02 +0530¡APradeep Subrahmanion ´£¨ì¡G
quoted
On Thu, 2012-03-22 at 11:25 +0800, joeyli wrote:
quoted
©ó ¥|¡A2012-03-22 ©ó 08:03 +0530¡APradeep Subrahmanion ´£¨ì¡G
quoted
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
©ó ¥|¡A2012-03-22 ©ó 00:39 +0530¡APradeep Subrahmanion ´£¨ì¡G
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And,
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change .

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives ,

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDð197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux


Thanks ,

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?
   It was Windows XP.
The WDDM driver didn't support by Windows XP, the brightness control on
XP should works with _BCM or OpRegion.

Wonder how does brightness control work on XP with your machine.

I will dig more in your dsdt...


Thanks
Joey Lee

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-22 09:36:42

於 四,2012-03-22 於 11:26 +0530,Pradeep Subrahmanion �到:
quoted
From acer acpi ,I came to know that the 4730 series uses new wmi interface .
http://code.google.com/p/aceracpi/wiki/SupportedHardware
I am not sure what is the WMIDv2, but it's not the current WMI v2 in
acer-wmi driver.
Thanks ,

Pradeep Subrahmanion

On Thu, Mar 22, 2012 at 9:24 AM, joeyli [off-list ref] wrote:
quoted
於 四,2012-03-22 於 09:02 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 11:25 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 08:03 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And,
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change .

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives ,

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux


Thanks ,

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?
   It was Windows XP.
The WDDM driver didn't support by Windows XP, the brightness control on
XP should works with _BCM or OpRegion.

Wonder how does brightness control work on XP with your machine.

I will dig more in your dsdt...
Please kindly try acpi_osi="!Windows 2006", I think it also works to
you.


Thanks
Joey Lee

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-22 16:16:57

On Thu, 2012-03-22 at 17:34 +0800, joeyli wrote:
於 四,2012-03-22 於 11:26 +0530,Pradeep Subrahmanion �到:
quoted
quoted
From acer acpi ,I came to know that the 4730 series uses new wmi interface .
http://code.google.com/p/aceracpi/wiki/SupportedHardware
I am not sure what is the WMIDv2, but it's not the current WMI v2 in
acer-wmi driver.
quoted
Thanks ,

Pradeep Subrahmanion

On Thu, Mar 22, 2012 at 9:24 AM, joeyli [off-list ref] wrote:
quoted
於 四,2012-03-22 於 09:02 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 11:25 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 08:03 +0530,Pradeep Subrahmanion �到:
quoted
On Thu, 2012-03-22 at 09:33 +0800, joeyli wrote:
quoted
於 四,2012-03-22 於 00:39 +0530,Pradeep Subrahmanion �到:
quoted
quoted
This new patch should remove acpi_video0 interface on your machine.
Please kindly provide your dmidecode:
 dmidecode > dmidecode.log

And,
please make should the patch really applied, you can do a bit change on
pr_info message by yourself.
   Sorry . I think there was some mistake . I tried the patch again. Now
I see only intel_backlight inside /sys/class/backlight. There is no
acer-wmi interface . Is this the expected behavior ? . Or am I missing
anything ?
Yes, this is the expected behavior! But, now I doubt your issue was
workaround by acpi_osi=Linux but not intel_backlight.
quoted
quoted
quoted
quoted
echo 5 > /sys/class/backlight/acpi_video0/brightness
echo 5 > /sys/class/backlight/intel_backlight/brightness

But it doesn't make any change .

In my case  , 'acpi_backlight = vendor' does not make any difference since the hot key control

already starts working with 'acpi_osi=Linux' option.

cat /proc/cmdline gives ,

BOOT_IMAGE=/boot/vmlinuz-3.3.0+
root=UUIDğ197a59-c067-4fd8-ad90-c4d721816077 ro acpi_osi=Linux


Thanks ,

Pradeep Subrahmanion
OK, that's more clearly, please remove acpi_osi=Linux then re-test, I
think the hotkey of backlight control only works with acpi_osi=Linux ?
Does your backlight control still work if you remove acpi_osi=Linux ?
   If I remove acpi_osi=Linux , the hot key control stops working .
What is the preload OS in your machine when you bought it? Windows XP,
Vista or Windows 7?
   It was Windows XP.
The WDDM driver didn't support by Windows XP, the brightness control on
XP should works with _BCM or OpRegion.

Wonder how does brightness control work on XP with your machine.

I will dig more in your dsdt...
Please kindly try acpi_osi="!Windows 2006", I think it also works to
you.
   I tried giving this option . It gives me a blank screen while
booting. Hot keys are not working .


Thanks
Joey Lee

Regards, 

Pradeep Subrahmanion.


--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: Pradeep Subrahmanion <hidden>
Date: 2012-03-23 03:36:31

On Wed, 2012-03-21 at 11:00 +0800, joeyli wrote:
think the hotkey of backlight control only works with acpi_osi=Linux ?
yes , hot key control only works with this option.Any ideas about where
the hot key events gets handled ? I tried logging inside
'acpi_video_device_notify' method in video.c . But the control does not
seem to reach here . 

Thanks, 

Pradeep Subrahmanion

Re: [PATCH] Added backlight driver for Acer Aspire 4736

From: joeyli <jlee@suse.com>
Date: 2012-03-23 04:27:48

於 五,2012-03-23 於 09:06 +0530,Pradeep Subrahmanion 提到:
On Wed, 2012-03-21 at 11:00 +0800, joeyli wrote:
quoted
think the hotkey of backlight control only works with acpi_osi=Linux ?
yes , hot key control only works with this option.Any ideas about where
the hot key events gets handled ? I tried logging inside
'acpi_video_device_notify' method in video.c . But the control does not
seem to reach here . 

Thanks, 

Pradeep Subrahmanion
Hotkey change status is through _Q11 and _Q12 event but not wmi:


    Method (_Q11, 0, NotSerialized)             /* Brightness down */
    {
        If (LGreaterEqual (OSYS, 0x07D6))       /* Vista or later */
        {
            If (LEqual (OBV, 0xFF))
            {
                Notify (^^^PEGP.VGA.LCD, 0x87)
            }
            Else
            {
                Notify (^^^OVGA.DD03, 0x87)
            }
        }
        Else                                    /* 0x07D1 (XP) or 0x03E8 (Linux) */
        {
            ^^^OVGA.AINT (One, BRTS)		/* access AINT, it touch BCLP register */
            If (LEqual (^^^WMID.BAEF, One))
            {
                Store (BRTS, Local1)
                Store (^^^WMID.LBL0, Local2)
                Add (Local2, Local1, Local2)
                Store (Local2, ^^^WMID.NTDC)
                Notify (WMID, 0x80)
            }
        }
    }

Method (AINT, 2, NotSerialized)
{
...
    Else
    {
        If (LEqual (Arg0, One))         /* Linux or XP */
        {
            Add (Arg1, One, Arg1)
            Store (Divide (Multiply (Arg1, 0xFF), 0x0A, ), BCLP)
            Or (BCLP, 0x80000000, BCLP)		/* touch BCLP register */
            Store (0x02, ASLC)
        }


That's why I said acpi_osi"!Windows 2006" should also works to you. Unfortunately,
there have something wrong in video driver for support this machine on XP mode.


thanks a lot!
Joey Lee
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help