From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Test 8bpp
Date: Wed, 5 Jun 2019 16:32:25 +0200 [thread overview]
Message-ID: <e9dea608-6132-7df8-194a-c5b4c80fdada@linux.intel.com> (raw)
In-Reply-To: <20190529083643.25609-1-ville.syrjala@linux.intel.com>
Op 29-05-2019 om 10:36 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Now that igt_fb has some support for C8 we can enable
> the 8bpp subtests.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_big_fb.c | 38 ++++++++++++++++++++++++++++++++++++--
> 1 file changed, 36 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
> index b8813a333643..5989c5b291f0 100644
> --- a/tests/kms_big_fb.c
> +++ b/tests/kms_big_fb.c
> @@ -206,6 +206,34 @@ static void cleanup_fb(data_t *data)
> data->big_fb.fb_id = 0;
> }
>
> +static void set_c8_lut(data_t *data)
> +{
> + igt_pipe_t *pipe = &data->display.pipes[data->pipe];
> + struct drm_color_lut *lut;
> + int i, lut_size = 256;
> +
> + lut = calloc(lut_size, sizeof(lut[0]));
> +
> + /* igt_fb uses RGB332 for C8 */
> + for (i = 0; i < lut_size; i++) {
> + lut[i].red = ((i & 0xe0) >> 5) * 0xffff / 0x7;
> + lut[i].green = ((i & 0x1c) >> 2) * 0xffff / 0x7;
> + lut[i].blue = ((i & 0x03) >> 0) * 0xffff / 0x3;
> + }
> +
> + igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, lut,
> + lut_size * sizeof(lut[0]));
> +
> + free(lut);
> +}
> +
> +static void unset_lut(data_t *data)
> +{
> + igt_pipe_t *pipe = &data->display.pipes[data->pipe];
> +
> + igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
> +}
> +
> static bool test_plane(data_t *data)
> {
> igt_plane_t *plane = data->plane;
> @@ -355,6 +383,9 @@ static bool test_pipe(data_t *data)
> igt_remove_fb(data->drm_fd, &fb);
> }
>
> + if (data->format == DRM_FORMAT_C8)
> + set_c8_lut(data);
> +
> igt_display_commit2(&data->display, data->display.is_atomic ?
> COMMIT_ATOMIC : COMMIT_UNIVERSAL);
>
> @@ -367,6 +398,9 @@ static bool test_pipe(data_t *data)
> break;
> }
>
> + if (data->format == DRM_FORMAT_C8)
> + unset_lut(data);
> +
> igt_pipe_crc_free(data->pipe_crc);
>
> igt_output_set_pipe(data->output, PIPE_ANY);
> @@ -545,7 +579,6 @@ static const struct {
> uint32_t format;
> uint8_t bpp;
> } formats[] = {
> - /* FIXME igt_fb doesn't support C8 currently */
> { DRM_FORMAT_C8, 8, },
> { DRM_FORMAT_RGB565, 16, },
> { DRM_FORMAT_XRGB8888, 32, },
> @@ -654,7 +687,8 @@ igt_main
>
> igt_subtest_f("%s-%dbpp-rotate-%d", modifiers[i].name,
> formats[j].bpp, rotations[k].angle) {
> - igt_require(igt_fb_supported_format(data.format));
> + igt_require(data.format == DRM_FORMAT_C8 ||
> + igt_fb_supported_format(data.format));
> igt_require(igt_display_has_format_mod(&data.display, data.format, data.modifier));
> test_scanout(&data);
> }
Should add a require igt_pipe_obj_has_property(IGT_CRTC_GAMMA_LUT) somewhere, with that:
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-06-05 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 8:36 [igt-dev] [PATCH i-g-t] tests/kms_big_fb: Test 8bpp Ville Syrjala
2019-05-29 10:11 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-29 14:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-06-05 14:32 ` Maarten Lankhorst [this message]
2019-06-05 15:56 ` [igt-dev] [PATCH i-g-t] " 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=e9dea608-6132-7df8-194a-c5b4c80fdada@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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