* [PATCH] drm/amd/display: fix cursor offset on rotation 180
@ 2023-01-31 16:05 Melissa Wen
2023-02-06 17:20 ` Harry Wentland
2023-02-06 17:31 ` Hamza Mahfooz
0 siblings, 2 replies; 3+ messages in thread
From: Melissa Wen @ 2023-01-31 16:05 UTC (permalink / raw)
To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan
Cc: Brian Chang, David Galiffi, Xaver Hugl, amd-gfx, kernel-dev,
Martin Leung, Martin Tsai, sungjoon.kim
Cursor gets clipped off in the middle of the screen with hw rotation
180. Fix a miscalculation of cursor offset when it's placed near the
edges in the pipe split case.
Cursor bugs with hw rotation were reported on AMD issue tracker:
https://gitlab.freedesktop.org/drm/amd/-/issues/2247
The issues on rotation 270 was fixed by:
https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/
that partially addressed the rotation 180 too. So, this patch is the
final bits for rotation 180.
Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror")
Signed-off-by: Melissa Wen <mwen@igalia.com>
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index bb155734ac93..480c0b3b51fc 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -3624,7 +3624,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 = temp_x + viewport_width;
+ pos_cpy.x = 2 * viewport_width - temp_x;
}
}
} else {
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: fix cursor offset on rotation 180
2023-01-31 16:05 [PATCH] drm/amd/display: fix cursor offset on rotation 180 Melissa Wen
@ 2023-02-06 17:20 ` Harry Wentland
2023-02-06 17:31 ` Hamza Mahfooz
1 sibling, 0 replies; 3+ messages in thread
From: Harry Wentland @ 2023-02-06 17:20 UTC (permalink / raw)
To: Melissa Wen, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan
Cc: Brian Chang, David Galiffi, Xaver Hugl, amd-gfx, kernel-dev,
Martin Leung, Martin Tsai, sungjoon.kim
On 1/31/23 11:05, Melissa Wen wrote:
> Cursor gets clipped off in the middle of the screen with hw rotation
> 180. Fix a miscalculation of cursor offset when it's placed near the
> edges in the pipe split case.
>
> Cursor bugs with hw rotation were reported on AMD issue tracker:
> https://gitlab.freedesktop.org/drm/amd/-/issues/2247
>
> The issues on rotation 270 was fixed by:
> https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/
> that partially addressed the rotation 180 too. So, this patch is the
> final bits for rotation 180.
>
> Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
> Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror")
> Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index bb155734ac93..480c0b3b51fc 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -3624,7 +3624,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 = temp_x + viewport_width;
> + pos_cpy.x = 2 * viewport_width - temp_x;
> }
> }
> } else {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: fix cursor offset on rotation 180
2023-01-31 16:05 [PATCH] drm/amd/display: fix cursor offset on rotation 180 Melissa Wen
2023-02-06 17:20 ` Harry Wentland
@ 2023-02-06 17:31 ` Hamza Mahfooz
1 sibling, 0 replies; 3+ messages in thread
From: Hamza Mahfooz @ 2023-02-06 17:31 UTC (permalink / raw)
To: Melissa Wen, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
alexander.deucher, christian.koenig, Xinhui.Pan
Cc: Brian Chang, David Galiffi, Xaver Hugl, amd-gfx, kernel-dev,
Martin Leung, Martin Tsai, sungjoon.kim
On 1/31/23 11:05, Melissa Wen wrote:
> Cursor gets clipped off in the middle of the screen with hw rotation
> 180. Fix a miscalculation of cursor offset when it's placed near the
> edges in the pipe split case.
>
> Cursor bugs with hw rotation were reported on AMD issue tracker:
> https://gitlab.freedesktop.org/drm/amd/-/issues/2247
>
> The issues on rotation 270 was fixed by:
> https://lore.kernel.org/amd-gfx/20221118125935.4013669-22-Brian.Chang@amd.com/
> that partially addressed the rotation 180 too. So, this patch is the
> final bits for rotation 180.
>
> Reported-by: Xaver Hugl <xaver.hugl@gmail.com>
> Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on horizontal mirror")
> Signed-off-by: Melissa Wen <mwen@igalia.com>
Applied, thanks!
> ---
> drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index bb155734ac93..480c0b3b51fc 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -3624,7 +3624,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 = temp_x + viewport_width;
> + pos_cpy.x = 2 * viewport_width - temp_x;
> }
> }
> } else {
--
Hamza
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-06 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 16:05 [PATCH] drm/amd/display: fix cursor offset on rotation 180 Melissa Wen
2023-02-06 17:20 ` Harry Wentland
2023-02-06 17:31 ` Hamza Mahfooz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.