Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 69cb5629 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Alex Deucher
Browse files

drm/amd/display: Use oriented source size when checking cursor scaling


dm_check_crtc_cursor() doesn't take into account plane transforms when
calculating plane scaling, this can result in false positives.

For example, if there's an output with resolution 3840x2160 and the
output is rotated 90 degrees, CRTC_W and CRTC_H will be 3840 and 2160,
respectively, but SRC_W and SRC_H will be 2160 and 3840, respectively.

Since the cursor plane usually has a square buffer attached to it, the
dm_check_crtc_cursor() will think that there's a scale factor mismatch
even though there isn't really.

This fixes an issue where kwin fails to use hardware plane transforms.

Changes since version 1:
- s/orientated/oriented/g

Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: default avatarVlad Zahorodnii <vlad.zahorodnii@kde.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b220110e
Branches
Tags
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