Message ID | 1359147462-3902-4-git-send-email-przanoni@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 25 Jan 2013 18:57:38 -0200 Paulo Zanoni <przanoni@gmail.com> wrote: > From: Paulo Zanoni <paulo.r.zanoni@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@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);
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);