All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/chamelium: Require HPD storm control for basic hotplug test
Date: Tue, 13 Jun 2017 14:20:39 -0400	[thread overview]
Message-ID: <1497378039.3050.2.camel@redhat.com> (raw)
In-Reply-To: <1497357968.25733.8.camel@linux.intel.com>

NAK, igt_hpd_storm_set_threshold is expected to be called in both
situations with and without hpd storm control support. The function
should be able to notice when the host doesn't have the debugfs nodes
for hpd storm control, and just return without doing anything in that
case:

void igt_hpd_storm_set_threshold(int drm_fd, unsigned int threshold)
{
	int fd = igt_debugfs_open(drm_fd, "i915_hpd_storm_ctl", O_WRONLY);
	char buf[16];

	/* Right here is where we should be exiting if we don't have the debugfs file present */
	if (fd < 0)
		return;

	igt_debug("Setting HPD storm threshold to %d\n", threshold);
	snprintf(buf, sizeof(buf), "%d", threshold);
	igt_assert_eq(write(fd, buf, strlen(buf)), strlen(buf));

	close(fd);
	igt_install_exit_handler(igt_hpd_storm_exit_handler);
}

The igt asserts that come after that are there because if we do have
the i915_hpd_storm_ctl file but it doesn't do what we expect it to,
then that's probably an error. This being said, adding a call to
igt_require_hpd_storm_ctl(data->drm_fd); will result in the hotplugging
tests being skipped on every non-intel platform.

Are these tests no longer working on systems without hpd storm control?
The last time I tested it I didn't see any issues, but that was a while
ago.

On Tue, 2017-06-13 at 15:46 +0300, Paul Kocialkowski wrote:
> On Tue, 2017-06-13 at 15:44 +0300, Paul Kocialkowski wrote:
> > The basic hotplug test (test_basic_hotplug) makes calls to
> > igt_hpd_storm_set_threshold, which requires HPD storm control.
> > 
> > This adds a check for that control, since it was missing.
> 
> This is a resend of yesterday's patch with the right subject prefix
> so that
> patchwork can pick it up.
> 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com
> > >
> > ---
> >  tests/chamelium.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/tests/chamelium.c b/tests/chamelium.c
> > index 2e14ccb9..bd7772f8 100644
> > --- a/tests/chamelium.c
> > +++ b/tests/chamelium.c
> > @@ -153,6 +153,8 @@ test_basic_hotplug(data_t *data, struct
> > chamelium_port
> > *port)
> >  	struct udev_monitor *mon = igt_watch_hotplug();
> >  	int i;
> >  
> > +	igt_require_hpd_storm_ctl(data->drm_fd);
> > +
> >  	reset_state(data, port);
> >  	igt_hpd_storm_set_threshold(data->drm_fd, 0);
> >  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-06-13 18:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 12:44 [PATCH i-g-t] tests/chamelium: Require HPD storm control for basic hotplug test Paul Kocialkowski
2017-06-13 12:46 ` Paul Kocialkowski
2017-06-13 18:20   ` Lyude Paul [this message]
2017-06-14  7:47     ` Paul Kocialkowski
2017-06-14  7:51       ` Paul Kocialkowski
2017-06-14 10:38         ` Paul Kocialkowski

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=1497378039.3050.2.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paul.kocialkowski@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.