From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/3] lib/igt_fb: Add support for C8 pixel format
Date: Thu, 16 May 2019 19:59:14 +0300 [thread overview]
Message-ID: <20190516165915.2324-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20190516165915.2324-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Expose C8 support by utilizing pixman's rgb332 support.
By using rgb332 we don't have to worry too much about
how to populate the LUT, though for now we still leave
that responsibility to individual tests. If desired we
could make igt_kms generate a suitable LUT when the test
itself didn't bother. But meh for now.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_fb.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index c6e18397b754..9d4f905e169e 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -98,6 +98,12 @@ static const struct format_desc_struct {
.num_planes = 1, .plane_bpp = { 16, },
.hsub = 1, .vsub = 1,
},
+ { .name = "C8", .depth = -1, .drm_id = DRM_FORMAT_C8,
+ .cairo_id = CAIRO_FORMAT_INVALID,
+ .pixman_id = PIXMAN_r3g3b2,
+ .num_planes = 1, .plane_bpp = { 8, },
+ .hsub = 1, .vsub = 1,
+ },
{ .name = "XRGB1555", .depth = -1, .drm_id = DRM_FORMAT_XRGB1555,
.cairo_id = CAIRO_FORMAT_INVALID,
.pixman_id = PIXMAN_x1r5g5b5,
@@ -3233,6 +3239,15 @@ bool igt_fb_supported_format(uint32_t drm_format)
{
const struct format_desc_struct *f;
+ /*
+ * C8 needs a LUT which (at least for the time being)
+ * is the responsibility of each test. Not all tests
+ * have the required code so let's keep C8 hidden from
+ * most eyes.
+ */
+ if (drm_format == DRM_FORMAT_C8)
+ return false;
+
for_each_format(f)
if (f->drm_id == drm_format)
return (f->cairo_id != CAIRO_FORMAT_INVALID) ||
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-05-16 16:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 16:59 [igt-dev] [PATCH i-g-t 1/3] tests/kms_available_modes_crc: Remove C8 test Ville Syrjala
2019-05-16 16:59 ` Ville Syrjala [this message]
2019-05-16 16:59 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_plane: Test C8 pixel format Ville Syrjala
2019-05-28 10:59 ` Maarten Lankhorst
2019-05-16 17:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tests/kms_available_modes_crc: Remove C8 test Patchwork
2019-05-16 23:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-05-28 13:06 ` Ville Syrjälä
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=20190516165915.2324-2-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.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