drm/amd/display: Hardware cursor changes color when switched to software cursor

[Why & How]
DCN4 Cursor has separate degamma block and should always
do Cursor degamma for Cursor color modes.

Reviewed-by: Chris Park <chris.park@amd.com>
Signed-off-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Nevenko Stupar 2024-08-15 18:45:18 -04:00 committed by Alex Deucher
parent 4e9e50b6ae
commit 272e6aab14

View File

@ -120,11 +120,10 @@ void dpp401_set_cursor_attributes(
enum dc_cursor_color_format color_format = cursor_attributes->color_format;
int cur_rom_en = 0;
// DCN4 should always do Cursor degamma for Cursor Color modes
if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
cur_rom_en = 1;
}
cur_rom_en = 1;
}
REG_UPDATE_3(CURSOR0_CONTROL,