From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: suraj.kandpal@intel.com, swati2.sharma@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v5 1/6] tests/kms_writeback: Add support for intel-specific formats
Date: Thu, 8 Jan 2026 21:18:12 +0530 [thread overview]
Message-ID: <20260108154817.48665-2-sowmiya.s@intel.com> (raw)
In-Reply-To: <20260108154817.48665-1-sowmiya.s@intel.com>
Integrate BGR formats supported by intel
into the supported format list and verify
format before test execution.
v4: Reframe commit message. (Suraj)
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
tests/kms_writeback.c | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 0b968baa2..691774777 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -90,6 +90,15 @@ static data_t data;
enum {
XRGB8888 = 1 << 0,
XRGB2101010 = 1 << 1,
+ XBGR8888 = 1 << 2,
+ XBGR2101010 = 1 << 3,
+};
+
+const uint32_t fourcc[] = {
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_XRGB2101010,
+ DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_XBGR2101010,
};
static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
@@ -101,11 +110,6 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
int width, height, ret;
uint16_t i;
- const uint32_t fourcc[] = {
- DRM_FORMAT_XRGB8888,
- DRM_FORMAT_XRGB2101010,
- };
-
igt_output_override_mode(output, &override_mode);
width = override_mode.hdisplay;
@@ -299,7 +303,10 @@ static void fill_fb(igt_fb_t *fb, uint32_t pixel)
uint32_t *ptr;
int64_t pixel_count, i;
- igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888 || fb->drm_format == DRM_FORMAT_XRGB2101010);
+ igt_assert(fb->drm_format == DRM_FORMAT_XRGB8888 ||
+ fb->drm_format == DRM_FORMAT_XRGB2101010 ||
+ fb->drm_format == DRM_FORMAT_XBGR8888 ||
+ fb->drm_format == DRM_FORMAT_XBGR2101010);
ptr = igt_fb_map_buffer(fb->fd, fb);
igt_assert(ptr);
@@ -334,7 +341,8 @@ static void writeback_sequence(igt_output_t *output, igt_plane_t *plane,
uint32_t clear_color = 0xffffffff;
igt_crc_t cleared_crc, out_expected;
- if (fourcc_color == DRM_FORMAT_XRGB2101010)
+ if (fourcc_color == DRM_FORMAT_XRGB2101010 ||
+ fourcc_color == DRM_FORMAT_XBGR2101010)
in_fb_colors = in_fb_colors_10bits;
else
in_fb_colors = in_fb_colors_8bits;
@@ -420,7 +428,12 @@ static void writeback_check_output(igt_output_t *output, igt_plane_t *plane,
static void do_single_commit(igt_output_t *output, igt_plane_t *plane, igt_fb_t *in_fb,
igt_fb_t *out_fb)
{
- uint32_t in_fb_color = 0xffff0000;
+ uint32_t in_fb_color;
+
+ if (data.format == DRM_FORMAT_XRGB8888 || data.format == DRM_FORMAT_XBGR8888)
+ in_fb_color = 0xffff0000;
+ else
+ in_fb_color = 0x3ff00000;
fill_fb(in_fb, in_fb_color);
--
2.43.0
next prev parent reply other threads:[~2026-01-08 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 15:48 [PATCH i-g-t v5 0/6] Add writeback changes for intel-supported formats Sowmiya S
2026-01-08 15:48 ` Sowmiya S [this message]
2026-01-08 15:48 ` [PATCH i-g-t v5 2/6] lib/igt_fb: Validate supported formats for crc calculation Sowmiya S
2026-01-08 15:48 ` [PATCH i-g-t v5 3/6] tests/kms_writeback: Add intel check for vendor-specific restriction Sowmiya S
2026-01-09 3:32 ` Kandpal, Suraj
2026-01-08 15:48 ` [PATCH i-g-t v5 4/6] tests/kms_writeback: Refactor format handling in commit_and_dump_fb Sowmiya S
2026-01-09 3:35 ` Kandpal, Suraj
2026-01-08 15:48 ` [PATCH i-g-t v5 5/6] tests/kms_writeback: Refactor writeback-fb-id subtest Sowmiya S
2026-01-08 15:48 ` [PATCH i-g-t v5 6/6] tests/kms_writeback: Refactor writeback-check-output subtest Sowmiya S
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=20260108154817.48665-2-sowmiya.s@intel.com \
--to=sowmiya.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=swati2.sharma@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