From: Daniel Stone <daniels@collabora.com>
To: intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch
Subject: [PATCH i-g-t 4/8] tests/kms_ccs: Paramaterize color for framebuffer
Date: Tue, 8 Aug 2017 17:16:41 +0100 [thread overview]
Message-ID: <20170808161645.25329-4-daniels@collabora.com> (raw)
In-Reply-To: <20170808161645.25329-1-daniels@collabora.com>
Will be used in later patches.
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
tests/kms_ccs.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index c02a0433..50bb2ad6 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -48,14 +48,12 @@ typedef struct {
enum test_flags flags;
} data_t;
+#define RED 0x00ff0000
#define COMPRESSED_RED 0x0ff0000f
-#define COMPRESSED_GREEN 0x000ff00f
-#define COMPRESSED_BLUE 0x00000fff
#define CCS_UNCOMPRESSED 0x0
#define CCS_COMPRESSED 0x55
-#define RED 0x00ff0000
static void render_fb(data_t *data, uint32_t gem_handle, unsigned int size,
enum test_fb_flags fb_flags,
@@ -63,6 +61,8 @@ static void render_fb(data_t *data, uint32_t gem_handle, unsigned int size,
{
uint32_t *ptr;
unsigned int half_height, half_size;
+ uint32_t uncompressed_color = RED;
+ uint32_t compressed_color = COMPRESSED_RED;
int i;
ptr = gem_mmap__cpu(data->drm_fd, gem_handle, 0, size,
@@ -83,13 +83,13 @@ static void render_fb(data_t *data, uint32_t gem_handle, unsigned int size,
half_size = half_height * stride;
for (i = 0; i < size / 4; i++) {
if (i < half_size / 4)
- ptr[i] = RED;
+ ptr[i] = uncompressed_color;
else
- ptr[i] = COMPRESSED_RED;
+ ptr[i] = compressed_color;
}
} else {
for (i = 0; i < size / 4; i++)
- ptr[i] = RED;
+ ptr[i] = uncompressed_color;
}
munmap(ptr, size);
--
2.13.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-08-08 16:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 16:16 [PATCH i-g-t 1/8] tests/kms_ccs: Convert int/bool to enum Daniel Stone
2017-08-08 16:16 ` [PATCH i-g-t 2/8] tests/kms_ccs: Split FB generation into helper Daniel Stone
2017-08-08 16:16 ` [PATCH i-g-t 3/8] tests/kms_ccs: Remove excessive FB alignment Daniel Stone
2017-08-08 16:16 ` Daniel Stone [this message]
2017-08-08 16:16 ` [PATCH i-g-t 5/8] tests/kms_ccs: Reshuffle test name and loop Daniel Stone
2017-08-08 16:16 ` [PATCH i-g-t 6/8] tests/kms_ccs: Test for supported modifier Daniel Stone
2017-08-10 4:48 ` Jason Ekstrand
2017-08-08 16:16 ` [PATCH i-g-t 7/8] tests/kms_ccs: Split all tests into subtests Daniel Stone
2017-08-08 16:16 ` [PATCH i-g-t 8/8] tests/kms_ccs: Test CCS on sprite planes Daniel Stone
2017-08-10 5:20 ` Jason Ekstrand
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=20170808161645.25329-4-daniels@collabora.com \
--to=daniels@collabora.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.