Re: [Nouveau] [RFC] treewide: cleanup unreachable breaks

2020-10-18 Thread Hans de Goede
Hi Tom, Quick self intro: I have take over drivers/platform/x86 maintainership from Andy. On 10/17/20 6:09 PM, t...@redhat.com wrote: > From: Tom Rix > > This is a upcoming change to clean up a new warning treewide. > I am wondering if the change could be one mega patch (see below) or > normal

Re: [Nouveau] [PATCH 00/38] Replace deprecated CPU-hotplug

2021-08-08 Thread Hans de Goede
gt; Cc: Daniel Jordan > Cc: Daniel Lezcano > Cc: Dave Hansen > Cc: Davidlohr Bueso > Cc: "David S. Miller" > Cc: Dietmar Eggemann > Cc: Gonglei > Cc: Greg Kroah-Hartman > Cc: Guenter Roeck > Cc: Hans de Goede > Cc: Heiko Carstens > Cc: Herbert

Re: [Nouveau] [Intel-gfx] [PATCH v2 0/4] drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers

2021-10-02 Thread Hans de Goede
Hi Lyude, On 10/2/21 12:53 AM, Lyude Paul wrote: > When I originally moved all of the VESA backlight code in i915 into DRM > helpers, one of the things I didn't have the hardware or time for > testing was machines that used a combination of PWM and DPCD in order to > control their backlights. This

Re: [Nouveau] [Intel-gfx] [PATCH v2 0/4] drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers

2021-10-07 Thread Hans de Goede
Hi, On 10/5/21 10:26 PM, Lyude Paul wrote: > On Sat, 2021-10-02 at 11:14 +0200, Hans de Goede wrote: >> Hi Lyude, >> >> On 10/2/21 12:53 AM, Lyude Paul wrote: >>> When I originally moved all of the VESA backlight code in i915 into DRM >>> helpers, one of t

Re: [Nouveau] [Intel-gfx] [PATCH v2 0/4] drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers

2021-10-07 Thread Hans de Goede
Hi, On 10/7/21 11:54 AM, Hans de Goede wrote: > Hi, > > On 10/5/21 10:26 PM, Lyude Paul wrote: >> On Sat, 2021-10-02 at 11:14 +0200, Hans de Goede wrote: >>> Hi Lyude, >>> >>> On 10/2/21 12:53 AM, Lyude Paul wrote: >>>> When I originally

Re: [Nouveau] [PATCH v2 8/9] platform/x86: amd-gmux: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Hans de Goede
Limonciello Thanks, this looks good to me. I assume that this whole series will be merged in one go through another tree (e.g. the PCI tree), so here is my ack for merging this patch through another tree: Acked-by: Hans de Goede Regards, Hans > --- > drivers/platform/x86/apple-gmux.c

Re: [Nouveau] [PATCH v2 8/9] platform/x86: amd-gmux: drop the use of `pci_is_thunderbolt_attached`

2022-02-11 Thread Hans de Goede
Hi, On 2/11/22 10:00, Yehezkel Bernat wrote: > On Fri, Feb 11, 2022 at 12:43 AM Mario Limonciello > wrote: >> >> Currently `pci_is_thunderbolt_attached` is used to indicate a device >> is connected externally. >> >> The PCI core now marks such devices as removable and downstream drivers >> can us

[Nouveau] nouveau lockdep deadlock report with 5.18-rc6

2022-05-17 Thread Hans de Goede
Hi All, I just noticed the below lockdep possible deadlock report with a 5.18-rc6 kernel on a Dell Latitude E6430 laptop with the following nvidia GPU: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108GLM [NVS 5200M] [10de:0dfc] (rev a1) 01:00.1 Audio device [0403]: NVIDIA Corpo

[Nouveau] [PATCH 00/14] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-05-17 Thread Hans de Goede
tems / touches multiple kms drivers my plan is to provide an immutable branch based on say 5.19-rc1 and then have that get merged into all the relevant trees. Please review. Regards, Hans Hans de Goede (14): ACPI: video: Add a native function parameter to acpi_video_get_backlight_type()

