On Fri, Sep 14, 2018 at 09:13:09PM +0100, Chris Wilson wrote:
> If the display is disabled (e.g. the driver has disabled the KMS
> interface) there is nothing to do so avoid failing.
> 
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

Silently doing nothing feels funny, I think putting the igt_require into
igt_display_init makes more sense with this one in mind. Also avoids the
churn in patch 5.
-Daniel

> ---
>  lib/igt_kms.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 9710bcae1..dedc81344 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -3271,6 +3271,9 @@ static int do_display_commit(igt_display_t *display,
>       enum pipe pipe;
>       LOG_INDENT(display, "commit");
>  
> +     if (!display->n_pipes || !display->n_outputs)
> +             return 0; /* nothing to do */
> +
>       igt_display_refresh(display);
>  
>       if (s == COMMIT_ATOMIC) {
> @@ -3321,6 +3324,9 @@ int igt_display_try_commit_atomic(igt_display_t 
> *display, uint32_t flags, void *
>  {
>       int ret;
>  
> +     if (!display->n_pipes || !display->n_outputs)
> +             return 0; /* nothing to do */
> +
>       LOG_INDENT(display, "commit");
>  
>       igt_display_refresh(display);
> -- 
> 2.19.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

Reply via email to