From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Pranay Samala <pranay.samala@intel.com>,
Vinod Govindapillai <vinod.govindapillai@intel.com>
Subject: [PATCH i-g-t, v2 5/7] tests/intel/kms_frontbuffer_tracking: Add FBC support to FP16 formats
Date: Wed, 7 Jan 2026 15:05:33 +0530 [thread overview]
Message-ID: <20260107093535.70116-6-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260107093535.70116-1-swati2.sharma@intel.com>
From: Pranay Samala <pranay.samala@intel.com>
Add FBC support to FP16 formats.
Signed-off-by: Pranay Samala <pranay.samala@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
tests/intel/kms_frontbuffer_tracking.c | 58 +++++++++++++++++++++++---
1 file changed, 53 insertions(+), 5 deletions(-)
diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index f2e7c72f6..dee3e898f 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -411,6 +411,8 @@
*
* @rgb101010: FORMAT_RGB101010
* @rgb565: FORMAT_RGB565
+ * @argb161616f: FORMAT_ARGB161616F
+ * @abgr161616f: FORMAT_ABGR161616F
*
* arg[2]:
*
@@ -444,6 +446,8 @@
*
* @rgb101010: FORMAT_RGB101010
* @rgb565: FORMAT_RGB565
+ * @argb161616f: FORMAT_ARGB161616F
+ * @abgr161616f: FORMAT_ABGR161616F
*
* arg[2]:
*
@@ -865,6 +869,8 @@ struct test_mode {
FORMAT_RGB888 = 0,
FORMAT_RGB565,
FORMAT_RGB101010,
+ FORMAT_ARGB161616F,
+ FORMAT_ABGR161616F,
FORMAT_COUNT,
FORMAT_DEFAULT = FORMAT_RGB888,
} format;
@@ -909,7 +915,7 @@ struct rect {
int y;
int w;
int h;
- uint32_t color;
+ uint64_t color;
};
struct {
@@ -1277,6 +1283,22 @@ static void create_fb(enum pixel_format pformat, int width, int height,
else
format = DRM_FORMAT_XRGB8888;
break;
+ case FORMAT_ARGB161616F:
+ if (plane == PLANE_PRI)
+ format = DRM_FORMAT_ARGB16161616F;
+ else if (plane == PLANE_CUR)
+ format = DRM_FORMAT_ARGB8888;
+ else
+ format = DRM_FORMAT_ARGB16161616F;
+ break;
+ case FORMAT_ABGR161616F:
+ if (plane == PLANE_PRI)
+ format = DRM_FORMAT_ABGR16161616F;
+ else if (plane == PLANE_CUR)
+ format = DRM_FORMAT_ARGB8888;
+ else
+ format = DRM_FORMAT_ABGR16161616F;
+ break;
default:
igt_assert(false);
}
@@ -1288,9 +1310,9 @@ static void create_fb(enum pixel_format pformat, int width, int height,
igt_create_fb(drm.fd, width, height, format, modifier, fb);
}
-static uint32_t pick_color(struct igt_fb *fb, enum color ecolor)
+static uint64_t pick_color(struct igt_fb *fb, enum color ecolor)
{
- uint32_t color, r, g, b, b2, a;
+ uint64_t color, r, g, b, b2, a;
bool alpha = false;
switch (fb->drm_format) {
@@ -1319,6 +1341,22 @@ static uint32_t pick_color(struct igt_fb *fb, enum color ecolor)
b = 0x3FF;
b2 = 0x200;
break;
+ case DRM_FORMAT_ARGB16161616F:
+ alpha = true;
+ a = 0x3C00ULL << 48;
+ r = 0x3C00ULL << 32;
+ g = 0x3C00ULL << 16;
+ b = 0x3C00ULL;
+ b2 = 0x3800ULL;
+ break;
+ case DRM_FORMAT_ABGR16161616F:
+ alpha = true;
+ a = 0x3C00ULL << 48;
+ b = 0x3C00ULL << 32;
+ g = 0x3C00ULL << 16;
+ r = 0x3C00ULL;
+ b2 = 0x3800ULL;
+ break;
default:
igt_assert(false);
}
@@ -1838,7 +1876,7 @@ static void fill_fb_region(struct fb_region *region,
enum igt_draw_method method,
enum color ecolor)
{
- uint32_t color = pick_color(region->fb, ecolor);
+ uint64_t color = pick_color(region->fb, ecolor);
igt_draw_rect_fb(drm.fd, drm.bops, 0, region->fb, method,
region->x, region->y, region->w, region->h,
@@ -2474,7 +2512,7 @@ static void set_region_for_test(const struct test_mode *t,
static void set_plane_for_test_fbc(const struct test_mode *t, igt_plane_t *plane)
{
struct igt_fb fb;
- uint32_t color;
+ uint64_t color;
igt_info("Testing fbc on plane %i%s\n", plane->index + 1, kmstest_pipe_name(prim_mode_params.pipe));
@@ -2950,6 +2988,9 @@ static bool format_is_valid(int feature_flags,
return true;
case FORMAT_RGB101010:
return false;
+ case FORMAT_ARGB161616F:
+ case FORMAT_ABGR161616F:
+ return true;
default:
igt_assert(false);
}
@@ -4021,6 +4062,10 @@ static const char *format_str(enum pixel_format format)
return "rgb565";
case FORMAT_RGB101010:
return "rgb101010";
+ case FORMAT_ARGB161616F:
+ return "argb161616f";
+ case FORMAT_ABGR161616F:
+ return "abgr161616f";
default:
igt_assert(false);
}
@@ -4367,6 +4412,9 @@ int igt_main_args("", long_options, help_str, opt_handler, NULL)
format_str(t.format),
igt_draw_get_method_name(t.method))
{
+ if (t.format == FORMAT_ARGB161616F ||
+ t.format == FORMAT_ABGR161616F)
+ igt_require(drm.display_ver >= 35);
igt_require(igt_draw_supports_method(drm.fd, t.method));
format_draw_subtest(&t);
}
--
2.25.1
next prev parent reply other threads:[~2026-01-07 9:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 9:35 [PATCH i-g-t,v2 0/7] Add NVL display related test updates Swati Sharma
2026-01-07 9:35 ` [PATCH i-g-t, v2 1/7] tests/intel/kms_big_fb: NVL supports horizontal flip with linear surfaces Swati Sharma
2026-01-08 15:32 ` Juha-Pekka Heikkilä
2026-01-09 8:37 ` Karthik B S
2026-01-07 9:35 ` [PATCH i-g-t, v2 2/7] tests/intel/kms_flip_scaled_crc: add flip to reflect-x tests Swati Sharma
2026-01-08 15:31 ` Juha-Pekka Heikkilä
2026-01-09 8:47 ` Karthik B S
2026-01-07 9:35 ` [PATCH i-g-t, v2 3/7] tests/kms_plane: add test and limitations for odd height planar tests Swati Sharma
2026-01-08 15:30 ` Juha-Pekka Heikkilä
2026-01-12 8:09 ` Karthik B S
2026-01-07 9:35 ` [PATCH i-g-t, v2 4/7] tests/kms_plane: modify the condition for odd pan Swati Sharma
2026-01-08 15:31 ` Juha-Pekka Heikkilä
2026-01-12 8:11 ` Karthik B S
2026-01-07 9:35 ` Swati Sharma [this message]
2026-01-07 9:35 ` [PATCH i-g-t,v2 6/7] intel-ci: Add NVL display blocklist Swati Sharma
2026-01-07 9:35 ` [PATCH i-g-t, v2 7/7] tests/intel/kms_test_config: Add NVL display blocklist entry Swati Sharma
2026-01-07 10:48 ` ✓ Xe.CI.BAT: success for Add NVL display related test updates (rev2) Patchwork
2026-01-07 10:55 ` ✓ i915.CI.BAT: " Patchwork
2026-01-07 13:17 ` ✗ Xe.CI.Full: failure " Patchwork
2026-01-07 14:24 ` ✗ i915.CI.Full: " Patchwork
2026-01-14 5:17 ` ✓ i915.CI.Full: success " 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=20260107093535.70116-6-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=pranay.samala@intel.com \
--cc=vinod.govindapillai@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