[Nouveau] [PATCH 01/14] ACPI: video: Add a native function parameter to acpi_video_get_backlight_type()

2022-05-17 Thread Hans de Goede
true will make acpi_video_get_backlight_type() behave as if a native backlight has already been registered. Note that all current callers are updated to pass false for the new parameter, so this change in itself causes no functional changes. Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c

[Nouveau] [PATCH 02/14] drm/i915: Don't register backlight when another backlight should be used

2022-05-17 Thread Hans de Goede
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(+)

[Nouveau] [PATCH 03/14] drm/amdgpu: Don't register backlight when another backlight should be used

2022-05-17 Thread Hans de Goede
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/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/atombi

[Nouveau] [PATCH 04/14] drm/radeon: Don't register backlight when another backlight should be used

2022-05-17 Thread Hans de Goede
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/Kconfig | 1 + drivers/gpu/drm/radeon/atombios

[Nouveau] [PATCH 06/14] ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()

2022-05-17 Thread Hans de Goede
device is available. 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 the acpi_video_get_backlight_type() return value. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c

[Nouveau] [PATCH 07/14] ACPI: video: Remove acpi_video_bus from list before tearing it down

2022-05-17 Thread Hans de Goede
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

[Nouveau] [PATCH 05/14] drm/nouveau: Don't register backlight when another backlight should be used

2022-05-17 Thread Hans de Goede
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/nouveau/nouveau_backlight.c | 7 +++ 1 file changed, 7 insertions(+) diff

[Nouveau] [PATCH 08/14] ACPI: video: Simplify acpi_video_unregister_backlight()

2022-05-17 Thread 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. Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/acpi

[Nouveau] [PATCH 09/14] ACPI: video: Make backlight class device registration a separate step

2022-05-17 Thread Hans de Goede
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

[Nouveau] [PATCH 11/14] drm/i915: Call acpi_video_register_backlight()

2022-05-17 Thread Hans de Goede
de Goede --- drivers/gpu/drm/i915/display/intel_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 85fbf59e0f58..500659c51e8d 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b

[Nouveau] [PATCH 10/14] ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers

2022-05-17 Thread Hans de Goede
necessary to monitor for a native (BACKLIGHT_RAW) device showing up later and to then unregister the acpi_video backlight device(s). Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 2 -- drivers/acpi/video_detect.c | 36 2 files changed, 38

[Nouveau] [PATCH 12/14] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails

2022-05-17 Thread Hans de Goede
registration has failed / was skipped to ensure that there is a backlight device available before the drm_device gets registered with userspace. Signed-off-by: Hans de Goede --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/nouveau

[Nouveau] [PATCH 13/14] drm/amdgpu: Register ACPI video backlight when skipping amdgpu backlight registration

2022-05-17 Thread Hans de Goede
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

[Nouveau] [PATCH 14/14] drm/radeon: Register ACPI video backlight when skipping radeon backlight registration

2022-05-17 Thread Hans de Goede
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

Re: [Nouveau] [PATCH 00/14] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-05-18 Thread Hans de Goede
Hi, On 5/18/22 10:44, Jani Nikula wrote: > On Tue, 17 May 2022, Hans de Goede wrote: >> Hi All, >> >> As mentioned in my RFC titled "drm/kms: control display brightness through >> drm_connector properties": >> https://lore.kernel.org/dri-devel/0d18

Re: [Nouveau] [PATCH 01/14] ACPI: video: Add a native function parameter to acpi_video_get_backlight_type()

2022-05-18 Thread Hans de Goede
Hi, On 5/18/22 10:55, Jani Nikula wrote: > On Tue, 17 May 2022, Hans de Goede wrote: >> ATM on x86 laptops where we want userspace to use the acpi_video backlight >> device we often register both the GPU's native backlight device and >> acpi_video's firmware acp

Re: [Nouveau] [PATCH 09/14] ACPI: video: Make backlight class device registration a separate step

