[PATCH 3/7] drm/i915: clear the FPGA_DBG_RM_NOCLAIM bit at driver init

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

 



On Fri, 25 Jan 2013 18:57:38 -0200
Paulo Zanoni <przanoni at gmail.com> wrote:

> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> Otherwise, if the BIOS did anything wrong, our first I915_{READ,WRITE}
> will give us "unclaimed regsiter" messages.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 11c7aa8..505d7eb 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1578,6 +1578,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>  	/* This must be called before any calls to HAS_PCH_* */
>  	intel_detect_pch(dev);
>  
> +	/* This must happen before any I915_{READ,WRITE}: */
> +	if (IS_HASWELL(dev))
> +		I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
> +
>  	intel_irq_init(dev);
>  	intel_gt_init(dev);
>  

This is too late, I think. It should happen as soon as we map the MMIO.
Just in case stupid people (like me) add in stuff at driver load. You
say it in the comment, but it would be clearer in code if you did it
immediately after:

dev_priv->regs = pci_iomap(dev->pdev, mmio_bar, mmio_size);

-- 
Ben Widawsky, Intel Open Source Technology Center


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