[PATCH i-g-t 07/12] tests/kms_frontbuffer_tracking: Use igt_create_fb()
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Dec 20 17:59:29 UTC 2023
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Calling igt_calc_fb_size() and igt_create_fb_with_bo_size() like
this back to back is the same as just calling igt_create_fb().
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tests/intel/kms_frontbuffer_tracking.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index 1daf27d2e006..f3dc30024691 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1615,8 +1615,7 @@ static void create_fb(enum pixel_format pformat, int width, int height,
enum tiling_type tiling, int plane, struct igt_fb *fb)
{
uint32_t format;
- uint64_t size, modifier;
- unsigned int stride;
+ uint64_t modifier;
switch (pformat) {
case FORMAT_RGB888:
@@ -1650,13 +1649,7 @@ static void create_fb(enum pixel_format pformat, int width, int height,
igt_warn_on(plane == PLANE_CUR && tiling != TILING_LINEAR);
- igt_calc_fb_size(drm.fd, width, height, format, modifier, &size,
- &stride);
-
- igt_create_fb_with_bo_size(drm.fd, width, height, format, modifier,
- IGT_COLOR_YCBCR_BT709,
- IGT_COLOR_YCBCR_LIMITED_RANGE,
- fb, size, stride);
+ igt_create_fb(drm.fd, width, height, format, modifier, fb);
}
static uint32_t pick_color(struct igt_fb *fb, enum color ecolor)
--
2.41.0
More information about the igt-dev
mailing list