From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, dev@lankhorst.se,
ramanaidu.naladala@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 2/2] HAX: kms_cursor_legacy: Use IGT_FORMAT_MOD_PREFERRED for cursor FBs
Date: Mon, 13 Apr 2026 22:20:06 +0530 [thread overview]
Message-ID: <20260413165006.46987-3-jeevan.b@intel.com> (raw)
In-Reply-To: <20260413165006.46987-1-jeevan.b@intel.com>
Switch all cursor-related framebuffer creations in
kms_cursor_legacy to use IGT_FORMAT_MOD_PREFERRED instead of
DRM_FORMAT_MOD_LINEAR.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_cursor_legacy.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 5399ef481..e32d2ac7e 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -373,7 +373,7 @@ static void set_fb_on_crtc(igt_display_t *display, igt_crtc_t *crtc,
igt_create_pattern_fb(display->drm_fd,
mode->hdisplay, mode->vdisplay,
- DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, fb_info);
+ DRM_FORMAT_XRGB8888, IGT_FORMAT_MOD_PREFERRED, fb_info);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_plane_set_fb(primary, fb_info);
@@ -579,7 +579,7 @@ static void prepare_flip_test(igt_display_t *display,
igt_skip_on(width <= 64 && height <= 64);
igt_create_color_fb(display->drm_fd, width, height,
- DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_LINEAR, 1., 0., .7, cursor_fb2);
+ DRM_FORMAT_ARGB8888, IGT_FORMAT_MOD_PREFERRED, 1., 0., .7, cursor_fb2);
arg[0].flags = arg[1].flags = DRM_MODE_CURSOR_BO;
arg[1].handle = cursor_fb2->gem_handle;
@@ -605,7 +605,7 @@ static void prepare_flip_test(igt_display_t *display,
crtc->planes[1].type != DRM_PLANE_TYPE_CURSOR);
igt_create_color_pattern_fb(display->drm_fd, prim_fb->width, prim_fb->height,
- DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_LINEAR, .1, .1, .1, argb_fb);
+ DRM_FORMAT_ARGB8888, IGT_FORMAT_MOD_PREFERRED, .1, .1, .1, argb_fb);
}
}
@@ -652,10 +652,10 @@ static void flip(igt_display_t *display,
}
igt_create_color_fb(display->drm_fd, fb_info.width, fb_info.height,
- DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_LINEAR, .5, .5, .5, &cursor_fb);
+ DRM_FORMAT_ARGB8888, IGT_FORMAT_MOD_PREFERRED, .5, .5, .5, &cursor_fb);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, cursor_crtc, &cursor_fb);
populate_cursor_args(display, cursor_crtc, arg, &cursor_fb);
@@ -769,7 +769,7 @@ static void basic_flip_cursor(igt_display_t *display,
set_fb_on_crtc(display, crtc, output, &fb_info);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, crtc, &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
@@ -948,7 +948,7 @@ static void flip_vs_cursor(igt_display_t *display, enum flip_test mode, int nloo
set_fb_on_crtc(display, crtc, output, &fb_info);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, crtc, &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
@@ -1089,7 +1089,7 @@ static void nonblocking_modeset_vs_cursor(igt_display_t *display, int loops)
set_fb_on_crtc(display, crtc, output, &fb_info);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, crtc, &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
arg[0].flags |= DRM_MODE_CURSOR_BO;
@@ -1216,7 +1216,7 @@ static void two_screens_flip_vs_cursor(igt_display_t *display, int nloops, bool
}
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, crtc, &cursor_fb);
populate_cursor_args(display, crtc, arg1, &cursor_fb);
@@ -1395,7 +1395,7 @@ static void cursor_vs_flip(igt_display_t *display, enum flip_test mode, int nloo
vrefresh = igt_output_get_mode(output)->vrefresh;
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursor = set_cursor_on_crtc(display, crtc, &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
@@ -1513,7 +1513,7 @@ static void two_screens_cursor_vs_flip(igt_display_t *display, int nloops, bool
}
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
cursors[0] = set_cursor_on_crtc(display, crtc[0], &cursor_fb);
populate_cursor_args(display, crtc[0], arg[0], &cursor_fb);
@@ -1628,7 +1628,7 @@ static void flip_vs_cursor_crc(igt_display_t *display, bool atomic)
set_fb_on_crtc(display, crtc, output, &fb_info);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
@@ -1709,10 +1709,11 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
set_fb_on_crtc(display, crtc, output, &fb_info[0]);
plane_primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_create_color_pattern_fb(display->drm_fd, fb_info[0].width, fb_info[0].height,
- DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, .1, .1, .1, &fb_info[1]);
+ DRM_FORMAT_XRGB8888, IGT_FORMAT_MOD_PREFERRED, .1, .1, .1,
+ &fb_info[1]);
igt_create_color_fb(display->drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
populate_cursor_args(display, crtc, arg, &cursor_fb);
igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
@@ -1816,7 +1817,7 @@ static void modeset_atomic_cursor_hotspot(igt_display_t *display)
cursor_width = cursor_height = 64;
igt_create_color_fb(display->drm_fd, cursor_width, cursor_height, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
+ IGT_FORMAT_MOD_PREFERRED, 1., 1., 1., &cursor_fb);
igt_display_commit2(display, COMMIT_ATOMIC);
--
2.43.0
next prev parent reply other threads:[~2026-04-13 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 16:50 [PATCH i-g-t 0/2] RFC: Add preferred FB modifier helper Jeevan B
2026-04-13 16:50 ` [PATCH i-g-t 1/2] lib/igt_fb: Add IGT_FORMAT_MOD_PREFERRED helper modifier Jeevan B
2026-04-13 18:06 ` Ville Syrjälä
2026-04-16 13:37 ` Maarten Lankhorst
2026-04-16 13:54 ` Ville Syrjälä
2026-04-13 16:50 ` Jeevan B [this message]
2026-04-14 0:48 ` ✗ i915.CI.BAT: failure for RFC: Add preferred FB modifier helper Patchwork
2026-04-14 1:24 ` ✗ Xe.CI.BAT: " Patchwork
2026-04-14 3:51 ` ✗ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260413165006.46987-3-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=dev@lankhorst.se \
--cc=igt-dev@lists.freedesktop.org \
--cc=ramanaidu.naladala@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox