All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhipeng Gong <zhipeng.gong@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: rodrigo.vivi@intel.com
Subject: [PATCH 2/2] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam
Date: Tue, 13 Jan 2015 08:48:25 +0800	[thread overview]
Message-ID: <1421110105-15451-2-git-send-email-zhipeng.gong@intel.com> (raw)
In-Reply-To: <1421110105-15451-1-git-send-email-zhipeng.gong@intel.com>

This will let userland only try to use the new ring
when the appropriate kernel is present

v2: change the number to be consistent with upstream (Zhipeng)

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Reviewed--by: Rodrigo Vivi <rodrigo.vivi@intel.com> (for v1)
---
 drivers/gpu/drm/i915/i915_dma.c | 3 +++
 include/uapi/drm/i915_drm.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 8cbff30..f0786d6 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -92,6 +92,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
 	case I915_PARAM_HAS_VEBOX:
 		value = intel_ring_initialized(&dev_priv->ring[VECS]);
 		break;
+	case I915_PARAM_HAS_BSD2:
+		value = intel_ring_initialized(&dev_priv->ring[VCS2]);
+		break;
 	case I915_PARAM_HAS_RELAXED_FENCING:
 		value = 1;
 		break;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index dc84561..6eed16b 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -346,6 +346,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_CMD_PARSER_VERSION	 28
 #define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
 #define I915_PARAM_MMAP_VERSION          30
+#define I915_PARAM_HAS_BSD2		 31
 
 typedef struct drm_i915_getparam {
 	int param;
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-13  1:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  0:48 [PATCH 1/2] drm/i915: Specify bsd rings through exec flag Zhipeng Gong
2015-01-13  0:48 ` Zhipeng Gong [this message]
2015-01-13  6:30   ` [PATCH 2/2] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam shuang.he
2015-01-20 21:50   ` Rodrigo Vivi
2015-01-14  0:36 ` [PATCH 1/2] drm/i915: Specify bsd rings through exec flag Daniel Vetter
2015-01-20 21:53   ` Rodrigo Vivi
  -- strict thread matches above, loose matches on Subject: below --
2014-08-07  7:48 Zhipeng Gong
2014-08-07  7:48 ` [PATCH 2/2] drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam Zhipeng Gong

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=1421110105-15451-2-git-send-email-zhipeng.gong@intel.com \
    --to=zhipeng.gong@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.