linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: joeyli <jlee@suse.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	Artur Flinta <aflinta@gmail.com>
Subject: Re: Fwd: Brightness on HP EliteBook 8460p
Date: Wed, 21 Mar 2012 12:16:31 +0800	[thread overview]
Message-ID: <1332303391.10557.391.camel@linux-s257.site> (raw)
In-Reply-To: <1631921.mapqS8Vd5c@pali>

於 二,2012-03-20 於 23:03 +0100,Pali Rohár 提到:
> > 
> > Another doubt is the latest statement in _BCM, it emit a BEVT event:
> > 
> > Signal (\_SB.BEVT)
> > 
> > Only HKFR(HotkeyFunctionResponse) method is waiting this event, it
> > should related to how the HP implement brightness function key on
> > Windows through wmi.
> > 
> > Of course this issue really close related to video driver, even
> > more, we might need to know hp wmi for how to implement on Windows.
> > 
> > Unfortunately, sorry for I don't have any solution to you, now, I
> > will continue to trace and find any support from other experts.
> > 
> > 
> > Thanks a lot!
> > Joey Lee
> 
> Hi!
> 
> now I found that ALS button which enable/disable ambient light sensor 
> working with linux and ALS can also decrease/increase brightness.
> 
> ALS can be enabled or disabled via WMI (acpi) on linux too. I found 
> function which enable ALS in linux kernel. See source code of function 
> set_als in hp-wmi.c: http://tomoyo.sourceforge.jp/cgi-
> bin/lxr/source/drivers/platform/x86/hp-wmi.c#L443
> 
> This function can enable ALS which can decrease brightness (but only 
> to specific one level) via WMI. And WMI is ACPI extension, so maybe it 
> is really possible to change brightness via acpi without DRI support.
> 
> But I do not WMI, ACPI and DSDT code. Can you try to decode what is 
> called in acpi when that set_als function in hp-wmi is called? I think 
> here in acpi can be some magic which can manipulate with display 
> brightness. At least ACPI must call somewhat to change brightness...
> 
> Note: Enabling ALS on my notebook change brightness to some specific 
> level and disabling ALS will revert brightness back. From userspace 
> ALS can be enabled/disabled via this sysfs entry: 
> /sys/devices/platform/hp-wmi/als
> 
> -- 
> Pali Rohár
> pali.rohar@gmail.com

Traced the your dsdt from 8460p.

Let's see "set ALS" first, when set ALS enable, BIOS didn't _eat_ any
input value for brightness level:


    Method (WHCM, 2, NotSerialized)
    {
        CreateDWordField (Arg1, 0x00, SNIN)     /* signature */
        CreateDWordField (Arg1, 0x04, COMD)     /* command = write ? 0x2 : 0x1 */
        CreateDWordField (Arg1, 0x08, CMTP)     /* commandtype */
        CreateDWordField (Arg1, 0x0C, DASI)
        Store ("HandleWMICommand Enter", Debug)
...
    If (LEqual (COMD, 0x02))            /* command write */
    {
        Store ("write BIOS command", Debug)
....
        If (LEqual (CMTP, 0x03))        /* write HPWMI_ALS_QUERY 0x3 */
        {
            Store (^WSAL (DDWD), Local2)  /* call ^WSAL and feed DDWD */
            Store (0x00, RTCD)
        }


            Method (WSAL, 1, NotSerialized)     /* write HPWMI_ALS_QUERY 0x3 */
            {
                If (LEqual (PRDT, 0x03)) 
                {
                    Return (Package (0x02)
                    {
                        0x04,
                        0x00
                    })
                }

                \_SB.SSMI (0xEA75, 0x02, 0x03, 0x574D4953, 0x00)   /* emit SMI, BIOS code take job but didn't feed Arg0 to BIOS */
                Return (WFDA ())
            }

Everything handle by BIOS function after emit SMI event, and it didn't
give BIOS any input value of brightness.
So, didn't find any way to change brightness through set ALS.


Then, I found another interesting command for 'write brightness', hp-wmi
doesn't have implementation for this command: 

        If (LEqual (CMTP, 0x06))        /* set brightness? */
        {
            Store ("write Brightness", Debug)
            Store (^SBBC (DDWD), Local2)	/* call DDWD */
            Store (Local2, Debug)
            Store (0x00, RTCD)
        }

            Method (SBBC, 1, NotSerialized)     /* write brighenss? didn't do anything? */
            {
                Return (Package (0x02)		/* just only return a package */
                {
                    0x04,
                    0x00
                })
            }


Unfortunately, the 0x06 command also doesn't do anything for change
brightness on your machine.

Sorry! Didn't find any way can change brightness on your machine unless
we have drm driver support ATI acpi events.


Thanks a lot!
Joey Lee

  reply	other threads:[~2012-03-21  4:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  3:19 Fwd: Brightness on HP EliteBook 8460p Joey Lee
2012-03-20 22:03 ` Pali Rohár
2012-03-21  4:16   ` joeyli [this message]
2012-07-28 14:47     ` Pali Rohár
2012-07-30  8:17       ` Artur Flinta
2012-07-30  9:28         ` joeyli
2012-07-31 10:29       ` Luca Tettamanti
     [not found] ` <1539163.XtGOYjTjgt@pali>
     [not found]   ` <CAKPcRGp+1DBjP7ZTnVUphtY2acdU64gGBi9VO5WG7+83revV9g@mail.gmail.com>
     [not found]     ` <3502295.b9B3oqyYO6@pali>
2012-07-31 15:49       ` Luca Tettamanti
2012-07-31 15:56         ` Alex Deucher
2012-07-31 16:03         ` Pali Rohár
2012-07-31 16:17           ` Alex Deucher
2012-08-01  7:38             ` Pali Rohár
  -- strict thread matches above, loose matches on Subject: below --
2012-02-05 13:51 Joey Lee
2012-02-05 17:49 ` Artur Flinta
2012-02-05  1:43 Joey Lee
2011-07-15 12:15 Pali Rohár
     [not found] ` <CAGB3EUSiZ+DqTwVQ4CMhT=LNAAWhj-VriiArmoibm0t+x5jLXw@mail.gmail.com>
2011-12-09 14:49   ` Fwd: " joeyli
     [not found]     ` <3404497.1txogKB5v8@pali-elitebook>
2011-12-18 10:59       ` Pali Rohár
2011-12-18 15:47         ` joeyli
2011-12-20  8:13           ` joeyli
2011-12-20 13:20             ` Pali Rohár
2011-12-21  2:16               ` joeyli
2011-12-21  4:05                 ` joeyli
     [not found]                   ` <9136713.SR1vWBOW6T@pali-elitebook>
2012-01-17 18:10                     ` Pali Rohár
2012-01-20  3:12                       ` joeyli
2012-01-20  3:28                         ` joeyli
     [not found]                           ` <2085914.rvJjIXUC3h@pali>
2012-02-03 15:24                             ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332303391.10557.391.camel@linux-s257.site \
    --to=jlee@suse.com \
    --cc=aflinta@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).