From: "Souza, Jose" <jose.souza@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add timeouts to opening pipe CRC fd.
Date: Thu, 5 Apr 2018 22:10:43 +0000 [thread overview]
Message-ID: <bf275d8fa6a5d0786985f027c4600ec39ffdc9bc.camel@intel.com> (raw)
In-Reply-To: <152296295828.23264.8747800026923056263@mail.alporthouse.com>
On Thu, 2018-04-05 at 22:15 +0100, Chris Wilson wrote:
> Quoting Souza, Jose (2018-04-05 22:03:46)
> > On Thu, 2018-04-05 at 12:49 +0200, Maarten Lankhorst wrote:
> > > This will fix the PSR tests to fail slightly faster, since they
> > > wait
> > > indefinitely for a CRC that never comes during open.
> > >
> > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.c
> > > om>
> > > ---
> > > lib/igt_debugfs.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> > > index 8adc02e9cc47..094df564b6f4 100644
> > > --- a/lib/igt_debugfs.c
> > > +++ b/lib/igt_debugfs.c
> > > @@ -757,7 +757,10 @@ void igt_pipe_crc_start(igt_pipe_crc_t
> > > *pipe_crc)
> > >
> > > sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
> > >
> > > + igt_set_timeout(5, "Opening crc fd, which waits for first
> > > CRC.");
> > > pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc-
> > > > flags);
> > >
> > > + igt_reset_timeout();
> >
> > Hum I was able to reproduce this one too in a KBL, I was thinking
> > in
> > add a timeout in the kernel side, if it don't get the CRC buffer
> > filled
> > it would return a error.
>
> That would be unexpected behaviour for a read() interface. If you
> want a
> timeout, implement poll().
Not change the read() but return a error in open() when timeout
happens:
"
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c
b/drivers/gpu/drm/drm_debugfs_crc.c
index 9f8312137cad..223cd45b3aff 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -206,9 +206,10 @@ static int crtc_crc_open(struct inode *inode,
struct file *filep)
* guess when this particular piece of HW will be ready to
start
* generating CRCs.
*/
- ret = wait_event_interruptible_lock_irq(crc->wq,
- crtc_crc_data_count(cr
c),
- crc->lock);
+ ret = wait_event_interruptible_lock_irq_timeout(crc->wq,
+ crtc_crc_data_
count(crc),
+ crc->lock,
+ msecs_to_jiffi
es(2500));
spin_unlock_irq(&crc->lock);
if (ret)
"
> -Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-04-05 22:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 10:49 [igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add timeouts to opening pipe CRC fd Maarten Lankhorst
2018-04-05 11:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-04-05 21:03 ` [igt-dev] [PATCH i-g-t] " Souza, Jose
2018-04-05 21:15 ` Chris Wilson
2018-04-05 22:10 ` Souza, Jose [this message]
2018-04-05 22:39 ` Dhinakaran Pandiyan
2018-04-06 7:33 ` Maarten Lankhorst
2018-04-06 18:27 ` Dhinakaran Pandiyan
2018-04-10 15:28 ` Maarten Lankhorst
2018-05-24 1:05 ` Dhinakaran Pandiyan
2018-05-24 6:59 ` Maarten Lankhorst
2018-04-06 18:17 ` Dhinakaran Pandiyan
2018-04-11 7:46 ` Maarten Lankhorst
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=bf275d8fa6a5d0786985f027c4600ec39ffdc9bc.camel@intel.com \
--to=jose.souza@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--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 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.