Skip to contentSkip to conversation

add HAS_BSD check to i915_getparam

PATCH Applied Zou Nan hai 2 participants 2 messages May 31, 2010 – Jun 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add HAS_BSD check to i915_getparam

add HAS_BSD check to i915_getparam for user space program to query if BSD ring buffer is supported.

---
 drivers/gpu/drm/i915/i915_dma.c |    3 +++
 include/drm/i915_drm.h          |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +3 -0
index 6577798..84ce956 100644
@@ -744,6 +744,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
 		/* depends on GEM */
 		value = dev_priv->has_gem;
 		break;
+	case I915_PARAM_HAS_BSD:
+		value = HAS_BSD(dev);
+		break;
 	default:
 		DRM_DEBUG_DRIVER("Unknown parameter %d\n",
 				 param->param);
include/drm/i915_drm.h +1 -0
index e916870..7f0028e 100644
@@ -275,6 +275,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_OVERLAY           7
 #define I915_PARAM_HAS_PAGEFLIPPING	 8
 #define I915_PARAM_HAS_EXECBUF2          9
+#define I915_PARAM_HAS_BSD		 10
 
 typedef struct drm_i915_getparam {
 	int param;
Signature · 1 line
1.7.1