Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
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	[thread overview]
Message-ID: <20120511125814.14d997b3@bwidawsk.net> (raw)
In-Reply-To: <1336742972-12713-3-git-send-email-chris@chris-wilson.co.uk>

On Fri, 11 May 2012 14:29:32 +0100
Chris Wilson <chris@chris-wilson.co.uk> 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 <chris@chris-wilson.co.uk>
> ---
>  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

  reply	other threads:[~2012-05-11 19:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 13:29 [PATCH 1/3] drm/i915: Introduce for_each_ring() macro Chris Wilson
2012-05-11 13:29 ` [PATCH 2/3] drm/i915: Check whether the ring is initialised prior to dispatch Chris Wilson
2012-05-11 19:53   ` Ben Widawsky
2012-05-11 13:29 ` [PATCH 3/3] drm/i915: Replace the feature tests for BLT/BSD with ring init checks Chris Wilson
2012-05-11 19:58   ` Ben Widawsky [this message]
2012-05-11 20:24     ` Chris Wilson
2012-05-11 19:46 ` [PATCH 1/3] drm/i915: Introduce for_each_ring() macro Ben Widawsky
2012-05-13 13:35   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120511125814.14d997b3@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox