[PATCH 6/6] drm/gma500: Remove unnecessary suspend/resume wrappers

2022-09-09 Thread Hans de Goede
The psb_runtime_suspend/resume/thaw/freeze/restore functions are all just 1:1 wrappers around gma_power_suspend/_resume. Drop these wrappers and use the DEFINE_RUNTIME_DEV_PM_OPS() macro to define the dev_pm_ops struct. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/power.c | 25

[PATCH 2/6] drm/gma500: Remove runtime_allowed dead code in psb_unlocked_ioctl()

2022-09-09 Thread Hans de Goede
runtime_allowed is initialized to 0, so the runtime_allowed == 1 condition is never true making this dead code. Remove it. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/psb_drv.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers

[PATCH 0/6] drm/gma500: 1 fix + further cleanups

2022-09-09 Thread Hans de Goede
Hi Patrik, Here is another gma500 patch-series with one more bugfix and a bunch of other cleanups of stuff which I noticed while doing the previous set of bugfixes. Regards, Hans Hans de Goede (6): drm/gma500: Wait longer for the GPU to power-down drm/gma500: Remove runtime_allowed dead

[PATCH 3/6] drm/gma500: Remove never set dev_priv->rpm_enabled flag

2022-09-09 Thread Hans de Goede
The rpm_enabled flag is never set, remove it. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/gma_display.c | 13 + drivers/gpu/drm/gma500/psb_drv.h | 3 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers

[PATCH 1/6] drm/gma500: Wait longer for the GPU to power-down

2022-09-09 Thread Hans de Goede
as contents). Hopefully this also fix this issue. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/cdv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c index ce96234f3df2..ff5104fe5692

Meeting (BOF) at Plumbers Dublin to discuss backlight brightness as connector object property RFC?

2022-09-09 Thread Hans de Goede
Hi All, I will be at Plumbers Dublin next week and I was wondering if anyone interested in this wants to get together for a quick discussion / birds of a feather session about this? I have just posted version 2 of the RFC:

[RFC v2] drm/kms: control display brightness through drm_connector properties

2022-09-09 Thread Hans de Goede
Hi all, Here is v2 of my "drm/kms: control display brightness through drm_connector properties" RFC: Changes from version 1: - Drop bl_brightness_0_is_min_brightness from list of new connector properties. - Clearly define that 0 is always min-brightness when setting the brightness through

Re: [PATCH v2 2/3] drm/gma500: Fix WARN_ON(lock->magic != lock) error

2022-09-09 Thread Hans de Goede
Hi, On 9/9/22 10:20, Patrik Jakobsson wrote: > On Tue, Sep 6, 2022 at 10:38 PM Hans de Goede wrote: >> >> psb_gem_unpin() calls dma_resv_lock() but the underlying ww_mutex >> gets destroyed by drm_gem_object_release() move the >> drm_gem_object_release() call in psb

