From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com, suraj.kandpal@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v4 2/6] lib/igt_fb: Validate supported formats for crc calculation
Date: Wed, 3 Dec 2025 15:13:03 +0530 [thread overview]
Message-ID: <20251203094307.3187669-3-sowmiya.s@intel.com> (raw)
In-Reply-To: <20251203094307.3187669-1-sowmiya.s@intel.com>
Add logic to verify that provided formats
are supported before proceeding with test
execution for crc calculation
v4: Remove BGR2101010 format verification from
fnv1a function
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
---
lib/igt_fb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 0a8299d26..80695a0d8 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -5000,7 +5000,8 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)
if (fb->num_planes != 1)
return -EINVAL;
- if (fb->drm_format != DRM_FORMAT_XRGB8888 && fb->drm_format != DRM_FORMAT_XRGB2101010)
+ if (fb->drm_format != DRM_FORMAT_XRGB8888 && fb->drm_format != DRM_FORMAT_XRGB2101010 &&
+ fb->drm_format != DRM_FORMAT_XBGR8888)
return -EINVAL;
ptr = igt_fb_map_buffer(fb->fd, fb);
@@ -5027,7 +5028,8 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)
for (x = 0; x < fb->width; x++) {
uint32_t pixel = le32_to_cpu(line[x]);
- if (fb->drm_format == DRM_FORMAT_XRGB8888)
+ if (fb->drm_format == DRM_FORMAT_XRGB8888 ||
+ fb->drm_format == DRM_FORMAT_XBGR8888)
pixel &= 0x00ffffff;
else if (fb->drm_format == DRM_FORMAT_XRGB2101010)
pixel &= 0x3fffffff;
--
2.43.0
next prev parent reply other threads:[~2025-12-03 9:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 9:43 [PATCH i-g-t v4 0/6] Add writeback changes for intel-supported formats Sowmiya S
2025-12-03 9:43 ` [PATCH i-g-t v4 1/6] tests/kms_writeback: Add support for intel-specific formats Sowmiya S
2026-01-08 5:14 ` Kandpal, Suraj
2025-12-03 9:43 ` Sowmiya S [this message]
2026-01-08 5:16 ` [PATCH i-g-t v4 2/6] lib/igt_fb: Validate supported formats for crc calculation Kandpal, Suraj
2025-12-03 9:43 ` [PATCH i-g-t v4 3/6] tests/kms_writeback: Add intel specific check Sowmiya S
2026-01-08 5:18 ` Kandpal, Suraj
2026-01-08 9:35 ` S, Sowmiya
2025-12-03 9:43 ` [PATCH i-g-t v4 4/6] tests/kms_writeback: Refactor format handling in commit_and_dump_fb Sowmiya S
2026-01-08 5:13 ` Kandpal, Suraj
2026-01-08 9:34 ` S, Sowmiya
2025-12-03 9:43 ` [PATCH i-g-t v4 5/6] tests/kms_writeback: Refactor writeback-fb-id subtest Sowmiya S
2026-01-08 5:25 ` Kandpal, Suraj
2026-01-12 8:56 ` Kamil Konieczny
2026-01-12 15:54 ` S, Sowmiya
2025-12-03 9:43 ` [PATCH i-g-t v4 6/6] tests/kms_writeback: Refactor writeback-check-output subtest Sowmiya S
2026-01-08 5:31 ` Kandpal, Suraj
2025-12-03 10:57 ` ✗ Xe.CI.BAT: failure for Add writeback changes for intel-supported formats (rev4) Patchwork
2025-12-03 10:59 ` ✗ i915.CI.BAT: " Patchwork
2025-12-03 12:36 ` ✓ Xe.CI.Full: success " Patchwork
2025-12-04 23:07 ` [PATCH i-g-t v4 0/6] Add writeback changes for intel-supported formats Alex Hung
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=20251203094307.3187669-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.