[PATCH i-g-t] tests/intel/kms_pm_rpm: Update cursor_fb3 framebuffer creation format

Juha-Pekka Heikkilä juhapekka.heikkila at gmail.com
Thu Dec 5 11:35:31 UTC 2024


On Thu, Dec 5, 2024 at 7:45 AM Jeevan B <jeevan.b at intel.com> wrote:
>
> Updated the cursor_fb3 framebuffer creation in the cursor subtest
> function to use a supported tiling format, either X-tile or linear,
> for supported platforms.
>
> Signed-off-by: Jeevan B <jeevan.b at intel.com>
> ---
>  tests/intel/kms_pm_rpm.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/kms_pm_rpm.c b/tests/intel/kms_pm_rpm.c
> index 990c50915..283911afb 100644
> --- a/tests/intel/kms_pm_rpm.c
> +++ b/tests/intel/kms_pm_rpm.c
> @@ -1198,8 +1198,13 @@ static void cursor_subtest(bool dpms)
>                       DRM_FORMAT_MOD_LINEAR, &cursor_fb1);
>         igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
>                       DRM_FORMAT_MOD_LINEAR, &cursor_fb2);
> -       igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_XRGB8888,
> -                     I915_FORMAT_MOD_X_TILED, &cursor_fb3);
> +       if (igt_display_has_format_mod(&ms_data.display, DRM_FORMAT_XRGB8888,
> +                                     I915_FORMAT_MOD_X_TILED))
> +               igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_XRGB8888,
> +                             I915_FORMAT_MOD_X_TILED, &cursor_fb3);
> +       else
> +               igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_XRGB8888,
> +                             DRM_FORMAT_MOD_LINEAR, &cursor_fb3);

How does this change align with that few lines below is this:

        /* Cursor 3 was created with tiling and painted with a GTT mmap, so
         * hopefully it has some fences around it. */
        rc = drmModeRmFB(drm_fd, cursor_fb3.fb_id);
        igt_assert_eq(rc, 0);
        __gem_set_tiling(drm_fd, cursor_fb3.gem_handle, false,
cursor_fb3.strides[0]);

?

Regardless if here would be tried to set linear tile mode to linear
tile mode that __gem_set_tiling is going to say in any case it's not
supported on the same platforms as where x-tile is not available, see
here https://patchwork.freedesktop.org/patch/325343/

>
>         fill_igt_fb(&cursor_fb1, 0xFF00FFFF);
>         fill_igt_fb(&cursor_fb2, 0xFF00FF00);
> --
> 2.25.1
>


More information about the igt-dev mailing list