diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-07 09:37:01 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-07 14:30:59 +0100 |
commit | 9ae06cad821bbeaca9b34dbb9bdb8591a1d9762a (patch) | |
tree | 6a9ebf4240c2e33d6dbda81285a1fb0729244d83 /drivers/gpu | |
parent | 2edda80db3d065b875731de2a846f9e700ccb5ce (diff) |
drm/i915: Use intel_engine_lookup_user for probing HAS_BSD etc
Use the same mechanism to determine if a backend engine exists for a
uabi mapping as used internally.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190807083702.16349-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 76ee67b90104..e92b194d2745 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -373,16 +373,20 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data, value = dev_priv->overlay ? 1 : 0; break; case I915_PARAM_HAS_BSD: - value = !!dev_priv->engine[VCS0]; + value = !!intel_engine_lookup_user(dev_priv, + I915_ENGINE_CLASS_VIDEO, 0); break; case I915_PARAM_HAS_BLT: - value = !!dev_priv->engine[BCS0]; + value = !!intel_engine_lookup_user(dev_priv, + I915_ENGINE_CLASS_COPY, 0); break; case I915_PARAM_HAS_VEBOX: - value = !!dev_priv->engine[VECS0]; + value = !!intel_engine_lookup_user(dev_priv, + I915_ENGINE_CLASS_VIDEO_ENHANCE, 0); break; case I915_PARAM_HAS_BSD2: - value = !!dev_priv->engine[VCS1]; + value = !!intel_engine_lookup_user(dev_priv, + I915_ENGINE_CLASS_VIDEO, 1); break; case I915_PARAM_HAS_LLC: value = HAS_LLC(dev_priv); |