mirror-linux/drivers/gpu/drm/amd/display/amdgpu_dm
Melissa Wen 97a0f2b5f4 drm/amd/display: Disable CRTC degamma LUT for DCN401
In DCN401 pre-blending degamma LUT isn't affecting cursor as in previous
DCN version. As this is not the behavior close to what is expected for
CRTC degamma LUT, disable CRTC degamma LUT property in this HW.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4176
---

When enabling HDR on KDE, it takes the first CRTC 1D LUT available and
apply a color transformation (Gamma 2.2 -> PQ). AMD driver usually
advertises a CRTC degamma LUT as the first CRTC 1D LUT, but it's
actually applied pre-blending. In previous HW version, it seems to work
fine because the 1D LUT was applied to cursor too, but DCN401 presents a
different behavior and the 1D LUT isn't affecting the hardware cursor.

To address the wrong gamma on cursor with HDR (see the link), I came up
with this patch that disables CRTC degamma LUT in this hw, since it
presents a different behavior than others. With this KDE sees CRTC
regamma LUT as the first post-blending 1D LUT available. This is
actually more consistent with AMD color pipeline. It was tested by the
reporter, since I don't have the HW available for local testing and
debugging.

Melissa
---

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 340231cdce)
Cc: stable@vger.kernel.org
2025-07-16 16:47:43 -04:00
..
Makefile drm/amd/display: Restructure DMI quirks 2025-05-13 09:30:52 -04:00
amdgpu_dm.c drm/amd/display: Don't allow OLED to go down to fully off 2025-06-30 14:01:05 -04:00
amdgpu_dm.h drm/amd/display: Restructure DMI quirks 2025-05-13 09:30:52 -04:00
amdgpu_dm_color.c
amdgpu_dm_crc.c drm/amd/display: Do not wait for PSR disable on vbl enable 2025-01-10 12:07:05 -05:00
amdgpu_dm_crc.h drm/amd/display: Extend secure display to support DisplayCRC mode 2025-01-10 12:03:52 -05:00
amdgpu_dm_crtc.c drm/amd/display: Disable CRTC degamma LUT for DCN401 2025-07-16 16:47:43 -04:00
amdgpu_dm_crtc.h drm/amd/display: Disable replay and psr while VRR is enabled 2025-01-06 14:44:27 -05:00
amdgpu_dm_debugfs.c drm/amd/display: Fix BT2020 YCbCr limited/full range input 2025-02-19 15:14:10 -05:00
amdgpu_dm_debugfs.h
amdgpu_dm_hdcp.c amd-drm-next-6.16-2025-05-09: 2025-05-12 07:14:34 +10:00
amdgpu_dm_hdcp.h
amdgpu_dm_helpers.c drm/amd/display: Add sanity checks for drm_edid_raw() 2025-06-24 10:39:24 -04:00
amdgpu_dm_irq.c drm/amd/display: Disable unneeded hpd interrupts during dm_init 2025-03-10 13:23:31 -04:00
amdgpu_dm_irq.h drm/amd/display: Change amdgpu_dm_irq_resume_*() to void 2025-03-05 10:41:51 -05:00
amdgpu_dm_irq_params.h drm/amd/display: Adjust dm to use supported interfaces for setting multiple crc windows 2025-01-06 14:44:26 -05:00
amdgpu_dm_mst_types.c drm/amd/display: Avoid flooding unnecessary info messages 2025-05-13 13:38:20 -04:00
amdgpu_dm_mst_types.h drm/amd/display: Fix MST BW calculation Regression 2024-08-13 10:48:07 -04:00
amdgpu_dm_plane.c drm/amd/display: Adjust all dev_*() messages to drm_*() 2025-04-07 18:01:07 -04:00
amdgpu_dm_plane.h drm/amd/display: Update dc_tiling_info union to structure 2025-01-06 14:44:27 -05:00
amdgpu_dm_pp_smu.c
amdgpu_dm_psr.c drm/amd/display: Move PSR support message into amdgpu_dm 2025-04-07 18:01:07 -04:00
amdgpu_dm_psr.h drm/amd/display: Do not wait for PSR disable on vbl enable 2025-01-10 12:07:05 -05:00
amdgpu_dm_quirks.c drm/amd/display: Restructure DMI quirks 2025-05-13 09:30:52 -04:00
amdgpu_dm_replay.c
amdgpu_dm_replay.h
amdgpu_dm_services.c
amdgpu_dm_trace.h
amdgpu_dm_wb.c drm/amd/display: Adjust all dev_*() messages to drm_*() 2025-04-07 18:01:07 -04:00
amdgpu_dm_wb.h
dc_fpu.c
dc_fpu.h