]> Gentwo Git Trees - linux/.git/commit
drm/amd/display: Support HW cursor 180 rot for any number of pipe splits
authorIvan Lipski <ivan.lipski@amd.com>
Thu, 7 Aug 2025 13:45:26 +0000 (09:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2025 17:57:49 +0000 (13:57 -0400)
commit8a359f0f138d5ac7ceffd21b73279be50e516c0a
tree4e99d6d8865fed3df4e0b9aa77d7b3c7f4d1556c
parentdbe88861742ebdb277aaf8963c9bfb876436106c
drm/amd/display: Support HW cursor 180 rot for any number of pipe splits

[Why]
For the HW cursor, its current position in the pipe_ctx->stream struct is
not affected by the 180 rotation, i. e. the top left corner is still at
0,0. However, the DPP & HUBP set_cursor_position functions require rotated
position.

The current approach is hard-coded for ODM 2:1, thus it's failing for
ODM 4:1, resulting in a double cursor.

[How]
Instead of calculating the new cursor position relatively to the
viewports, we calculate it using a viewavable clip_rect of each plane.

The clip_rects are first offset and scaled to the same space as the
src_rect, i. e. Stream space -> Plane space.

In case of a pipe split, which divides the plane into 2 or more viewports,
the clip_rect is the union of all the viewports of the given plane.

With the assumption that the viewports in HUBP's set_cursor_position are
in the Plane space as well, it should produce a correct cursor position
for any number of pipe splits.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c