All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation
Date: Mon, 25 Aug 2014 16:24:56 +0300	[thread overview]
Message-ID: <20140825132456.GC4193@intel.com> (raw)
In-Reply-To: <1408969691-5223-1-git-send-email-chris@chris-wilson.co.uk>

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

  reply	other threads:[~2014-08-25 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 12:28 [PATCH] drm/i915: Enable vblank interrupts for CRC generation Chris Wilson
2014-08-25 13:24 ` Ville Syrjälä [this message]
2014-08-25 13:47   ` Chris Wilson
2014-08-27  6:12     ` Daniel Vetter
2014-08-27  9:55       ` Chris Wilson

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=20140825132456.GC4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.