From: Hans de Goede <hdegoede@redhat.com>
To: Arvid Norlander <lkml@vorpal.se>, linux-acpi@vger.kernel.org
Cc: "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 1/1] ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
Date: Mon, 29 Aug 2022 16:12:05 +0200 [thread overview]
Message-ID: <9640be14-b478-5887-9057-de2796eccd6b@redhat.com> (raw)
In-Reply-To: <91260f39-27d9-222b-53e7-41ab4bb412a3@redhat.com>
Hi,
On 8/27/22 15:49, Hans de Goede wrote:
> hI,
>
> On 8/27/22 13:23, Arvid Norlander wrote:
>> Hi,
>>
>> On 2022-08-26 13:46, Hans de Goede wrote:
>>> Hi All,
>>>
>>> [...]
>>>
>>> Arvid, I wonder if instead of using disable_backlight_sysfs_if
>>> you can try:
>>>
>>> 0. Remove disable_backlight_sysfs_if from cmdline / quirk
>>> 1. Adding acpi_backlight=native to the kernel commandline
>>> 2. In toshiba_acpi_resume() add a HCI_PANEL_POWER_ON PANEL_ON
>>>
>>> and see if that also fixes things ?
>>>
>> Yes, this works.
>
> Great, thank you for testing this!
>
> In hindsight the disable_backlight_sysfs_if flag was a mistake
> and I should have fixed this differently (I wrote the code adding
> that flag). And now it is sorta getting in the way of cleaning
> up the backlight handling. So IMHO removing disable_backlight_sysfs_if
> is the best thing to do here.
>
>> I do not have a patch for this (I assume it
>> would involve creating quirk tables, checking for support for
>> HCI_PANEL_POWER_ON, etc). I simply hard coded the call in for
>> the test. I very much doubt I will have time to code this in
>> the near future as well.
>
> No problem I will prepare a patch series for you to test. Note
> this will be on top of my other backlight cleanups, so I
> will just send you an email pointing to a git branch to test,
> I hope this will be ok?
Arvid, here is a git branch with my backlight-refactor for you
to test:
https://github.com/jwrdegoede/linux-sunxi/commits/backlight-refactor-for-arvid
If you can give this a test spin (without any special kernel
commandline options) then that would be great.
>> However, do we know what the other Toshiba's that need this
>> quirk also supports HCI_PANEL_POWER_ON? I obviously can only
>> test the Z830 that I own.
>
> It seems that all models which need this are all from the same
> generation so I would expect the same fix to work. If I get
> regression reports from users after my cleanup series lands
> I can then take a closer look at the DSDT tables of the
> other models if necessary.
Quick update on this I've taken a look at the DSTD's _BCM method
which is the magic call done by acpi_video on resume which
turns the panel back on and in both a R700 as well as a R830
it ends up doing this:
SMBR (0xFF00, 0x2A, Local0, 0x00, 0xB2)
Which translates to:
HCI_SET HCI_BRIGHTNESS <brightness-level>
Note that in this case brightness-level used by the acpi_video
code is the initial brightness at power-on since acpi_video
is not used to actually control the brightness.
Which makes using HCI_PANEL_POWER_ON a better idea since
that does not touches the brightness.
So I believe that replacing disable_backlight_sysfs_if with
a HCI call by toshiba_acpi on resume should work on all
affected models.
Regards,
Hans
next prev parent reply other threads:[~2022-08-29 14:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 18:49 [PATCH 0/1] Fix backlight control on Toshiba Satellite Z830 Arvid Norlander
2022-08-24 18:49 ` [PATCH 1/1] ACPI: video: Add Toshiba Satellite/Portege Z830 quirk Arvid Norlander
2022-08-24 21:14 ` Hans de Goede
2022-08-26 11:46 ` Hans de Goede
2022-08-27 11:23 ` Arvid Norlander
2022-08-27 13:49 ` Hans de Goede
2022-08-29 14:12 ` Hans de Goede [this message]
2022-08-29 18:30 ` Arvid Norlander
2022-08-29 18:58 ` Hans de Goede
2022-08-31 13:44 ` Arvid Norlander
2022-09-01 10:42 ` Hans de Goede
2022-09-01 14:15 ` Arvid Norlander
2022-09-01 15:03 ` Hans de Goede
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=9640be14-b478-5887-9057-de2796eccd6b@redhat.com \
--to=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lkml@vorpal.se \
--cc=rafael@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