drm/amd/display: Fix Cursor Offset in Scaled Scenarios
authorSung Lee <sunglee@amd.com>
Thu, 4 Apr 2024 14:25:21 +0000 (10:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Aug 2024 14:37:13 +0000 (10:37 -0400)
[WHY]
Cursor position code had improper offsets in scaled modes.

[HOW]
Adjust cursor scaling to account for cursor offsets properly.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Sung Lee <sunglee@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c

index eb0da6c..846c183 100644 (file)
@@ -725,8 +725,8 @@ void hubp401_cursor_set_position(
                CURSOR_ENABLE, cur_en);
 
        REG_SET_2(CURSOR_POSITION, 0,
-               CURSOR_X_POSITION, pos->x,
-               CURSOR_Y_POSITION, pos->y);
+               CURSOR_X_POSITION, x_pos,
+               CURSOR_Y_POSITION, y_pos);
 
        REG_SET_2(CURSOR_HOT_SPOT, 0,
                CURSOR_HOT_SPOT_X, pos->x_hotspot,