Skip to content

Commit fe14c0f

Browse files
melissawenalexdeucher
authored andcommitted
Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"
This reverts commit 272e6aa. Applying degamma curve to the cursor by default breaks Linux userspace expectation. On Linux, AMD display manager enables cursor degamma ROM just for implict sRGB on HW versions where 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. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1513 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2803 Reported-by: Michel Dänzer <michel.daenzer@mailbox.org> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4144 Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit f6a305d) Cc: stable@vger.kernel.org
1 parent d33724f commit fe14c0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ void dpp401_set_cursor_attributes(
120120
enum dc_cursor_color_format color_format = cursor_attributes->color_format;
121121
int cur_rom_en = 0;
122122

123-
// DCN4 should always do Cursor degamma for Cursor Color modes
124123
if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
125124
color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
126-
cur_rom_en = 1;
125+
if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
126+
cur_rom_en = 1;
127+
}
127128
}
128129

129130
REG_UPDATE_3(CURSOR0_CONTROL,

0 commit comments

Comments
 (0)