From: Zhipeng Gong Date: Tue, 13 Jan 2015 00:48:25 +0000 (+0800) Subject: drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam X-Git-Tag: v4.0-rc1~74^2~8^2~56 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=08e16dc874e672f1a1472a495c8351b8ce5d34d5;p=karo-tx-linux.git drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam 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 Reviewed--by: Rodrigo Vivi Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index b868e9de9e6b..51e8fe5f1813 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 dc845614e80d..6eed16b92a24 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;