提交 e3a815fc 编写于 作者: Z Zou Nan hai 提交者: Eric Anholt

drm/i915: add HAS_BSD check to i915_getparam

This will let userland only try to use the new media decode
functionality when the appropriate kernel is present.
Signed-off-by: NZou Nan hai <nanhai.zou@intel.com>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 9bc35499
...@@ -744,6 +744,9 @@ static int i915_getparam(struct drm_device *dev, void *data, ...@@ -744,6 +744,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
/* depends on GEM */ /* depends on GEM */
value = dev_priv->has_gem; value = dev_priv->has_gem;
break; break;
case I915_PARAM_HAS_BSD:
value = HAS_BSD(dev);
break;
default: default:
DRM_DEBUG_DRIVER("Unknown parameter %d\n", DRM_DEBUG_DRIVER("Unknown parameter %d\n",
param->param); param->param);
......
...@@ -275,6 +275,7 @@ typedef struct drm_i915_irq_wait { ...@@ -275,6 +275,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_OVERLAY 7 #define I915_PARAM_HAS_OVERLAY 7
#define I915_PARAM_HAS_PAGEFLIPPING 8 #define I915_PARAM_HAS_PAGEFLIPPING 8
#define I915_PARAM_HAS_EXECBUF2 9 #define I915_PARAM_HAS_EXECBUF2 9
#define I915_PARAM_HAS_BSD 10
typedef struct drm_i915_getparam { typedef struct drm_i915_getparam {
int param; int param;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册