Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
	igt-dev@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [igt-dev] [PATCH i-g-t] igt/kms_addfb_basic: require display
Date: Thu, 28 Jun 2018 13:54:52 +0200	[thread overview]
Message-ID: <20180628115452.GU13978@phenom.ffwll.local> (raw)
In-Reply-To: <1d53f282-e85a-08e6-9fc1-dc4d645fd86e@linux.intel.com>

On Thu, Jun 28, 2018 at 12:19:57PM +0200, Maarten Lankhorst wrote:
> Op 28-06-18 om 11:56 schreef Jani Nikula:
> > Running the tests with i915.disable_display=1 leads to IGT errors. Skip
> > tests that need display.
> >
> > References: http://patchwork.freedesktop.org/patch/msgid/20180608124057.6889-1-jani.nikula@intel.com
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >
> > ---
> >
> > What's the best paradigm for this? There's loads of random and cargo
> > culted igt_requires for this stuff, with various checks on pipes > 0
> > etc.
> > ---
> igt_display_require_output() is the easiest check to find if an output
> is connected, should be approximately same as display enabled. :)

Unfortunately not quite. I think we do want to run these tests here on
headless systems which have a display block, but no outputs connected.
Just for better test coverage and all that.

I think what we want is a new

igt_require_display(int fd)
{
	igt_display_t display;
	igt_display_init(&display, fd);
	igt_require(display->n_pipes > 0, "drm driver without display
	hardware\n");
}

gtkdoc plus wiring it up needed too ofc.

We could also patch up igt_display_init() to check for this (and probably
should, not sure about that), but a very simply igt_require helper that
only takes the fd seems useful to me for all the low-level tests like
kms_addfb_basic here which don't want/need a full igt_display_t
initialized.
-Daniel

> 
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> 
> >  tests/kms_addfb_basic.c | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> > index 7d8852f02003..e7d3c0e298a3 100644
> > --- a/tests/kms_addfb_basic.c
> > +++ b/tests/kms_addfb_basic.c
> > @@ -543,9 +543,15 @@ int fd;
> >  
> >  igt_main
> >  {
> > -	igt_fixture
> > +	igt_display_t display;
> > +
> > +	igt_fixture {
> >  		fd = drm_open_driver_master(DRIVER_ANY);
> >  
> > +		igt_display_init(&display, fd);
> > +		igt_display_require_output(&display);
> > +	}
> > +
> >  	invalid_tests(fd);
> >  
> >  	pitch_tests(fd);
> > @@ -560,6 +566,8 @@ igt_main
> >  
> >  	prop_tests(fd);
> >  
> > -	igt_fixture
> > +	igt_fixture {
> > +		igt_display_fini(&display);
> >  		close(fd);
> > +	}
> >  }
> 
> 

-- 
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

  reply	other threads:[~2018-06-28 11:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28  9:56 [igt-dev] [PATCH i-g-t] igt/kms_addfb_basic: require display Jani Nikula
2018-06-28 10:19 ` Maarten Lankhorst
2018-06-28 11:54   ` Daniel Vetter [this message]
2018-06-28 12:06     ` Maarten Lankhorst
2018-06-28 12:10       ` Daniel Vetter
2018-06-28 12:22         ` Maarten Lankhorst
2018-06-28 13:12           ` Daniel Vetter
2018-06-28 13:21             ` Maarten Lankhorst
2018-07-16 23:17               ` Souza, Jose
2018-06-28 10:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-06-28 12:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20180628115452.GU13978@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=maarten.lankhorst@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