From: jsg Date: Thu, 17 Aug 2023 03:39:20 +0000 (+0000) Subject: drm/amd/display: check attr flag before set cursor degamma on DCN3+ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0c8dfdddd214f419b5142e52803a3d534922a911;p=openbsd drm/amd/display: check attr flag before set cursor degamma on DCN3+ From Melissa Wen c3d2d4b02e5e91b465ae85a19c05b00912f79620 in linux-6.1.y/6.1.46 96b020e2163fb2197266b2f71b1007495206e6bb in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_dpp.c b/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_dpp.c index e5b7ef7422b..50dc8340464 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_dpp.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_dpp.c @@ -357,8 +357,11 @@ void dpp3_set_cursor_attributes( int cur_rom_en = 0; if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA || - color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) - cur_rom_en = 1; + color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) { + if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) { + cur_rom_en = 1; + } + } REG_UPDATE_3(CURSOR0_CONTROL, CUR0_MODE, color_format,