From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 16/29] drm/i915: Fix location of stolen memory register for SandyBridge+ Date: Wed, 22 Aug 2012 16:54:07 +0100 Message-ID: <1345650853_1894@CP5-2952> References: <1344696088-24760-1-git-send-email-chris@chris-wilson.co.uk> <1344696088-24760-17-git-send-email-chris@chris-wilson.co.uk> <20120820193804.GF5170@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 71B4EA0A8C for ; Wed, 22 Aug 2012 08:54:19 -0700 (PDT) In-Reply-To: <20120820193804.GF5170@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, 20 Aug 2012 21:38:04 +0200, Daniel Vetter wrote: > On Sat, Aug 11, 2012 at 03:41:15PM +0100, Chris Wilson wrote: > > A few of the earlier registers where enlarged and so the Base Data of > > Stolem Memory Register (BDSM) was pushed to 0xb0. > > > > Signed-off-by: Chris Wilson > > --- > > drivers/gpu/drm/i915/i915_gem_stolen.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c > > index a01ff74..a528e4a 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c > > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c > > @@ -63,7 +63,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev) > > * its value of TOLUD. > > */ > > base = 0; > > - if (INTEL_INFO(dev)->gen > 3 || IS_G33(dev)) { > > + if (INTEL_INFO(dev)->gen >= 6) { > > + /* Read Base Data of Stolen Memory Register (BDSM) directly */ > > + pci_read_config_dword(pdev, 0xB0, &base); > > Wishlist (i.e. feel free to ignore): Can we have #defines instead of magic > numbers here, please? Shrug, I'm not sure in this instance. Each chipset generation seems to move it about and give it a different name and rationale, so sticking with a verbose comment made sense. -Chris -- Chris Wilson, Intel Open Source Technology Centre