The cursor plane can't be displayed if the underlying pipe isn't using an RGB format. Reject such atomic commits so that user-space can have a fallback instead of an invisible cursor. In theory we could support YUV if the cursor is also YUV, but at the moment only ARGB8888 cursors are supported. Signed-off-by: Simon Ser <contact@xxxxxxxxxxx> Cc: Alex Deucher <alexander.deucher@xxxxxxx> Cc: Harry Wentland <hwentlan@xxxxxxx> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index a5d6010405bf..6e7f4a182e89 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9250,6 +9250,13 @@ static int dm_check_crtc_cursor(struct drm_atomic_state *state, return -EINVAL; } + /* In theory we could probably support YUV cursors when the underlying + * plane uses a YUV format, but there's no use-case for it yet. */ + if (new_underlying_state->fb->format->is_yuv) { + drm_dbg_atomic(crtc->dev, "Cursor plane can't be used with YUV underlying plane\n"); + return -EINVAL; + } + return 0; } -- 2.30.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx