Skip to contentSkip to conversation

Revert "drm/amd/display: Enable cur_rom_en even if cursor degamma is not enabled"

PATCH In review Rodrigo Siqueira 2 participants 2 messages Apr 11, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "drm/amd/display: Enable cur_rom_en even if cursor degamma is not enabled"

This reverts commit 5aba567a2988400d4e01d44493c84bed92820d8d.

The original patch introduces cursor gamma issue to multiple Linux compositors. For this reason this commit reverts this change.

Cc Melissa Wen <[email protected]>
Cc Harry Wentland <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +3 -1
index ed1e2f65f5b5..f8c0cee34080 100644
@@ -395,7 +395,9 @@ void dpp3_set_cursor_attributes(
 
 	if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
 		color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
-		cur_rom_en = 1;
+		if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
+			cur_rom_en = 1;
+		}
 	}
 
 	REG_UPDATE_3(CURSOR0_CONTROL,
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Rodrigo Siqueira

This reverts commit 5aba567a2988400d4e01d44493c84bed92820d8d.

The original patch introduces cursor gamma issue to multiple Linux compositors. For this reason this commit reverts this change.

Thanks for checking the issue.

Quoted 26 lines
Cc Melissa Wen <[email protected]>
Cc Harry Wentland <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +3 -1
index ed1e2f65f5b5..f8c0cee34080 100644
@@ -395,7 +395,9 @@ void dpp3_set_cursor_attributes(
 
 	if (color_format == CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA ||
 		color_format == CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA) {
-		cur_rom_en = 1;
+		if (cursor_attributes->attribute_flags.bits.ENABLE_CURSOR_DEGAMMA) {
+			cur_rom_en = 1;
+		}
 	}
 
 	REG_UPDATE_3(CURSOR0_CONTROL,
Signature · 1 line
2.43.0