From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 3/3] drm/i915: Replace the feature tests for BLT/BSD with ring init checks Date: Fri, 11 May 2012 12:58:14 -0700 Message-ID: <20120511125814.14d997b3@bwidawsk.net> References: <1336742972-12713-1-git-send-email-chris@chris-wilson.co.uk> <1336742972-12713-3-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id E02769E8EB for ; Fri, 11 May 2012 12:58:21 -0700 (PDT) In-Reply-To: <1336742972-12713-3-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 11 May 2012 14:29:32 +0100 Chris Wilson wrote: > When userspace asks whether the driver supports the BLT or BSD rings for > this chip, simply report whether those particular rings are initialised > This was the one place where I felt HAS_BLT and HAS_BSD was sort of nice to keep around to distinguish HW has the ring vs. HW successfully initialized the rings. > v2: Use intel_ring_initialized() > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_dma.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 006ea47..b0df294 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -980,10 +980,10 @@ static int i915_getparam(struct drm_device *dev, void *data, > value = 1; > break; > case I915_PARAM_HAS_BSD: > - value = HAS_BSD(dev); > + value = intel_ring_initialized(&dev_priv->ring[VCS]); > break; > case I915_PARAM_HAS_BLT: > - value = HAS_BLT(dev); > + value = intel_ring_initialized(&dev_priv->ring[BCS]); > break; > case I915_PARAM_HAS_RELAXED_FENCING: > value = 1; -- Ben Widawsky, Intel Open Source Technology Center