Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a815fc authored by Zou Nan hai's avatar Zou Nan hai Committed by Eric Anholt
Browse files

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: default avatarZou Nan hai <nanhai.zou@intel.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 9bc35499
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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;