2022-05-24 Thread Hans de Goede
Hi, On 5/24/22 01:25, Daniel Dadap wrote: > On 5/20/22 16:41, Daniel Dadap wrote: >> >> On 5/17/22 10:23, Hans de Goede wrote: >>> On x86/ACPI boards the acpi_video driver will usually initializing before >>> the kms driver (except i915). This causes /sys/class/

Re: [Nouveau] [PATCH 12/14] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails

2022-06-02 Thread Hans de Goede
Hi Lyude, Thank you for the reviews. On 5/18/22 19:39, Lyude Paul wrote: > On Tue, 2022-05-17 at 17:23 +0200, Hans de Goede wrote: >> Typically the acpi_video driver will initialize before nouveau, which >> used to cause /sys/class/backlight/acpi_video0 to get registered and

[Nouveau] [PATCH] drm/nouveau/Kconfig: Drop duplicate "select ACPI_VIDEO"

2022-06-20 Thread Hans de Goede
hat one are true then the second statement will always select ACPI_VIDEO already. Signed-off-by: Hans de Goede --- drivers/gpu/drm/nouveau/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 34760164c271..03d12caf9e

Re: [Nouveau] [PATCH 01/14] ACPI: video: Add a native function parameter to acpi_video_get_backlight_type()

2022-06-21 Thread Hans de Goede
Hi, On 5/19/22 11:02, Jani Nikula wrote: > On Wed, 18 May 2022, Hans de Goede wrote: >> Hi, >> >> On 5/18/22 10:55, Jani Nikula wrote: >>> On Tue, 17 May 2022, Hans de Goede wrote: >>>> ATM on x86 laptops where we want userspace to use the acpi_video ba

Re: [Nouveau] [PATCH] drm/nouveau/Kconfig: Drop duplicate "select ACPI_VIDEO"

2022-06-23 Thread Hans de Goede
Hi Lyude, On 6/21/22 22:08, Lyude Paul wrote: > Reviewed-by: Lyude Paul > > Also, you have my permission to push this to drm-misc-next. Thanks, I've pushed this to drm-misc-next now. Regards, Hans > > On Mon, 2022-06-20 at 11:46 +0200, Hans de Goede wrote: >> Be

[Nouveau] [PATCH v2 00/29] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-07-12 Thread Hans de Goede
o be able to make an immutable branch based on 5.20-rc1 + this series available for merging into the various touched subsystems once 5.20-rc2 is out. Regards, Hans Hans de Goede (29): ACPI: video: Add acpi_video_backlight_use_native() helper drm/i915: Don't register backlight when an

[Nouveau] [PATCH v2 01/29] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-07-12 Thread Hans de Goede
_backlight_type() with adding a new acpi_video_backlight_use_native() helper. 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 a/drivers/acpi/video_det

[Nouveau] [PATCH v2 02/29] drm/i915: Don't register backlight when another backlight should be used

2022-07-12 Thread Hans de Goede
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(+)

[Nouveau] [PATCH v2 03/29] drm/amdgpu: Don't register backlight when another backlight should be used

2022-07-12 Thread Hans de Goede
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 +++

[Nouveau] [PATCH v2 04/29] drm/radeon: Don't register backlight when another backlight should be used

2022-07-12 Thread Hans de Goede
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 +++

[Nouveau] [PATCH v2 05/29] drm/nouveau: Don't register backlight when another backlight should be used

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 06/29] ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()

2022-07-12 Thread Hans de Goede
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. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 3 +-- 1 file ch

[Nouveau] [PATCH v2 07/29] ACPI: video: Remove acpi_video_bus from list before tearing it down

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 09/29] ACPI: video: Make backlight class device registration a separate step

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 08/29] ACPI: video: Simplify acpi_video_unregister_backlight()

2022-07-12 Thread 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. Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/acpi

[Nouveau] [PATCH v2 12/29] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 11/29] drm/i915: Call acpi_video_register_backlight() (v2)

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 10/29] ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers

2022-07-12 Thread Hans de Goede
necessary to monitor for a native (BACKLIGHT_RAW) device showing up later and to then unregister the acpi_video backlight device(s). Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 2 -- drivers/acpi/video_detect.c | 36 2 files changed, 38

