From: Hans de Goede <hdegoede@redhat.com>
To: Daniel Dadap <ddadap@nvidia.com>,
"Limonciello, Mario" <Mario.Limonciello@amd.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH] ACPI: video: Add backlight=native DMI quirk for Dell G15 5515
Date: Tue, 1 Nov 2022 10:55:49 +0100 [thread overview]
Message-ID: <c3c7ca66-979d-a5fa-a116-9fa2926a271d@redhat.com> (raw)
In-Reply-To: <Y2BKSVzCON8PZctU@lenny>
Hi,
On 10/31/22 23:20, Daniel Dadap wrote:
> On Mon, Oct 31, 2022 at 09:51:55PM +0000, Limonciello, Mario wrote:
>> [Public]
>>
>>> -----Original Message-----
>>> From: Hans de Goede <hdegoede@redhat.com>
>>> Sent: Monday, October 31, 2022 16:26
>>> To: Rafael J . Wysocki <rafael@kernel.org>
>>> Cc: Hans de Goede <hdegoede@redhat.com>; Len Brown
>>> <lenb@kernel.org>; linux-acpi@vger.kernel.org; platform-driver-
>>> x86@vger.kernel.org; Daniel Dadap <ddadap@nvidia.com>
>>> Subject: [PATCH] ACPI: video: Add backlight=native DMI quirk for Dell G15
>>> 5515
>>>
>>> The Dell G15 5515 has the WMI interface (and WMI call returns) expected
>>> by the nvidia-wmi-ec-backlight interface. But the backlight class device
>>> registered by the nvidia-wmi-ec-backlight driver does not actually work.
>>>
>>
>> Is there a way to detect this from nvidia-wmi-ec-backlight? I would think it's
>> cleaner to have that driver return -ENODEV so you end up with just the "working"
>> amdgpu_bl0.
>
> That would be ideal, although I'm not certain whether this would work
> with the new backlight control type selection model where video.ko
> determines what type of backlight interface the system is supposed to
> have. I am assuming that the below patch is against a kernel predating
> the recent changes that Hans made to rework the backlight subsystem,
> because IIUC it shouldn't be possible for both the EC backlight driver
> and the iGPU's native one to both be active at the same time. I would
> expect that without this patch, there would be no working backlight
> interfaces on this system when running a newer kernel, since
> __acpi_video_get_backlight_type() would return
> acpi_backlight_nvidia_wmi_ec, which means
> acpi_video_backlight_use_native() would return false, and the iGPU
> native driver should not be registering a brightness handler.
The reporter needs to blacklist the nvidia-wmi-ec-backlight module
because with 6.0 they otherwise get both that backlight + the native
amdgpu backlight in /sys/class/backlight and then userspace will
prefer the nvidia-wmi-ec-backlight one which according to the reporter
does not work.
You are correct that with 6.1 the issue is that the native driver
now honors the acpi_video_get_backlight_type() return and no longer
registers. This is fixed by this patch.
The good news is that with 6.1 nvidia-wmi-ec-backlight now also honors
acpi_video_get_backlight_type() so the quirk also avoids the need
to blacklist nvidia-wmi-ec-backlight and with the quirk in 6.1 everything
just works OOTB (with the current BIOS settings for the GPU mode).
Regards,
Hans
>
>>> The amdgpu_bl0 native GPU backlight class device does actually work,
>>> add a backlight=native DMI quirk for this.
>>>
>>> Cc: Daniel Dadap <ddadap@nvidia.com>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> ---
>>> drivers/acpi/video_detect.c | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
>>> index 841f6213b4de..88acc09773bb 100644
>>> --- a/drivers/acpi/video_detect.c
>>> +++ b/drivers/acpi/video_detect.c
>>> @@ -645,6 +645,16 @@ static const struct dmi_system_id
>>> video_detect_dmi_table[] = {
>>> },
>>> },
>>>
>>> + /* Models which have nvidia-ec-wmi support, but should not use it.
>>> */
>>> + {
>>> + .callback = video_detect_force_native,
>>> + /* Dell G15 5515 */
>>> + .matches = {
>>> + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>>> + DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
>>> + },
>>> + },
>>> +
>>> /*
>>> * Desktops which falsely report a backlight and which our heuristics
>>> * for this do not catch.
>>> --
>>> 2.37.3
>
next prev parent reply other threads:[~2022-11-01 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 21:25 [PATCH] ACPI: video: Add backlight=native DMI quirk for Dell G15 5515 Hans de Goede
2022-10-31 21:51 ` Limonciello, Mario
2022-10-31 22:20 ` Daniel Dadap
2022-11-01 9:55 ` Hans de Goede [this message]
2022-10-31 22:09 ` Daniel Dadap
2022-11-01 9:52 ` Hans de Goede
2022-11-01 14:47 ` Daniel Dadap
2022-11-01 14:09 ` Hans de Goede
2022-11-01 14:59 ` Daniel Dadap
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=c3c7ca66-979d-a5fa-a116-9fa2926a271d@redhat.com \
--to=hdegoede@redhat.com \
--cc=Mario.Limonciello@amd.com \
--cc=ddadap@nvidia.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--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