public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Kevin Strasser <kevin.strasser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [RFC 3/5] tests/kms_available_modes_crc: Add cases for 64bit formats
Date: Sat,  2 Mar 2019 17:39:04 -0800	[thread overview]
Message-ID: <1551577146-2348-4-git-send-email-kevin.strasser@intel.com> (raw)
In-Reply-To: <1551577146-2348-1-git-send-email-kevin.strasser@intel.com>

This test iterates through all supported formats, add cases for new 64 bit
formats so it continues passing.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
---
 tests/kms_available_modes_crc.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..fd20f28 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -124,10 +124,11 @@ static const struct {
 	enum		{ BYTES_PP_1=1,
 				BYTES_PP_2=2,
 				BYTES_PP_4=4,
+				BYTES_PP_8=8,
 				NV12,
 				P010,
 				SKIP4 } bpp;
-	uint32_t	value;
+	uint64_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
 	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
@@ -146,6 +147,11 @@ static const struct {
 	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
 
+	{ DRM_FORMAT_XRGB16161616F, 0, BYTES_PP_8, 0x3c003c003c003c00},
+	{ DRM_FORMAT_XBGR16161616F, 0, BYTES_PP_8, 0x3c003c003c003c00},
+	{ DRM_FORMAT_ARGB16161616F, 0, BYTES_PP_8, 0x3c003c003c003c00},
+	{ DRM_FORMAT_ABGR16161616F, 0, BYTES_PP_8, 0x3c003c003c003c00},
+
 	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
 	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
 	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
@@ -177,6 +183,7 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	signed i, c, writesize;
 	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
+	unsigned long int* ptemp_64_buf;
 
 	for( i = 0; fillers[i].fourcc != 0; i++ ) {
 		if( fillers[i].fourcc == format )
@@ -184,6 +191,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	}
 
 	switch (fillers[i].bpp) {
+	case BYTES_PP_8:
+		ptemp_64_buf = (unsigned long int*)data->buf;
+		for (c = 0; c < data->size/8; c++)
+			ptemp_64_buf[c] = fillers[i].value;
+		writesize = data->size;
+		break;
 	case BYTES_PP_4:
 		ptemp_32_buf = (unsigned int*)data->buf;
 		for (c = 0; c < data->size/4; c++)
@@ -291,6 +304,10 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+
+	case BYTES_PP_8:
+		bpp = 64;
+		break;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-03-03  1:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03  1:39 [igt-dev] [RFC 0/5] Add support for fp16 formats Kevin Strasser
2019-03-03  1:39 ` [igt-dev] [RFC 1/5] lib: Add halffloat implementation Kevin Strasser
2019-03-04  8:16   ` Maarten Lankhorst
2019-03-04 17:03     ` Strasser, Kevin
2019-03-05 11:21       ` Maarten Lankhorst
2019-03-03  1:39 ` [igt-dev] [RFC 2/5] include: Add fp16 format defines Kevin Strasser
2019-03-03  1:39 ` Kevin Strasser [this message]
2019-03-04  8:17   ` [igt-dev] [RFC 3/5] tests/kms_available_modes_crc: Add cases for 64bit formats Maarten Lankhorst
2019-03-03  1:39 ` [igt-dev] [RFC 4/5] lib/igt_fb: Add support for fp16 formats through conversion Kevin Strasser
2019-03-03  1:39 ` [igt-dev] [RFC 5/5] tests/kms_plane_scaling: Skip testing unsupported fp16 features Kevin Strasser
2019-03-04  8:35   ` Maarten Lankhorst
2019-03-04 17:21     ` Strasser, Kevin
2019-03-03  2:11 ` [igt-dev] ✓ Fi.CI.BAT: success for Add support for fp16 formats Patchwork
2019-03-03  3:06 ` [igt-dev] ✓ Fi.CI.IGT: " 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=1551577146-2348-4-git-send-email-kevin.strasser@intel.com \
    --to=kevin.strasser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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