* [PATCH] drm/i915: Enable vblank interrupts for CRC generation
@ 2014-08-25 12:28 Chris Wilson
2014-08-25 13:24 ` Ville Syrjälä
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2014-08-25 12:28 UTC (permalink / raw)
To: intel-gfx
Pineview requires this. But this changes the debug API...
References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index d76a298a0eb7..65024a9bc95f 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2713,10 +2713,15 @@ static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
struct pipe_crc_info *info = inode->i_private;
struct drm_i915_private *dev_priv = info->dev->dev_private;
struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[info->pipe];
+ int ret;
if (info->pipe >= INTEL_INFO(info->dev)->num_pipes)
return -ENODEV;
+ ret = drm_vblank_get(dev_priv->dev, info->pipe);
+ if (ret)
+ return ret;
+
spin_lock_irq(&pipe_crc->lock);
if (pipe_crc->opened) {
@@ -2742,6 +2747,8 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep)
pipe_crc->opened = false;
spin_unlock_irq(&pipe_crc->lock);
+ drm_vblank_put(dev_priv->dev, info->pipe);
+
return 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation
2014-08-25 12:28 [PATCH] drm/i915: Enable vblank interrupts for CRC generation Chris Wilson
@ 2014-08-25 13:24 ` Ville Syrjälä
2014-08-25 13:47 ` Chris Wilson
0 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2014-08-25 13:24 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Mon, Aug 25, 2014 at 01:28:11PM +0100, Chris Wilson wrote:
> Pineview requires this. But this changes the debug API...
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
Isn't this just the same old igt_display bug that it doesn't check
that the pipe<->port combination is valid?
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index d76a298a0eb7..65024a9bc95f 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2713,10 +2713,15 @@ static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
> struct pipe_crc_info *info = inode->i_private;
> struct drm_i915_private *dev_priv = info->dev->dev_private;
> struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[info->pipe];
> + int ret;
>
> if (info->pipe >= INTEL_INFO(info->dev)->num_pipes)
> return -ENODEV;
>
> + ret = drm_vblank_get(dev_priv->dev, info->pipe);
> + if (ret)
> + return ret;
> +
> spin_lock_irq(&pipe_crc->lock);
>
> if (pipe_crc->opened) {
> @@ -2742,6 +2747,8 @@ static int i915_pipe_crc_release(struct inode *inode, struct file *filep)
> pipe_crc->opened = false;
> spin_unlock_irq(&pipe_crc->lock);
>
> + drm_vblank_put(dev_priv->dev, info->pipe);
> +
> return 0;
> }
>
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation
2014-08-25 13:24 ` Ville Syrjälä
@ 2014-08-25 13:47 ` Chris Wilson
2014-08-27 6:12 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2014-08-25 13:47 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Mon, Aug 25, 2014 at 04:24:56PM +0300, Ville Syrjälä wrote:
> On Mon, Aug 25, 2014 at 01:28:11PM +0100, Chris Wilson wrote:
> > Pineview requires this. But this changes the debug API...
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
>
> Isn't this just the same old igt_display bug that it doesn't check
> that the pipe<->port combination is valid?
It appeared to be both. I had to set it to use the right pipe for LVDS
and I had to enable interrupts for it to start reading back the CRC.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation
2014-08-25 13:47 ` Chris Wilson
@ 2014-08-27 6:12 ` Daniel Vetter
2014-08-27 9:55 ` Chris Wilson
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-08-27 6:12 UTC (permalink / raw)
To: Chris Wilson, Ville Syrjälä, intel-gfx
On Mon, Aug 25, 2014 at 02:47:17PM +0100, Chris Wilson wrote:
> On Mon, Aug 25, 2014 at 04:24:56PM +0300, Ville Syrjälä wrote:
> > On Mon, Aug 25, 2014 at 01:28:11PM +0100, Chris Wilson wrote:
> > > Pineview requires this. But this changes the debug API...
> > >
> > > References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
> >
> > Isn't this just the same old igt_display bug that it doesn't check
> > that the pipe<->port combination is valid?
>
> It appeared to be both. I had to set it to use the right pipe for LVDS
> and I had to enable interrupts for it to start reading back the CRC.
What does kms_pipe_crc_basic say on pnv? Otoh I've just tried to run that
and it completely falls over on my i945gm box, so that much for the state
of our test infrastructure.
If we can confirm that we need vblank interrupts to get the pipe crc
delivered I'd like to restrict this to just pnv (or whatever else is
affected) and add a comment explaining why we need vblank interrupts
enabled.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation
2014-08-27 6:12 ` Daniel Vetter
@ 2014-08-27 9:55 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2014-08-27 9:55 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
On Wed, Aug 27, 2014 at 08:12:23AM +0200, Daniel Vetter wrote:
> On Mon, Aug 25, 2014 at 02:47:17PM +0100, Chris Wilson wrote:
> > On Mon, Aug 25, 2014 at 04:24:56PM +0300, Ville Syrjälä wrote:
> > > On Mon, Aug 25, 2014 at 01:28:11PM +0100, Chris Wilson wrote:
> > > > Pineview requires this. But this changes the debug API...
> > > >
> > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=82280
> > >
> > > Isn't this just the same old igt_display bug that it doesn't check
> > > that the pipe<->port combination is valid?
> >
> > It appeared to be both. I had to set it to use the right pipe for LVDS
> > and I had to enable interrupts for it to start reading back the CRC.
>
> What does kms_pipe_crc_basic say on pnv? Otoh I've just tried to run that
> and it completely falls over on my i945gm box, so that much for the state
> of our test infrastructure.
Given both of your skepticism, I cleaned out my igt and tested afresh. It
works without the extra vblanks. Apologies for the noise.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-08-27 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 12:28 [PATCH] drm/i915: Enable vblank interrupts for CRC generation Chris Wilson
2014-08-25 13:24 ` Ville Syrjälä
2014-08-25 13:47 ` Chris Wilson
2014-08-27 6:12 ` Daniel Vetter
2014-08-27 9:55 ` Chris Wilson
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.