diff mbox

[03/10] drm/i915: clear the FPGA_DBG_RM_NOCLAIM bit at driver init

Message ID 1360352121-3989-4-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni Feb. 8, 2013, 7:35 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Otherwise, if the BIOS did anything wrong, our first I915_{WRITE,READ}
will give us "unclaimed register"  messages.

V2: Even earlier.

Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=58897
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Ben Widawsky Feb. 9, 2013, 5:19 p.m. UTC | #1
On Fri,  8 Feb 2013 17:35:14 -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_{WRITE,READ}
> will give us "unclaimed register"  messages.
> 
> V2: Even earlier.
> 
> Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=58897
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

I really wish we were allowed to call Haswell something like gen7.x, so
we can do INTEL_INFO(dev)->gen > 7

Also, I would have cleared all the bits in the register, not just
NOCLAIM.

Either way it's
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
[snip]
Paulo Zanoni Feb. 14, 2013, 8:26 p.m. UTC | #2
Hi

2013/2/9 Ben Widawsky <ben@bwidawsk.net>:
> On Fri,  8 Feb 2013 17:35:14 -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_{WRITE,READ}
>> will give us "unclaimed register"  messages.
>>
>> V2: Even earlier.
>>
>> Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=58897
>> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> I really wish we were allowed to call Haswell something like gen7.x, so
> we can do INTEL_INFO(dev)->gen > 7

Like gen 70 and 75?

>
> Also, I would have cleared all the bits in the register, not just
> NOCLAIM.

I'm not so sure, the other bits have completely different purposes,
unrelated with the "unclaimed registers". I don't think it's a good
idea to zero bits that have nothing to do with the purpose of the
code.

>
> Either way it's
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

Thanks for the review :)

> [snip]
Ben Widawsky Feb. 15, 2013, 4:07 a.m. UTC | #3
On Thu, 14 Feb 2013 18:26:59 -0200
Paulo Zanoni <przanoni@gmail.com> wrote:

> Hi
> 
> 2013/2/9 Ben Widawsky <ben@bwidawsk.net>:
> > On Fri,  8 Feb 2013 17:35:14 -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_{WRITE,READ} will give us "unclaimed register"  messages.
> >>
> >> V2: Even earlier.
> >>
> >> Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=58897
> >> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >
> > I really wish we were allowed to call Haswell something like
> > gen7.x, so we can do INTEL_INFO(dev)->gen > 7
> 
> Like gen 70 and 75?

Yeah, but that's not your problem or fault.
> 
> >
> > Also, I would have cleared all the bits in the register, not just
> > NOCLAIM.
> 
> I'm not so sure, the other bits have completely different purposes,
> unrelated with the "unclaimed registers". I don't think it's a good
> idea to zero bits that have nothing to do with the purpose of the
> code.

I think doing that is a separate patch, and it goes along with the
"we don't care what errors BIOS induced" philosophy IMO.

> 
> >
> > Either way it's
> > Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> 
> Thanks for the review :)
> 
> > [snip]
> 
> 
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 4fa6beb..6d8672e 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1542,6 +1542,10 @@  int i915_driver_load(struct drm_device *dev, unsigned long flags)
 		goto put_gmch;
 	}
 
+	/* This must happen before any I915_{READ,WRITE}: */
+	if (IS_HASWELL(dev))
+		I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
+
 	aperture_size = dev_priv->gtt.mappable_end;
 
 	dev_priv->gtt.mappable =