Commit 51dbe023 authored by Nevenko Stupar's avatar Nevenko Stupar Committed by Alex Deucher

drm/amd/display: Fix cursor size issues

[WHY & HOW]
Fix the cursor size between ODM slices.
Reviewed-by: default avatarSridevi Arvindekar <sridevi.arvindekar@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarNevenko Stupar <nevenko.stupar@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3a82f62b
...@@ -1169,6 +1169,20 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) ...@@ -1169,6 +1169,20 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)
x_pos -= (prev_odm_width + prev_odm_offset); x_pos -= (prev_odm_width + prev_odm_offset);
} }
/* If the position is negative then we need to add to the hotspot
* to fix cursor size between ODM slices
*/
if (x_pos < 0) {
pos_cpy.x_hotspot -= x_pos;
x_pos = 0;
}
if (y_pos < 0) {
pos_cpy.y_hotspot -= y_pos;
y_pos = 0;
}
pos_cpy.x = (uint32_t)x_pos; pos_cpy.x = (uint32_t)x_pos;
pos_cpy.y = (uint32_t)y_pos; pos_cpy.y = (uint32_t)y_pos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment