Commit adcd67e0 authored by Nevenko Stupar's avatar Nevenko Stupar Committed by Alex Deucher

drm/amd/display: Fix cursor issues with ODMs and magnification

[WHY & HOW]
Adjust hot spot positions between ODM slices when cursor
magnification is used.
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 4228900a
...@@ -1177,6 +1177,15 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) ...@@ -1177,6 +1177,15 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)
if (x_pos < 0) { if (x_pos < 0) {
pos_cpy.x_hotspot -= x_pos; pos_cpy.x_hotspot -= x_pos;
if ((odm_combine_on) && (hubp->curs_attr.attribute_flags.bits.ENABLE_MAGNIFICATION)) {
if (hubp->curs_attr.width <= 128) {
pos_cpy.x_hotspot /= 2;
pos_cpy.x_hotspot += 1;
} else {
pos_cpy.x_hotspot /= 2;
pos_cpy.x_hotspot += 2;
}
}
x_pos = 0; x_pos = 0;
} }
......
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