[Nouveau] [PATCH v2 13/29] drm/amdgpu: Register ACPI video backlight when skipping amdgpu backlight registration

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 15/29] ACPI: video: Refactor acpi_video_get_backlight_type() a bit

2022-07-12 Thread Hans de Goede
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 f6bdc0c77e9a..8c2863403040 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi

[Nouveau] [PATCH v2 14/29] drm/radeon: Register ACPI video backlight when skipping radeon backlight registration

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 17/29] ACPI: video: Add Apple GMUX brightness control detection

2022-07-12 Thread Hans de Goede
of: acpi_video_set_dmi_backlight_type(acpi_backlight_vendor); Inside the apple-gmux driver. 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/video_detect.c b/drivers/acpi

[Nouveau] [PATCH v2 16/29] ACPI: video: Add Nvidia WMI EC brightness control detection

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 18/29] platform/x86: apple-gmux: Stop calling acpi/video.h functions

2022-07-12 Thread 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

[Nouveau] [PATCH v2 20/29] platform/x86: acer-wmi: Move backlight DMI quirks to acpi/video_detect.c

2022-07-12 Thread Hans de Goede
es. 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 b/drivers/acpi/video

[Nouveau] [PATCH v2 19/29] platform/x86: toshiba_acpi: Stop using acpi_video_set_dmi_backlight_type()

2022-07-12 Thread Hans de Goede
add DMI quirks for those. 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/video_detect.c b/drivers/acpi

[Nouveau] [PATCH v2 22/29] platform/x86: asus-wmi: Move acpi_backlight=vendor quirks to ACPI video_detect.c

2022-07-12 Thread 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

[Nouveau] [PATCH v2 21/29] platform/x86: asus-wmi: Drop DMI chassis-type check from backlight handling

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 24/29] platform/x86: samsung-laptop: Move acpi_backlight=[vendor|native] quirks to ACPI video_detect.c

2022-07-12 Thread 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

[Nouveau] [PATCH v2 23/29] platform/x86: asus-wmi: Move acpi_backlight=native quirks to ACPI video_detect.c

2022-07-12 Thread 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. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c| 8

[Nouveau] [PATCH v2 25/29] ACPI: video: Remove acpi_video_set_dmi_backlight_type()

2022-07-12 Thread Hans de Goede
. 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

[Nouveau] [PATCH v2 26/29] ACPI: video: Drop "Samsung X360" acpi_backlight=native quirk

2022-07-12 Thread Hans de Goede
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

[Nouveau] [PATCH v2 28/29] ACPI: video: Fix indentation of video_detect_dmi_table[] entries

2022-07-12 Thread 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. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 48 +

[Nouveau] [PATCH v2 29/29] drm/todo: Add entry about dealing with brightness control on devices with > 1 panel

2022-07-12 Thread 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

[Nouveau] [PATCH v2 27/29] ACPI: video: Drop Clevo/TUXEDO NL5xRU and NL5xNU acpi_backlight=native quirks

2022-07-12 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v2 27/29] ACPI: video: Drop Clevo/TUXEDO NL5xRU and NL5xNU acpi_backlight=native quirks

2022-07-14 Thread Hans de Goede
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 ;

Re: [Nouveau] [PATCH v2 16/29] ACPI: video: Add Nvidia WMI EC brightness control detection

2022-07-15 Thread Hans de Goede
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 >>

Re: [Nouveau] [PATCH v2 20/29] platform/x86: acer-wmi: Move backlight DMI quirks to acpi/video_detect.c

2022-07-15 Thread Hans de Goede
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: &

Re: [Nouveau] [PATCH v2 16/29] ACPI: video: Add Nvidia WMI EC brightness control detection

2022-07-16 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v2 01/29] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-08-02 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v2 16/29] ACPI: video: Add Nvidia WMI EC brightness control detection

2022-08-17 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v2 03/29] drm/amdgpu: Don't register backlight when another backlight should be used

