drm/i915: add HAS_BSD check to i915_getparam
authorZou Nan hai <nanhai.zou@intel.com>
Mon, 31 May 2010 05:58:47 +0000 (13:58 +0800)
committerEric Anholt <eric@anholt.net>
Tue, 1 Jun 2010 18:21:09 +0000 (11:21 -0700)
This will let userland only try to use the new media decode
functionality when the appropriate kernel is present.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c
include/drm/i915_drm.h

index 6577798d3441be3878b7ed4db8ae5a7a61f0970a..84ce95602f00b478f5fe1ab90bdc6f7fa01276bc 100644 (file)
@@ -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);
index e9168704cabef4e4058c2d1b2535ec094da51ec1..7f0028e1010b97e253b29dffdaaa8edb152bab54 100644 (file)
@@ -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;