Hi IVAN.LIPSKI, On 2025-07-17 at 16:41:46 -0400, ivan.lip...@amd.com wrote: > From: Ivan Lipski <ivan.lip...@amd.com> > > [Why & How] > The AMD display hardware does not use dedicated cursor planes. > Instead, the cursor is rendered either using the primary plane > or an available overlay plane. This test verifies that the > cursor correctly falls back from native to overlay mode > when the underneath primary plane is incompatible. It also tests > > It has 4 subtests: > > rgb-to-yuv > Switches the primary plane to a NV12 format FB and verifies that > the cursor falls back from native to overlay. > > non-full > Switches the primary planeto a FB that does not fill the entire CRTC > (currently sized at a quarter of the CRTC). > > scaling-[50,75,125,150,175,200] > Switches the primary plane to a FB with a chosen scaling (50%-200%), which > is then filled in the CRTC. > > no-available-planes > Enables all available overlay planes, a primary plane and a cursor. Then > switches the primary plane to YUV to cause the cursor to fall back to > overlay. Verifies that the atomic commit fails due to no available overlay > planes. > > Signed-off-by: Ivan Lipski <ivan.lip...@amd.com> > --- > tests/amdgpu/amd_cursor_overlay.c | 433 ++++++++++++++++++++++++++++++ > tests/amdgpu/meson.build | 1 + > 2 files changed, 434 insertions(+) > create mode 100644 tests/amdgpu/amd_cursor_overlay.c > > diff --git a/tests/amdgpu/amd_cursor_overlay.c > b/tests/amdgpu/amd_cursor_overlay.c > new file mode 100644 > index 000000000..52cae8454 > --- /dev/null > +++ b/tests/amdgpu/amd_cursor_overlay.c > @@ -0,0 +1,433 @@ > +/* > + * Copyright 2025 Advanced Micro Devices, Inc. > + * > + * Permission is hereby granted, free of charge, to any person obtaining a
Please remove it and use SPDX instead. +cc Vitaly Regards, Kamil > + * copy of this software and associated documentation files (the "Software"), > + * to deal in the Software without restriction, including without limitation > + * the rights to use, copy, modify, merge, publish, distribute, sublicense, > + * and/or sell copies of the Software, and to permit persons to whom the > + * Software is furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > + > +#include "igt.h" > + [cut]