From: Ben Widawsky <bwida...@gmail.com>

Parameters tell user space if contexts are available.

Signed-off-by: Ben Widawsky <b...@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_dma.c |    2 ++
 include/drm/i915_drm.h          |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 43acac3..c5aa84c 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -780,6 +780,8 @@ static int i915_getparam(struct drm_device *dev, void *data,
                break;
        case I915_PARAM_HAS_RELAXED_DELTA:
                value = 1;
+       case I915_PARAM_HAS_CONTEXTS:
+               value = dev_priv->contexts_disabled ? 0 : 1;
                break;
        case I915_PARAM_HAS_GEN7_SOL_RESET:
                value = 1;
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 4ffe81e..f08714e 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -301,6 +301,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_RELAXED_DELTA    15
 #define I915_PARAM_HAS_GEN7_SOL_RESET   16
 #define I915_PARAM_HAS_LLC              17
+#define I915_PARAM_HAS_CONTEXTS                 18
 
 typedef struct drm_i915_getparam {
        int param;
-- 
1.7.9

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

Reply via email to