diff mbox

[i-g-t,1/2] lib/igt_fb: Add support for DRM_FORMAT_C8 format

Message ID 1510671515-522-2-git-send-email-juhapekka.heikkila@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Juha-Pekka Heikkila Nov. 14, 2017, 2:58 p.m. UTC
DRM_FORMAT_C8 is needed for kms_rotation_crc test

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 lib/igt_fb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ville Syrjälä Nov. 14, 2017, 3:20 p.m. UTC | #1
On Tue, Nov 14, 2017 at 04:58:34PM +0200, Juha-Pekka Heikkila wrote:
> DRM_FORMAT_C8 is needed for kms_rotation_crc test
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  lib/igt_fb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index d4eaed7..00d52f7 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -67,6 +67,7 @@ static struct format_desc_struct {
>  	DF(XRGB8888,	RGB24,		32, 24),
>  	DF(XRGB2101010,	RGB30,		32, 30),
>  	DF(ARGB8888,	ARGB32,		32, 32),
> +	DF(C8,		A8,		 8,  8),

What I've been thinking for pixel formats not supported by cairo is that
we'd add software routines to convert between them and XRGB8888 and hook
that up so that we do the conversion to/from XRGB888 in the cairo
surface create/destroy hooks. And if we go nuts we could even expand
rendercopy to do some of the format conversions for us on the GPU.

For the time being, I think it's probably better to just check for C8
in the test and skip the cairo stuff entirely. Since this is just for
the bad-format test we don't actually need the fb to have any real
content.

>  };
>  #undef DF
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index d4eaed7..00d52f7 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -67,6 +67,7 @@  static struct format_desc_struct {
 	DF(XRGB8888,	RGB24,		32, 24),
 	DF(XRGB2101010,	RGB30,		32, 30),
 	DF(ARGB8888,	ARGB32,		32, 32),
+	DF(C8,		A8,		 8,  8),
 };
 #undef DF