public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_rmfb: Ignore plane configuration errors
Date: Fri, 29 Mar 2019 09:53:39 +0100	[thread overview]
Message-ID: <20190329085339.GE2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190327200839.20034-1-ville.syrjala@linux.intel.com>

On Wed, Mar 27, 2019 at 10:08:39PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We may not be able to turn on all the planes (eg. due to memory
> bandwidth limitations). Let's accept that fact and simply turn
> on as many planes as we can.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  tests/kms_rmfb.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/tests/kms_rmfb.c b/tests/kms_rmfb.c
> index b1c81cb80b54..a7fcab87233a 100644
> --- a/tests/kms_rmfb.c
> +++ b/tests/kms_rmfb.c
> @@ -58,6 +58,7 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo
>  	igt_plane_t *plane;
>  	drmModeCrtc *crtc;
>  	uint64_t cursor_width, cursor_height;
> +	int num_active_planes = 0;
>  
>  	igt_output_set_pipe(output, pipe);
>  
> @@ -85,8 +86,25 @@ test_rmfb(struct rmfb_data *data, igt_output_t *output, enum pipe pipe, bool reo
>  		} else {
>  			igt_plane_set_fb(plane, &fb);
>  		}
> +
> +		if (igt_display_try_commit2(&data->display, data->display.is_atomic ?
> +					    COMMIT_ATOMIC : COMMIT_LEGACY)) {
> +			/*
> +			 * Disable any plane that fails (presumably
> +			 * due to exceeding some hardware limit).
> +			 */
> +			igt_plane_set_fb(plane, NULL);
> +		} else {
> +			num_active_planes++;
> +		}
>  	}

I guess if we're really unlucky we might not test all that much anymore,
but primary plane should be first so hopefully we're good.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>  
> +	/*
> +	 * Make sure we were able to enable at least one
> +	 * plane so that we actually test something.
> +	 */
> +	igt_assert_lt(0, num_active_planes);
> +
>  	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>  
>  	crtc = drmModeGetCrtc(data->drm_fd, output->config.crtc->crtc_id);
> -- 
> 2.19.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2019-03-29  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 20:08 [igt-dev] [PATCH i-g-t] tests/kms_rmfb: Ignore plane configuration errors Ville Syrjala
2019-03-27 21:03 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-28 17:49 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-29  8:53 ` Daniel Vetter [this message]

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=20190329085339.GE2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --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