drm: Add panel backlight quirks
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Nov 2024 18:09:35 +0000 (19:09 +0100)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 21 Nov 2024 15:28:11 +0000 (09:28 -0600)
commit22e5c7ae12145af13785e3ff138395d5b1a22116
tree32a0753f861346656462c316e3ce3b17205aedfa
parentdbf7986f8a56ce47465bb6e0f2b2d166b931d707
drm: Add panel backlight quirks

Panels using a PWM-controlled backlight source do not have a standard
way to communicate their valid PWM ranges.
On x86 the ranges are read from ACPI through driver-specific tables.
The built-in ranges are not necessarily correct, or may grow stale if an
older device can be retrofitted with newer panels.

Add a quirk infrastructure with which the minimum valid backlight value
can be maintained as part of the kernel.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Dustin L. Howett <dustin@howett.net>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-1-f662851fda69@weissschuh.net
Documentation/gpu/drm-kms-helpers.rst
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_panel_backlight_quirks.c [new file with mode: 0644]
include/drm/drm_utils.h