linux/include/drm
Antheas Kapenekakis aef10b1138 drm: panel-backlight-quirks: Add brightness mask quirk
Certain OLED devices malfunction on specific brightness levels.
Specifically, when DP_SOURCE_BACKLIGHT_LEVEL is written to with
the first byte being 0x00 and sometimes 0x01, the panel forcibly
turns off until the device sleeps again.

Below are some examples. This was found by iterating over brighness
ranges while printing DP_SOURCE_BACKLIGHT_LEVEL. It was found that
the screen would malfunction on specific values, and some of them
were collected.

Therefore, introduce a quirk where the minor byte of brightness is
OR'd with 0x03 to avoid the range of invalid values.

This quirk was tested by removing the workarounds and iterating
from 0 to 50_000 value ranges with a cadence of 0.2s/it. The
range of the panel is 1000...400_000, so the values were slightly
interpolated during testing. The custom brightness curve added on
6.15 was disabled.

 86016:  10101000000000000
 86272:  10101000100000000
 87808:  10101011100000000
251648: 111101011100000000
251649: 111101011100000001

 86144:  10101000010000000
 87809:  10101011100000001
251650: 111101011100000010

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3803
Tested-by: Philip Müller <philm@manjaro.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250829145541.512671-5-lkml@antheas.dev
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-09-03 10:23:01 -05:00
..
amd drm/amd/amdgpu: Add helper functions for isp buffers 2025-07-16 16:17:35 -04:00
bridge drm/bridge: synopsys: Add DW DPTX Controller support library 2025-08-28 15:49:51 +03:00
clients
display drm-misc-next for 6.17: 2025-07-04 11:54:31 +10:00
intel drm/xe/bmg: Add one additional PCI ID 2025-07-04 14:55:51 +01:00
ttm drm/ttm: add new api ttm_device_prepare_hibernation() 2025-07-10 10:49:44 -05:00
Makefile scripts/kernel-doc.py: don't create *.pyc files 2025-04-24 10:12:46 -06:00
amd_asic_type.h
drm_accel.h drm: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00
drm_atomic.h drm/atomic: Introduce helper to lookup connector by encoder 2025-03-20 14:45:46 +01:00
drm_atomic_helper.h drm/atomic-helper: Introduce drm_atomic_helper_reset_crtc() 2025-02-13 16:17:46 +01:00
drm_atomic_state_helper.h
drm_atomic_uapi.h
drm_audio_component.h
drm_auth.h
drm_blend.h
drm_bridge.h drm/bridge: add drm_bridge_is_last() 2025-09-02 11:38:29 +02:00
drm_bridge_connector.h
drm_bridge_helper.h drm/bridge: Add helper to reset bridge pipeline 2025-03-20 14:45:48 +01:00
drm_buddy.h drm/amdgpu: Reset the clear flag in buddy during resume 2025-07-16 12:50:32 +02:00
drm_cache.h
drm_client.h drm/client: Send pending hotplug events after resume 2025-03-05 21:48:49 +01:00
drm_client_event.h drm/client: include types.h to make drm_client_event.h self-contained 2025-02-12 10:44:43 +02:00
drm_color_mgmt.h drm/color-mgmt: Prepare for RGB332 palettes 2025-08-26 09:54:18 +02:00
drm_connector.h drm-misc-next for 6.17: 2025-06-27 09:58:05 +10:00
drm_crtc.h drm: add clone mode check for CRTC 2025-01-08 01:39:58 +02:00
drm_crtc_helper.h
drm_damage_helper.h drm/damage-helper: add const qualifier in drm_atomic_helper_damage_merged() 2025-03-03 14:45:40 +02:00
drm_debugfs.h drm: add debugfs support on per client-id basis 2025-07-04 15:59:06 +02:00
drm_debugfs_crc.h
drm_device.h drm: Add missing struct drm_wedge_task_info kernel doc 2025-07-10 18:07:47 -03:00
drm_drv.h drm: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00
drm_edid.h drm/dp: Add an EDID quirk for the DPCD register access probe 2025-06-12 20:44:01 +03:00
drm_eld.h
drm_encoder.h
drm_exec.h
drm_fb_dma_helper.h
drm_fb_helper.h drm/fb-helper: Remove struct drm_fb_helper.fb_probe 2025-03-05 21:48:50 +01:00
drm_fbdev_dma.h
drm_fbdev_shmem.h
drm_fbdev_ttm.h
drm_file.h drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
drm_fixed.h
drm_flip_work.h
drm_format_helper.h drm/format-helper: introduce drm_fb_xrgb8888_to_gray2() 2025-09-01 15:35:07 +02:00
drm_fourcc.h drm: Pass pixel_format+modifier directly to drm_get_format_info() 2025-07-16 20:01:13 +03:00
drm_framebuffer.h drm/framebuffer: Acquire internal references on GEM handles 2025-07-09 14:03:28 +02:00
drm_gem.h gpuvm: remove gem.gpuva.lock_dep_map 2025-08-28 12:40:43 +02:00
drm_gem_atomic_helper.h
drm_gem_dma_helper.h
drm_gem_framebuffer_helper.h drm/gem/afbc: Eliminate redundant drm_get_format_info() 2025-07-16 20:06:22 +03:00
drm_gem_shmem_helper.h drm/gem-shmem: Do not map s/g table by default 2025-07-07 15:23:41 +02:00
drm_gem_ttm_helper.h
drm_gem_vram_helper.h drm/gem-vram: Un-export pin helpers 2025-05-30 09:47:28 +02:00
drm_gpusvm.h drm/gpusvm: Make drm_gpusvm_for_each_* macros public 2025-08-19 21:19:36 -07:00
drm_gpuvm.h gpuvm: remove gem.gpuva.lock_dep_map 2025-08-28 12:40:43 +02:00
drm_ioctl.h
drm_kunit_helpers.h Merge tag 'drm-misc-next-2025-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next 2025-04-14 15:29:49 +10:00
drm_lease.h
drm_managed.h drm: Simplify drmm_alloc_ordered_workqueue return 2025-07-03 10:14:56 -07:00
drm_mipi_dbi.h
drm_mipi_dsi.h drm: Add MIPI read_multi func and two write macros 2025-08-14 15:42:26 -07:00
drm_mm.h
drm_mode_config.h drm: Pass the format info to .fb_create() 2025-07-16 20:03:14 +03:00
drm_mode_object.h drm/drm_mode_object: fix typo in kerneldoc 2025-02-04 14:11:14 +01:00
drm_modes.h
drm_modeset_helper.h drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct() 2025-07-16 20:04:45 +03:00
drm_modeset_helper_vtables.h drm/atomic: Let drivers decide which planes to async flip 2025-02-14 00:54:29 +02:00
drm_modeset_lock.h
drm_module.h
drm_of.h
drm_pagemap.h drm/pagemap: Add a populate_mm op 2025-06-26 18:00:09 +02:00
drm_panel.h drm/panel: Allow powering on panel follower after panel is enabled 2025-08-25 09:17:49 -07:00
drm_panic.h drm/panic: Add a private field to struct drm_scanout_buffer 2025-06-27 11:48:22 +02:00
drm_pciids.h
drm_plane.h drm/plane: Add new plane property IN_FORMATS_ASYNC 2025-05-09 15:29:40 +05:30
drm_plane_helper.h
drm_prime.h drm/shmem-helper: Import dmabuf without mapping its sg_table 2025-06-03 09:21:01 +02:00
drm_print.h drm/print: Add drm_coredump_printer_is_full 2025-04-24 15:51:41 -07:00
drm_privacy_screen_consumer.h
drm_privacy_screen_driver.h
drm_privacy_screen_machine.h
drm_probe_helper.h drm/probe-helper: Do not fail from drmm_kms_helper_poll_init() 2025-03-24 09:31:03 +01:00
drm_property.h
drm_rect.h
drm_self_refresh_helper.h
drm_simple_kms_helper.h
drm_suballoc.h
drm_syncobj.h
drm_sysfs.h
drm_util.h drm: Move for_each_if() to util_macros.h for wider use 2025-02-17 14:27:35 +01:00
drm_utils.h drm: panel-backlight-quirks: Add brightness mask quirk 2025-09-03 10:23:01 -05:00
drm_vblank.h
drm_vblank_work.h
drm_vma_manager.h
drm_writeback.h drm: writeback: Create drmm variants for drm_writeback_connector initialization 2025-01-21 10:32:33 +01:00
gpu_scheduler.h drm/sched: Allow drivers to skip the reset and keep on running 2025-07-15 08:27:07 -03:00
gud.h
spsc_queue.h drm/sched: Increment job count before swapping tail spsc queue 2025-07-01 16:14:47 -07:00
task_barrier.h