2022-08-17 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v2 01/29] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-08-17 Thread Hans de Goede
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: >>>>&

[Nouveau] [PATCH v3 00/31] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-08-18 Thread Hans de Goede
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:

[Nouveau] [PATCH v3 02/31] drm/i915: Don't register backlight when another backlight should be used

2022-08-18 Thread Hans de Goede
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(+)

[Nouveau] [PATCH v3 03/31] drm/amdgpu: Don't register backlight when another backlight should be used (v3)

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 01/31] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-08-18 Thread Hans de Goede
_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

[Nouveau] [PATCH v3 04/31] drm/radeon: Don't register backlight when another backlight should be used (v3)

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 05/31] drm/nouveau: Don't register backlight when another backlight should be used

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 06/31] ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 09/31] ACPI: video: Make backlight class device registration a separate step (v2)

2022-08-18 Thread 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

[Nouveau] [PATCH v3 08/31] ACPI: video: Simplify acpi_video_unregister_backlight()

2022-08-18 Thread 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

[Nouveau] [PATCH v3 10/31] ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 07/31] ACPI: video: Remove acpi_video_bus from list before tearing it down

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 13/31] drm/amdgpu: Register ACPI video backlight when skipping amdgpu backlight registration

2022-08-18 Thread 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

[Nouveau] [PATCH v3 12/31] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 11/31] drm/i915: Call acpi_video_register_backlight() (v2)

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 14/31] drm/radeon: Register ACPI video backlight when skipping radeon backlight registration

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 15/31] platform/x86: nvidia-wmi-ec-backlight: Move fw interface definitions to a header

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 18/31] ACPI: video: Add Apple GMUX brightness control detection

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 17/31] ACPI: video: Add Nvidia WMI EC brightness control detection (v2)

2022-08-18 Thread Hans de Goede
. 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

[Nouveau] [PATCH v3 16/31] ACPI: video: Refactor acpi_video_get_backlight_type() a bit

2022-08-18 Thread Hans de Goede
. 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

[Nouveau] [PATCH v3 19/31] platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_type()

2022-08-18 Thread Hans de Goede
-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

[Nouveau] [PATCH v3 20/31] platform/x86: apple-gmux: Stop calling acpi/video.h functions

2022-08-18 Thread 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

[Nouveau] [PATCH v3 21/31] platform/x86: toshiba_acpi: Stop using acpi_video_set_dmi_backlight_type()

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 23/31] platform/x86: asus-wmi: Drop DMI chassis-type check from backlight handling

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 24/31] platform/x86: asus-wmi: Move acpi_backlight=vendor quirks to ACPI video_detect.c

2022-08-18 Thread 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. Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede --- drivers/acpi

[Nouveau] [PATCH v3 25/31] platform/x86: asus-wmi: Move acpi_backlight=native quirks to ACPI video_detect.c

2022-08-18 Thread 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

[Nouveau] [PATCH v3 29/31] ACPI: video: Drop NL5x?U, PF4NU1F and PF5?U?? acpi_backlight=native quirks

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 27/31] ACPI: video: Remove acpi_video_set_dmi_backlight_type()

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 26/31] platform/x86: samsung-laptop: Move acpi_backlight=[vendor|native] quirks to ACPI video_detect.c

2022-08-18 Thread 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 . Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c |

[Nouveau] [PATCH v3 28/31] ACPI: video: Drop "Samsung X360" acpi_backlight=native quirk

2022-08-18 Thread Hans de Goede
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

[Nouveau] [PATCH v3 31/31] drm/todo: Add entry about dealing with brightness control on devices with > 1 panel

2022-08-18 Thread 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

Re: [Nouveau] [PATCH v3 09/31] ACPI: video: Make backlight class device registration a separate step (v2)

2022-08-19 Thread Hans de Goede
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

Re: [Nouveau] [PATCH v3 15/31] platform/x86: nvidia-wmi-ec-backlight: Move fw interface definitions to a header

2022-08-19 Thread Hans de Goede
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 &

  1   2   3   4   >