Hi Lyude,
Thank you for the review.
On 8/24/22 19:41, Lyude Paul wrote:
> Just one tiny nitpick below:
>
> On Wed, 2022-08-24 at 14:14 +0200, Hans de Goede wrote:
>> Before this commit when we want userspace to use the acpi_video backlight
>> device we register both the G
Hi All,
On 8/24/22 14:50, Jani Nikula wrote:
> On Wed, 24 Aug 2022, Hans de Goede wrote:
>> Before this commit when we want userspace to use the acpi_video backlight
>> device we register both the GPU's native backlight device and acpi_video's
>> firmware acp
When acpi_video_register() has not run yet the video_bus_head will be
empty, so there is no need to check the register_count flag first.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 12
1 file changed, 4 insertions(+), 8 deletions
_backlight_type() with
adding a new acpi_video_backlight_use_native() helper.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 24
include/acpi/video.h| 5 +
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git
-backlight in
drivers/acpi/video_detect.c already checks that the WMI advertised
brightness-source is the embedded controller, this new check makes it
unnecessary for nvidia_wmi_ec_backlight_probe() to check this itself.
Suggested-by: Daniel Dadap
Reviewed-by: Daniel Dadap
Signed-off-by: Hans de Goede
or when it is
disabled.
Changes in v2:
- Make register_backlight_delay a module parameter, mainly so that it can
be disabled by Nvidia binary driver users
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 50
Hi Daniel,
On 8/17/22 22:18, Daniel Dadap wrote:
> On 8/17/22 10:05 AM, Hans de Goede wrote:
>>> One further potential difficulty that I anticipate is that not all dynamic
>>> mux systems use the EC backlight driver (or a similar, GPU-agnostic
>>> driver),
factor-v4
assuming the i915 patches also pass review I hope to send out
a pull-request to all involved subsystems based on this branch soon.
Regards,
Hans
Hans de Goede (31):
ACPI: video: Add acpi_video_backlight_use_native() helper
drm/i915: Don't register backlight when another b
:
- Use WMI_BRIGHTNESS_GUID define
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/Kconfig | 1 +
drivers/acpi/video_detect.c| 37 ++
drivers/gpu/drm/gma500/Kconfig | 2 ++
drivers/gpu/drm/i915/Kconfig | 2 ++
include/acpi
add DMI quirks for those.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 19 +++
drivers/platform/x86/toshiba_acpi.c | 16
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi
because the entries using the removed wmi_backlight_power flag
also use other model specific quirks from the asus-wmi quirk_entry struct.
So the quirk_asus_x55u struct and the entries pointing to it cannot be
dropped.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi
Acked-by: Alex Deucher
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 7 +++
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c| 7 +++
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++
3 files changed, 21 insertions(+)
diff --git a/dri
backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.
Changes in v2:
- Add nouveau_acpi_video_backlight_use_native() wrapper to avoid unresolved
symbol errors on non X86
Signed-o
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 10 --
drivers/acpi/video_detect.c | 16
include/acpi/video.h| 4
3 files changed, 30 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index d1e41f30c004
Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 67a0211c07b4..af2833b57b8b 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video
necessary to monitor for a
native (BACKLIGHT_RAW) device showing up later and to then unregister
the acpi_video backlight device(s).
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 2 --
drivers/acpi/video_detect.c | 36
ries.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 53 ++
drivers/platform/x86/acer-wmi.c | 66 -
2 files changed, 53 insertions(+), 66 deletions(-)
diff --git a/drivers/acpi/video_detect.c
ssary.
Relying on the cached native_available value not only is simpler, it will
also work correctly in cases where then native backlight registration was
skipped because of acpi_video_backlight_use_native() returning false.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers
backlight device because of e.g. the firmware_flags
or the acpi_video_get_backlight_type() return value. This ensures that
if the acpi_video backlight device should be used, it will be available
before the radeon drm_device gets registered with userspace.
Acked-by: Alex Deucher
Signed-off-by: Hans de
backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/i915/display/intel_backlight.c | 7 +++
1 file changed, 7 insertions(+)
Hi,
On 8/24/22 14:47, Jani Nikula wrote:
> On Wed, 24 Aug 2022, Hans de Goede wrote:
>> On machins without an i915 opregion the acpi_video driver immediately
>> probes the ACPI video bus and used to also immediately register
>> acpi_video# backlight devices when supported.
&
he addition of the acpi_video_get_backlight_type() != native check.
Removing this should be ok now, since the ACPI video code has improved
heuristics for this itself now (which includes a chassis-type check).
Signed-off-by: Hans de Goede
---
drivers/platform/x86/asus-wmi.c | 7 ---
1 file ch
Acked-by: Alex Deucher
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 7 +++
drivers/gpu/drm/radeon/atombios_encoders.c | 7 +++
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 7 +++
3 files changed, 21 insertions(+)
diff --git a/drivers
. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 39 ++---
1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index fb49b8f4523a..cc9d0d91e268 100644
--- a/drivers/acpi
of:
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
Inside the apple-gmux driver.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 4
include/acpi/video.h| 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/acpi
registration has failed / was skipped to ensure that there is a
backlight device available before the drm_device gets registered with
userspace.
Changes in v2:
- Add nouveau_acpi_video_register_backlight() wrapper to avoid unresolved
symbol errors on non X86
Signed-off-by: Hans de Goede
---
drivers/gpu
bug.cgi?id=215683
Tested-by: Werner Sembach
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 92 +
1 file changed, 1 insertion(+), 91 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_dete
troublesome because it may end up
getting called after other backlight drivers have already called
acpi_video_get_backlight_type() resulting in the other drivers
already being registered even though they should not.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi
Now that acpi_video_get_backlight_type() has apple-gmux detection (using
apple_gmux_present()), it is no longer necessary for the apple-gmux code
to manually remove possibly conflicting drivers.
So remove the handling for this from the apple-gmux driver.
Signed-off-by: Hans de Goede
de Goede
---
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c| 9 +++--
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
] quirks from samsung-laptop to
drivers/acpi/video_detect.c .
Note the X360 -> acpi_backlight=native quirk is not moved because that
already was present in drivers/acpi/video_detect.c .
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c |
call acpi_video_register_backlight() when a panel is detected
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/i915/display/intel_display.c | 8
drivers/gpu/drm/i915/display/intel_panel.c | 3 +++
drivers/gpu/drm/i915/i915_drv.h | 2 ++
3 files changed, 13 insertions
Move the list_del removing an acpi_video_bus from video_bus_head
on teardown to before the teardown is done, to avoid code iterating
over the video_bus_head list seeing acpi_video_bus objects on there
which are (partly) torn down already.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
() lines without
wrapping.
But over time some entries did not event have the single space
indent in front of the ".name = ..." lines.
Make things consistent by using a single space indent for these
lines everywhere.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
--
Add an entry summarizing the discussion about dealing with brightness
control on devices with more then 1 internal panel.
The original discussion can be found here:
https://lore.kernel.org/dri-devel/20220517152331.16217-1-hdego...@redhat.com/
Signed-off-by: Hans de Goede
---
Documentation/gpu
Move the WMI interface definitions to a header, so that the definitions
can be shared with drivers/acpi/video_detect.c .
Changes in v2:
- Add missing Nvidia copyright header
- Move WMI_BRIGHTNESS_GUID to nvidia-wmi-ec-backlight.h as well
Suggested-by: Daniel Dadap
Signed-off-by: Hans de Goede
troublesome because it may end up
getting called after other backlight drivers have already called
acpi_video_get_backlight_type() resulting in the other drivers
already being registered even though they should not.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi
Hi,
On 8/18/22 21:38, Daniel Dadap wrote:
>
> On 8/18/22 1:42 PM, Hans de Goede wrote:
>> Move the WMI interface definitions to a header, so that the definitions
>> can be shared with drivers/acpi/video_detect.c .
>>
>> Suggested-by: Daniel Dadap
&
Hi,
On 8/18/22 22:07, Daniel Dadap wrote:
>
> On 8/18/22 1:42 PM, Hans de Goede wrote:
>> On x86/ACPI boards the acpi_video driver will usually initialize before
>> the kms driver (except i915). This causes /sys/class/backlight/acpi_video0
>> to show up and then the kms
add DMI quirks for those.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 19 +++
drivers/platform/x86/toshiba_acpi.c | 16
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi
-backlight in
drivers/acpi/video_detect.c already checks that the WMI advertised
brightness-source is the embedded controller, this new check makes it
unnecessary for nvidia_wmi_ec_backlight_probe() to check this itself.
Suggested-by: Daniel Dadap
Signed-off-by: Hans de Goede
---
drivers/platform/x86
Acked-by: Alex Deucher
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 7 +++
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c| 7 +++
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++
3 files changed, 21 insertions(+)
diff --git a/dri
ries.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 53 ++
drivers/platform/x86/acer-wmi.c | 66 -
2 files changed, 53 insertions(+), 66 deletions(-)
diff --git a/drivers/acpi/video_detect.c
() lines without
wrapping.
But over time some entries did not event have the single space
indent in front of the ".name = ..." lines.
Make things consistent by using a single space indent for these
lines everywhere.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
--
When acpi_video_register() has not run yet the video_bus_head will be
empty, so there is no need to check the register_count flag first.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 12
1 file changed, 4 insertions(+), 8 deletions
or when it is
disabled.
Changes in v2:
- Make register_backlight_delay a module parameter, mainly so that it can
be disabled by Nvidia binary driver users
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 50
Move the list_del removing an acpi_video_bus from video_bus_head
on teardown to before the teardown is done, to avoid code iterating
over the video_bus_head list seeing acpi_video_bus objects on there
which are (partly) torn down already.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
Now that acpi_video_get_backlight_type() has apple-gmux detection (using
apple_gmux_present()), it is no longer necessary for the apple-gmux code
to manually remove possibly conflicting drivers.
So remove the handling for this from the apple-gmux driver.
Signed-off-by: Hans de Goede
de Goede
---
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c| 9 +++--
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 39 ++---
1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index fb49b8f4523a..cc9d0d91e268 100644
--- a/drivers/acpi
Add an entry summarizing the discussion about dealing with brightness
control on devices with more then 1 internal panel.
The original discussion can be found here:
https://lore.kernel.org/dri-devel/20220517152331.16217-1-hdego...@redhat.com/
Signed-off-by: Hans de Goede
---
Documentation/gpu
because the entries using the removed wmi_backlight_power flag
also use other model specific quirks from the asus-wmi quirk_entry struct.
So the quirk_asus_x55u struct and the entries pointing to it cannot be
dropped.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi
backlight device because of e.g. the firmware_flags
or the acpi_video_get_backlight_type() return value. This ensures that
if the acpi_video backlight device should be used, it will be available
before the radeon drm_device gets registered with userspace.
Acked-by: Alex Deucher
Signed-off-by: Hans de
Move the WMI interface definitions to a header, so that the definitions
can be shared with drivers/acpi/video_detect.c .
Suggested-by: Daniel Dadap
Signed-off-by: Hans de Goede
---
MAINTAINERS | 1 +
.../platform/x86/nvidia-wmi-ec-backlight.c| 66
ssary.
Relying on the cached native_available value not only is simpler, it will
also work correctly in cases where then native backlight registration was
skipped because of acpi_video_backlight_use_native() returning false.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers
bug.cgi?id=215683
Tested-by: Werner Sembach
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 92 +
1 file changed, 1 insertion(+), 91 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_dete
Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 84ae22670e54..ce6d89fcdc0e 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video
he addition of the acpi_video_get_backlight_type() != native check.
Removing this should be ok now, since the ACPI video code has improved
heuristics for this itself now (which includes a chassis-type check).
Signed-off-by: Hans de Goede
---
drivers/platform/x86/asus-wmi.c | 7 ---
1 file ch
backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/i915/display/intel_backlight.c | 7 +++
1 file changed, 7 insertions(+)
_backlight_type() with
adding a new acpi_video_backlight_use_native() helper.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 24
include/acpi/video.h| 5 +
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git
latform-drivers-x86.git/log/?h=backlight-detect-refactor-v3
assuming the i915 patches also pass review I hope to send out
a pull-request to all involved subsystems based on this branch soon.
Regards,
Hans
Hans de Goede (31):
ACPI: video: Add acpi_video_backlight_use_native() helper
drm/i915:
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 10 --
drivers/acpi/video_detect.c | 16
include/acpi/video.h| 4
3 files changed, 30 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index d1e41f30c004
. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/Kconfig | 1 +
drivers/acpi/video_detect.c| 37 ++
drivers/gpu/drm/gma500/Kconfig | 2 ++
drivers/gpu/drm/i915/Kconfig | 2 ++
include/acpi/video.h | 1 +
5 files changed, 43
of:
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
Inside the apple-gmux driver.
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 4
include/acpi/video.h| 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/acpi
Acked-by: Alex Deucher
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 7 +++
drivers/gpu/drm/radeon/atombios_encoders.c | 7 +++
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 7 +++
3 files changed, 21 insertions(+)
diff --git a/drivers
] quirks from samsung-laptop to
drivers/acpi/video_detect.c .
Note the X360 -> acpi_backlight=native quirk is not moved because that
already was present in drivers/acpi/video_detect.c .
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c |
registration has failed / was skipped to ensure that there is a
backlight device available before the drm_device gets registered with
userspace.
Reviewed-by: Lyude Paul
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a
call acpi_video_register_backlight() when a panel is detected
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/i915/display/intel_display.c | 8
drivers/gpu/drm/i915/display/intel_panel.c | 3 +++
drivers/gpu/drm/i915/i915_drv.h | 2 ++
3 files changed, 13 insertions
backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.
Reviewed-by: Lyude Paul
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++
1 file c
necessary to monitor for a
native (BACKLIGHT_RAW) device showing up later and to then unregister
the acpi_video backlight device(s).
Acked-by: Rafael J. Wysocki
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 2 --
drivers/acpi/video_detect.c | 36
Hi Daniel,
On 8/2/22 18:49, Daniel Dadap wrote:
> On 8/2/22 06:31, Hans de Goede wrote:
>> Hi Daniel,
>>
>> On 7/21/22 23:30, Daniel Dadap wrote:
>>> On 7/21/22 16:24, Daniel Dadap wrote:
>>>> On 7/12/22 14:38, Hans de Goede wrote:
>>>>&
Hi,
On 7/20/22 18:46, Alex Deucher wrote:
> On Wed, Jul 20, 2022 at 12:44 PM Alex Deucher wrote:
>>
>> On Tue, Jul 12, 2022 at 3:39 PM Hans de Goede wrote:
>>>
>>> Before this commit when we want userspace to use the acpi_video backlight
>>> device w
Hi Daniel,
On 7/15/22 13:59, Hans de Goede wrote:
> Hi Daniel,
>
> On 7/12/22 22:13, Daniel Dadap wrote:
>> Thanks, Hans:
>>
>> On 7/12/22 14:38, Hans de Goede wrote:
>>> On some new laptop designs a new Nvidia specific WMI interface is present
>>> wh
ion:
>
> + Simon, Hans and Sean
Thanks, the patch looks good to me:
Acked-by: Hans de Goede
Regards,
Hans
>
>>
>> [2.563969] [ cut here ]
>> [2.563971] WARNING: CPU: 6 PID: 325 at
>> drivers/gpu/drm/drm_mode_object.c:45 drm_mo
Hi,
On 8/5/22 19:34, Simon Ser wrote:
> Hi,
>
> Have you seen [1] and [2]? CC'ing Sean and Hans, it seems like there's
> a disagreement regarding probing early vs. setting the initial value to
> UNKNOWN.
At least for the discussions I've been involved in so far
(see the links in the originak ema
Hi Daniel,
On 7/21/22 23:30, Daniel Dadap wrote:
>
> On 7/21/22 16:24, Daniel Dadap wrote:
>>
>> On 7/12/22 14:38, Hans de Goede wrote:
>>> ATM on x86 laptops where we want userspace to use the acpi_video backlight
>>> device we often register both t
Hi,
On 7/15/22 17:32, Daniel Dadap wrote:
>
>
>> On Jul 15, 2022, at 06:59, Hans de Goede wrote:
>>
>> Hi Daniel,
>>
>>> On 7/12/22 22:13, Daniel Dadap wrote:
>>> Thanks, Hans:
>>>
>>>> On 7/12/22 14:38, Hans de Goede wrote
Hi Daniel,
On 7/12/22 22:13, Daniel Dadap wrote:
> Thanks, Hans:
>
> On 7/12/22 14:38, Hans de Goede wrote:
>> On some new laptop designs a new Nvidia specific WMI interface is present
>> which gives info about panel brightness control and may allow controlling
>>
ht_nvidia_wmi_ec while the EC backlight driver
refuses to load...
Regards,
Hans
>
> This change looks fine to me, although I suppose somebody who maintains the
> acer-wmi driver should comment. The bugzilla links are a nice touch.
>
> On 7/12/22 14:39, Hans de Goede wrote:
&
Hi,
On 7/13/22 19:21, Limonciello, Mario wrote:
> [Public]
>
>
>
>> -Original Message-
>> From: Werner Sembach
>> Sent: Wednesday, July 13, 2022 12:08
>> To: Hans de Goede ; Ben Skeggs
>> ; Karol Herbst ; Lyude
>> ; Daniel Dadap ;
class device registration
a separate step" patch from earlier in this patch-series, we no
longer briefly register the acpi_video0 backlight on systems where
the native driver should be used.
So this is no longer an issue an the quirks are no longer needed.
Cc: Werner Sembach
Signed-off-by: Han
s if ACPI && X86 are enabled.
When these are not set, ACPI_VIDEO is disabled, ensuring the stubs
from acpi/video.h will be used.
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 6 ++
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c| 7 +++
registration has failed / was skipped to ensure that there is a
backlight device available before the drm_device gets registered with
userspace.
Reviewed-by: Lyude Paul
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a
that the EC is used,
then this interface should be used for brightness control.
Signed-off-by: Hans de Goede
---
drivers/acpi/Kconfig | 1 +
drivers/acpi/video_detect.c| 35 ++
drivers/gpu/drm/gma500/Kconfig | 2 ++
drivers/gpu/drm/i915/Kconfig
he addition of the acpi_video_get_backlight_type() != native check.
Removing this should be ok now, since the ACPI video code has improved
heuristics for this itself now (which includes a chassis-type check).
Signed-off-by: Hans de Goede
---
drivers/platform/x86/asus-wmi.c | 7 ---
1 file ch
backlight device because of e.g. the firmware_flags
or the acpi_video_get_backlight_type() return value. This ensures that
if the acpi_video backlight device should be used, it will be available
before the radeon drm_device gets registered with userspace.
Signed-off-by: Hans de Goede
---
drivers/gpu
troublesome because it may end up
getting called after other backlight drivers have already called
acpi_video_get_backlight_type() resulting in the other drivers
already being registered even though they should not.
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c| 8
When acpi_video_register() has not run yet the video_bus_head will be
empty, so there is no need to check the register_count flag first.
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi
s if ACPI && X86 are enabled.
When these are not set, ACPI_VIDEO is disabled, ensuring the stubs
from acpi/video.h will be used.
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/Kconfig | 6 ++
drivers/gpu/drm/radeon/atombios_encoders.c | 7 +++
Move the list_del removing an acpi_video_bus from video_bus_head
on teardown to before the teardown is done, to avoid code iterating
over the video_bus_head list seeing acpi_video_bus objects on there
which are (partly) torn down already.
Signed-off-by: Hans de Goede
---
drivers/acpi
call acpi_video_register_backlight() when a panel is detected
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/i915/display/intel_display.c | 8
drivers/gpu/drm/i915/display/intel_panel.c | 3 +++
drivers/gpu/drm/i915/i915_drv.h | 2 ++
3 files changed, 13 insertions
Now that acpi_video_get_backlight_type() has apple-gmux detection (using
apple_gmux_present()), it is no longer necessary for the apple-gmux code
to manually remove possibly conflicting drivers.
So remove the handling for this from the apple-gmux driver.
Signed-off-by: Hans de Goede
] quirks from samsung-laptop to
drivers/acpi/video_detect.c .
Note the X360 -> acpi_backlight=native quirk is not moved because that
already was present in drivers/acpi/video_detect.c .
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c | 54 +
driv
PI: video: Make backlight class device registration
a separate step" patch from earlier in this patch-series, we no
longer briefly register the acpi_video0 backlight on systems where
the native driver should be used.
So this is no longer an issue an the quirk is no longer needed.
Signed-o
.
All callers have been fixed to no longer call it, so remove
acpi_video_set_dmi_backlight_type() now.
This means we now also no longer need acpi_video_unregister_backlight()
for the remove acpi_video backlight after it was wrongly registered hack,
so remove that too.
Signed-off-by: Hans de Goede
because the entries using the removed wmi_backlight_power flag
also use other model specific quirks from the asus-wmi quirk_entry struct.
So the quirk_asus_x55u struct and the entries pointing to it cannot be
dropped.
Signed-off-by: Hans de Goede
---
drivers/acpi/video_detect.c| 40
driver or when it is
disabled.
Signed-off-by: Hans de Goede
---
drivers/acpi/acpi_video.c | 45 ---
include/acpi/video.h | 2 ++
2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index
backlight devices for a single display really is
undesirable, don't register the GPU's native backlight device when
another backlight device should be used.
Reviewed-by: Lyude Paul
Signed-off-by: Hans de Goede
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++
1 file c
backlight device because of either the firmware_flags
or the acpi_video_get_backlight_type() return value. This ensures that
if the acpi_video backlight device should be used, it will be available
before the amdgpu drm_device gets registered with userspace.
Signed-off-by: Hans de Goede
---
drivers
Add an entry summarizing the discussion about dealing with brightness
control on devices with more then 1 internal panel.
The original discussion can be found here:
https://lore.kernel.org/dri-devel/20220517152331.16217-1-hdego...@redhat.com/
Signed-off-by: Hans de Goede
---
Documentation/gpu
101 - 200 of 267 matches
Mail list logo