drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam
authorZhipeng Gong <zhipeng.gong@intel.com>
Tue, 13 Jan 2015 00:48:25 +0000 (08:48 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Jan 2015 08:51:05 +0000 (09:51 +0100)
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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
include/uapi/drm/i915_drm.h

index b868e9de9e6b87513307d3a5b9e043e1de41b737..51e8fe5f18135ce50459ca7e281fe7ed32a2198c 100644 (file)
@@ -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;
index dc845614e80d244579210fbf7023c4526ba19ecb..6eed16b92a24192a92c4fc920dbfafa0bca3872a 100644 (file)
@@ -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;