[PATCH 27/39] drm/amd/display: Fix cursor issues with ODMs and magnification
Alex Hung
alex.hung at amd.com
Thu Jun 20 16:11:33 UTC 2024
From: Nevenko Stupar <nevenko.stupar at amd.com>
[WHY & HOW]
Adjust hot spot positions between ODM slices when cursor
magnification is used.
Reviewed-by: Sridevi Arvindekar <sridevi.arvindekar at amd.com>
Cc: Mario Limonciello <mario.limonciello at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: stable at vger.kernel.org
Acked-by: Alex Hung <alex.hung at amd.com>
Signed-off-by: Nevenko Stupar <nevenko.stupar at amd.com>
---
.../gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index 79a911e1a09a..5306c8c170c5 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -1177,6 +1177,15 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)
if (x_pos < 0) {
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;
}
--
2.34.1
More information about the amd-gfx
mailing list