From: Sung Lee <sung...@amd.com>

[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.sique...@amd.com>
Signed-off-by: Sung Lee <sung...@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.sique...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c 
b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
index eb0da6c6b87c..846c183fe3a8 100644
--- a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
+++ b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
@@ -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,
-- 
2.43.0

Reply via email to