platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fwd: IdeaPad platform driver compatibility issues
       [not found] <CAMdgg_onUUGVkmAsXdBeYRDVVeT67q+zvYR1tKgh7kstwhpMhw@mail.gmail.com>
@ 2021-06-15  8:40 ` Kryštof Černý
  2021-06-15 20:38   ` Maxim Mikityanskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Kryštof Černý @ 2021-06-15  8:40 UTC (permalink / raw)
  To: platform-driver-x86, ike.pan, maxtram95

Hello,

I have a Lenovo Yoga 720-15ikb device and I have found following
issues with the IdeaPad ACPI driver:
- "fan_mode" does not work according to documentation, always returns
133 and can't be set to any other value from the documentation.
According to Maxim it worked on his old laptop, but Lenovo probably
changed it since.
- "camera_power" is always zero and can't be set to anything else.

Maxim asked me to provide a DSDT dump, so I did it:
link removed
I am willing to provide any additional information.

Best regards,
Kryštof Černý


Sorry for the resend, I am trying to send again, because I got a reply
from MDS that my email contains a SPAM/virus.

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

* Re: IdeaPad platform driver compatibility issues
  2021-06-15  8:40 ` Fwd: IdeaPad platform driver compatibility issues Kryštof Černý
@ 2021-06-15 20:38   ` Maxim Mikityanskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Mikityanskiy @ 2021-06-15 20:38 UTC (permalink / raw)
  To: Kryštof Černý; +Cc: platform-driver-x86, ike.pan

On Tue, Jun 15, 2021 at 11:40 AM Kryštof Černý <cleverline1mc@gmail.com> wrote:
>
> Hello,
>
> I have a Lenovo Yoga 720-15ikb device and I have found following
> issues with the IdeaPad ACPI driver:
> - "fan_mode" does not work according to documentation, always returns
> 133 and can't be set to any other value from the documentation.
> According to Maxim it worked on his old laptop, but Lenovo probably
> changed it since.
> - "camera_power" is always zero and can't be set to anything else.

Are you sure your device supports this functionality? I.e. do you have
fan mode control and camera power control under Windows, probably with
some driver or application by Lenovo?

>
> Maxim asked me to provide a DSDT dump, so I did it:
> link removed
> I am willing to provide any additional information.

I looked at your DSDT, specifically at this part:

Method (VPCW, 2, Serialized)
{
    If ((Arg0 == One))
    {
        VCMD = Arg1
        If ((Arg1 == 0x11))
        {
            VDAT = 0x0B
            VCMD = Zero
            Return (Zero)
        }

        If ((Arg1 == 0x13))
        {
            If ((OSYS < 0x07D6))
            {
                Local0 = VDAT /* \_SB_.PCI0.LPCB.EC0_.VDAT */
                Local0 += 0x02
                ^^^^GFX0.AINT (One, DerefOf (PLV1 [Local0]))
                Return (Zero)
            }
        }
    }
    Else
    {
        VDAT = Arg1
    }

    Return (Zero)
}

This is a method that the ideapad-laptop driver uses to control
various things like backlight, wifi, touchpad, camera, fan.

In my DSDT the VPCW method calls the XCMD method, which has more than
20 if statements for different commands. All code that handles
commands is there, for example, setting fan mode modifies the SNBT
field in the operation region of the embedded controller (EC).

Your DSDT is different. As you see, your VPCW only handles two
commands: 0x11 (read max backlight) and 0x13 (write current
backlight). However, another difference is that in your DSDT VCMD and
VDAT are defined in the operation region of the EC, so the EC itself
probably handles all the commands on your device. Which means it's
harder to reverse engineer what's going on on your device, because we
can't look at the code, so I can't really tell why the command doesn't
work for you.

I also found two interesting methods called FANG and FANW, which I
don't have in my DSDT. However, I'm not sure at all whether they are
related to the fan or not. They look like FANG is a getter, and FANW
is a setter, but the meaning of the first argument of both methods
isn't clear to me. The driver doesn't use these methods.

So, I'm sorry, but I can't really help here.

Furthermore, it would be nice if the driver could somehow detect which
features are supported by the firmware, but I can't suggest such a
mechanism either.


> Best regards,
> Kryštof Černý
>
>
> Sorry for the resend, I am trying to send again, because I got a reply
> from MDS that my email contains a SPAM/virus.

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

end of thread, other threads:[~2021-06-15 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMdgg_onUUGVkmAsXdBeYRDVVeT67q+zvYR1tKgh7kstwhpMhw@mail.gmail.com>
2021-06-15  8:40 ` Fwd: IdeaPad platform driver compatibility issues Kryštof Černý
2021-06-15 20:38   ` Maxim Mikityanskiy

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).