Re: [PATCH] drm/i915: Enable vblank interrupts for CRC generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux