[Intel-gfx] [PATCH i-g-t 5/6] tests/kms_panel_fitting: Skip sprite test if we exceed sprite scaling limits
Petri Latvala
petri.latvala at intel.com
Wed Sep 27 11:34:18 UTC 2017
On Thu, Sep 21, 2017 at 05:39:32PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> g4x-bdw surface isn't allowed to exceed 2kx2k pixels when scaling, and
> the stride must not exceed 4k bytes. The test tries to scale a 1920x1080
> 32bpp image which exceeds the sprite's stride limitations. Let's make
> the test a bit more tolerant and just ignore failures from the sprite
> tests. This does reduce the usefulness of the test somewhat, but without
> CRC support the test isn't all that useful anyway.
>
> Bugzilla: https://bugs.freedesktop.org/attachment.cgi?id=132953
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> tests/kms_panel_fitting.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 5266862a70cf..af3e39fd7b22 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -197,12 +197,16 @@ static void test_panel_fitting(data_t *d)
> igt_fb_set_size(&d->fb2, d->plane2, d->fb2.width-200, d->fb2.height-200);
> igt_plane_set_position(d->plane2, 100, 100);
> igt_plane_set_size(d->plane2, mode->hdisplay-200, mode->vdisplay-200);
> - igt_display_commit2(display, COMMIT_UNIVERSAL);
> -
> - /* enable panel fitting along with sprite scaling */
> - mode->hdisplay = 1024;
> - mode->vdisplay = 768;
> - prepare_crtc(d, output, pipe, d->plane1, mode, COMMIT_LEGACY);
> + /*
> + * The sprite may not be able to scale such a large image.
> + * Just skip the sprite scaling tests in that case.
> + */
> + if (!igt_display_try_commit2(display, COMMIT_UNIVERSAL)) {
> + /* enable panel fitting along with sprite scaling */
> + mode->hdisplay = 1024;
> + mode->vdisplay = 768;
> + prepare_crtc(d, output, pipe, d->plane1, mode, COMMIT_LEGACY);
> + }
else
igt_info("Not gonna do sprite scaling\n");
maybe? With a better string.
--
Petri Latvala
More information about the Intel-gfx
mailing list