]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Adjust cursor position
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Thu, 1 Aug 2024 22:16:35 +0000 (16:16 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2024 15:35:43 +0000 (17:35 +0200)
commit 56fb276d0244d430496f249335a44ae114dd5f54 upstream.

[why & how]
When the commit 9d84c7ef8a87 ("drm/amd/display: Correct cursor position
on horizontal mirror") was introduced, it used the wrong calculation for
the position copy for X. This commit uses the correct calculation for that
based on the original patch.

Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8f9b23abbae5ffcd64856facd26a86b67195bc2f)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c

index 3306684e805acbdb6220a9e3f03465501bd4d994..847dc58be84fc07c8521e2b3b4c620d0e4a72d36 100644 (file)
@@ -3698,7 +3698,7 @@ void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx)
                                                (int)hubp->curs_attr.width || pos_cpy.x
                                                <= (int)hubp->curs_attr.width +
                                                pipe_ctx->plane_state->src_rect.x) {
-                                               pos_cpy.x = 2 * viewport_width - temp_x;
+                                               pos_cpy.x = temp_x + viewport_width;
                                        }
                                }
                        } else {