Re: [PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-09 Thread Hans de Goede
Hi, On 9/9/22 09:34, Patrik Jakobsson wrote: > On Thu, Sep 8, 2022 at 3:39 PM Hans de Goede > wrote: >> >> Hi, >> >> On 9/8/22 15:26, Patrik Jakobsson wrote: >>> On Tue, Sep 6, 2022 at 10:38 PM Hans de Goede wrote: >>>> >>>> Fi

Re: [PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-08 Thread Hans de Goede
Hi, On 9/8/22 15:26, Patrik Jakobsson wrote: > On Tue, Sep 6, 2022 at 10:38 PM Hans de Goede wrote: >> >> Fix gnome-shell (and other page-flip users) hanging after suspend/resume >> because of the gma500's IRQs not working. >> >> This fixes 2 proble

[PATCH v2 1/3] drm/gma500: Fix BUG: sleeping function called from invalid context errors

2022-09-06 Thread Hans de Goede
000246 R12: c01864b0 [ 512.124584] R13: 0009 R14: 55cc9df484d0 R15: 55cc9af5d0c0 [ 512.124647] Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/gma_display.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma

[PATCH v2 0/3] drm/gma500: Fix 2 locking related WARNs + IRQ handling

2022-09-06 Thread Hans de Goede
vents" - Add "drm/gma500: Fix (vblank) IRQs not working after suspend/resume" Regards, Hans Hans de Goede (3): drm/gma500: Fix BUG: sleeping function called from invalid context errors drm/gma500: Fix WARN_ON(lock->magic != lock) error drm/gma500: Fix (vblank) IRQs no

[PATCH v2 2/3] drm/gma500: Fix WARN_ON(lock->magic != lock) error

2022-09-06 Thread Hans de Goede
disabled at (725978): [] __schedule+0xdd3/0x1670 [ 79.695803] softirqs last enabled at (725974): [] __irq_exit_rcu+0xed/0x160 [ 79.695825] softirqs last disabled at (725969): [] __irq_exit_rcu+0xed/0x160 [ 79.695845] ---[ end trace ]--- Signed-off-by: Hans de Goede ---

[PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-06 Thread Hans de Goede
. Replace the PCI-config registers save/restore with pci_disable_msi() on suspend + pci_enable_msi() on resume. Fixing e.g. gnome-shell hanging. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/cdv_device.c | 4 +--- drivers/gpu/drm/gma500/oaktrail_device.c | 5 + drivers

Re: [PATCH 2/3] drm/gma500: Fix crtc_vblank reference leak when userspace queues multiple events

2022-09-06 Thread Hans de Goede
Hi Michel, On 9/6/22 12:25, Michel Dänzer wrote: > On 2022-09-05 15:37, Hans de Goede wrote: >> The gma500 page-flip code kinda assume that userspace never queues more >> then 1 vblank event. So basically it assume that userspace does: >> >> - page-flip >> -

Re: [PATCH 1/3] drm/gma500: Fix BUG: sleeping function called from invalid context errors

2022-09-06 Thread Hans de Goede
Hi, On 9/6/22 14:50, Patrik Jakobsson wrote: > On Mon, Sep 5, 2022 at 3:37 PM Hans de Goede wrote: >> >> gma_crtc_page_flip() was holding the event_lock spinlock while calling >> crtc_funcs->mode_set_base() which takes ww_mutex. >> >> The only reason to

[PATCH 3/3] drm/gma500: Fix WARN_ON(lock->magic != lock) error

2022-09-05 Thread Hans de Goede
disabled at (725978): [] __schedule+0xdd3/0x1670 [ 79.695803] softirqs last enabled at (725974): [] __irq_exit_rcu+0xed/0x160 [ 79.695825] softirqs last disabled at (725969): [] __irq_exit_rcu+0xed/0x160 [ 79.695845] ---[ end trace ]--- Signed-off-by: Hans de Goede ---

[PATCH 2/3] drm/gma500: Fix crtc_vblank reference leak when userspace queues multiple events

2022-09-05 Thread Hans de Goede
hed which gma500 currently does not support. Note this is not a real fix for the issue of the gma500 code not supporting multiple page-flips events being pending, but it at least improves the situation a bit. Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/gma_display.c | 11 +++---

[PATCH 1/3] drm/gma500: Fix BUG: sleeping function called from invalid context errors

2022-09-05 Thread Hans de Goede
000246 R12: c01864b0 [ 512.124584] R13: 0009 R14: 55cc9df484d0 R15: 55cc9af5d0c0 [ 512.124647] Signed-off-by: Hans de Goede --- drivers/gpu/drm/gma500/gma_display.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/gma500/gma

[PATCH 0/3] drm/gma500: Fix 2 locking related WARN_ON oopses

2022-09-05 Thread Hans de Goede
with a WARN_ON constantly triggering. This series consists of 3 small non backlight fixes, 2 of which fix WARN_ON oopses/backtraces. Regards, Hans Hans de Goede (3): drm/gma500: Fix BUG: sleeping function called from invalid context errors drm/gma500: Fix crtc_vblank reference leak when userspace

[GIT PULL] Immutable backlight-detect-refactor branch between acpi, drm-* and pdx86

2022-09-05 Thread Hans de Goede
x86 subsystems. ---- Hans de Goede (31): ACPI: video: Add acpi_video_backlight_use_native() helper drm/i915: Don't register backlight when another backlight should be used (v2) drm/amdgpu: Don't register backlight when anot

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

2022-08-29 Thread Hans de Goede
Hi, On 8/26/22 00:21, Daniel Dadap wrote: > On 8/25/22 9:37 AM, 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 >> the brightness through this interf

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-28 Thread Hans de Goede
h just having a kernel cmdline parameter to hide/unhide it might be good enough. Regards, Hans > > On Thu, Aug 25, 2022 at 3:27 AM Hans de Goede <mailto:hdego...@redhat.com>> wrote: > > Hi Yusuf, > > On 8/24/22 04:18, Yusuf Khan wrote: > > Sorry

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

2022-08-25 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 67a0211c07b4..af2833b57b8b 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video

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

2022-08-25 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

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

2022-08-25 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/ Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede

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

2022-08-25 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

[PATCH v5 30/31] ACPI: video: Fix indentation of video_detect_dmi_table[] entries

2022-08-25 Thread Hans de Goede
t 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 --- drivers/acpi

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

2022-08-25 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 |

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

2022-08-25 Thread Hans de Goede
. This is 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

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

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

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

2022-08-25 Thread Hans de Goede
efore the 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

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

2022-08-25 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

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

2022-08-25 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 Reviewed-by: Daniel Dadap Signed-off-by: Hans de Goede

[PATCH v5 22/31] platform/x86: acer-wmi: Move backlight DMI quirks to acpi/video_detect.c

2022-08-25 Thread Hans de Goede
es. 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 b/dr

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

2022-08-25 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

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

2022-08-25 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

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

2022-08-25 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

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

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

[PATCH v5 15/31] platform/x86: nvidia-wmi-ec-backlight: Move fw interface definitions to a header (v2)

2022-08-25 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 . 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

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

2022-08-25 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

[PATCH v5 12/31] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails (v2)

2022-08-25 Thread Hans de Goede
de Goede --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 5 + drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_backlight.c | 7 +++ 3 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau

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

2022-08-25 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

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

2022-08-25 Thread Hans de Goede
call acpi_video_register_backlight() when a panel is detected Changes in v3: -Add a new intel_acpi_video_register() helper which checks if a panel is present and then calls acpi_video_register_backlight() Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/intel_acpi.c| 27

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

2022-08-25 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

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

2022-08-25 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

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

2022-08-25 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

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

2022-08-25 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

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

2022-08-25 Thread Hans de Goede
. 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/acpi

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

2022-08-25 Thread Hans de Goede
() 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 a/drivers/acpi

[PATCH v5 05/31] drm/nouveau: Don't register backlight when another backlight should be used (v2)

2022-08-25 Thread Hans de Goede
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-off-by: Hans de Goede

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

2022-08-25 Thread Hans de Goede
er 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/drivers/gpu/drm/Kconfig

[PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-08-25 Thread Hans de Goede
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: - Use drm_info(drm_dev, ...) for log messages Reviewed-by: Jani Nikula Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915

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

2022-08-25 Thread Hans de Goede
er 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/gpu/drm/Kconfig b/d

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

2022-08-25 Thread Hans de Goede
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 backlight should be used (v2) drm/amdgpu: Don't register

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

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

Re: [PATCH v4 05/31] drm/nouveau: Don't register backlight when another backlight should be used (v2)

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

Re: [RFC] drm/kms: control display brightness through drm_connector properties

2022-08-25 Thread Hans de Goede
lowly. This is likely going to take multiple years and then some ... Regards, Hans > > On Thu, Apr 7, 2022 at 10:39 AM Hans de Goede <mailto:hdego...@redhat.com>> wrote: > > As discussed already several times in the past: >  https://www.x.org/wiki/Events/XDC201

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

2022-08-24 Thread Hans de Goede
efore the 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

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

2022-08-24 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

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

2022-08-24 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

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

2022-08-24 Thread Hans de Goede
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(+) diff --git a/drivers

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

2022-08-24 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: [PATCH v4 11/31] drm/i915: Call acpi_video_register_backlight() (v2)

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

[PATCH v4 30/31] ACPI: video: Fix indentation of video_detect_dmi_table[] entries

2022-08-24 Thread Hans de Goede
t 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 --- drivers/acpi

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

2022-08-24 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

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

2022-08-24 Thread Hans de Goede
. This is 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

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

2022-08-24 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

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

2022-08-24 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

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

2022-08-24 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 67a0211c07b4..af2833b57b8b 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video

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

2022-08-24 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 Reviewed-by: Daniel Dadap Signed-off-by: Hans de Goede

[PATCH v4 05/31] drm/nouveau: Don't register backlight when another backlight should be used (v2)

2022-08-24 Thread Hans de Goede
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-off-by: Hans de Goede

[PATCH v4 22/31] platform/x86: acer-wmi: Move backlight DMI quirks to acpi/video_detect.c

2022-08-24 Thread Hans de Goede
es. 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 b/dr

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

2022-08-24 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 |

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

2022-08-24 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

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

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

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

2022-08-24 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

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

2022-08-24 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

[PATCH v4 12/31] drm/nouveau: Register ACPI video backlight when nv_backlight registration fails (v2)

2022-08-24 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. 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

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

2022-08-24 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

[PATCH v4 15/31] platform/x86: nvidia-wmi-ec-backlight: Move fw interface definitions to a header (v2)

2022-08-24 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 . 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

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

2022-08-24 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

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

2022-08-24 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

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

2022-08-24 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

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

2022-08-24 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

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

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

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

2022-08-24 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

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

2022-08-24 Thread Hans de Goede
. 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/acpi

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

2022-08-24 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

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

2022-08-24 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

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

2022-08-24 Thread Hans de Goede
er 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/gpu/drm/Kconfig b/d

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

2022-08-24 Thread Hans de Goede
er 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/drivers/gpu/drm/Kconfig

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

2022-08-24 Thread Hans de Goede
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(+) diff --git a/drivers

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

2022-08-24 Thread Hans de Goede
r-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 backlight s

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

2022-08-24 Thread Hans de Goede
() 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 a/drivers/acpi

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

2022-08-24 Thread Hans de Goede
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),

Re: [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 &

Re: [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

[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

[PATCH v3 30/31] ACPI: video: Fix indentation of video_detect_dmi_table[] entries

2022-08-18 Thread Hans de Goede
t 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 --- drivers/acpi

<    1   2   3   4   5   6   7   8   9   10   >