From: Greg Kroah-Hartman Date: Wed, 20 Sep 2023 11:14:36 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v5.10.196~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08ed1d5aa3707cebd4b8df6772b51602022b38c6;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch --- diff --git a/queue-5.15/drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch b/queue-5.15/drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch new file mode 100644 index 00000000000..41556dc37d4 --- /dev/null +++ b/queue-5.15/drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch @@ -0,0 +1,44 @@ +From 57a943ebfcdb4a97fbb409640234bdb44bfa1953 Mon Sep 17 00:00:00 2001 +From: Melissa Wen +Date: Thu, 31 Aug 2023 15:12:28 -0100 +Subject: drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma + +From: Melissa Wen + +commit 57a943ebfcdb4a97fbb409640234bdb44bfa1953 upstream. + +For DRM legacy gamma, AMD display manager applies implicit sRGB degamma +using a pre-defined sRGB transfer function. It works fine for DCN2 +family where degamma ROM and custom curves go to the same color block. +But, on DCN3+, degamma is split into two blocks: degamma ROM for +pre-defined TFs and `gamma correction` for user/custom curves and +degamma ROM settings doesn't apply to cursor plane. To get DRM legacy +gamma working as expected, enable cursor degamma ROM for implict sRGB +degamma on HW with this configuration. + +Cc: stable@vger.kernel.org +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2803 +Fixes: 96b020e2163f ("drm/amd/display: check attr flag before set cursor degamma on DCN3+") +Signed-off-by: Melissa Wen +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -8794,6 +8794,13 @@ static void handle_cursor_update(struct + attributes.rotation_angle = 0; + attributes.attribute_flags.value = 0; + ++ /* Enable cursor degamma ROM on DCN3+ for implicit sRGB degamma in DRM ++ * legacy gamma setup. ++ */ ++ if (crtc_state->cm_is_degamma_srgb && ++ adev->dm.dc->caps.color.dpp.gamma_corr) ++ attributes.attribute_flags.bits.ENABLE_CURSOR_DEGAMMA = 1; ++ + attributes.pitch = afb->base.pitches[0] / afb->base.format->cpp[0]; + + if (crtc_state->stream) { diff --git a/queue-5.15/series b/queue-5.15/series index be7fbfe2e58..675a193acf7 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -107,3 +107,4 @@ ext4-fix-rec_len-verify-error.patch drm-amd-display-fix-the-white-screen-issue-when-64gb-dram.patch drm-amdgpu-fix-amdgpu_cs_p1_user_fence.patch net-sched-retire-rsvp-classifier.patch +drm-amd-display-enable-cursor-degamma-for-dcn3-drm-legacy-gamma.patch