[RFC PATCH v5 20/32] lib/igt_fb: Allow any non-planar format for igt_copy_fb

Harry Wentland harry.wentland at amd.com
Mon Feb 26 21:14:04 UTC 2024


The function is able to handle any non-planar format. It's been
tested for XRGB8888 and XRGB2101010 so far but should work
for a wider range of formats.

Signed-off-by: Harry Wentland <harry.wentland at amd.com>
---
 lib/igt_fb.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 13e9c29b1f3f..3c1a166ca2e9 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2166,10 +2166,6 @@ unsigned int igt_copy_fb(int fd, struct igt_fb *src, struct igt_fb *fb)
 	if (src->num_planes != 1)
 		return -EINVAL;
 
-	/* TODO expand for other formats */
-	if (src->drm_format != DRM_FORMAT_XRGB8888)
-		return -EINVAL;
-
 	fb_id = igt_create_fb(fd, src->width, src->height, src->drm_format,
 			    src->modifier, fb);
 
-- 
2.44.0



More information about the igt-dev mailing list