]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Use intel_engine_lookup_user for probing HAS_BSD etc
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 7 Aug 2019 08:37:01 +0000 (09:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 7 Aug 2019 13:30:59 +0000 (14:30 +0100)
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
drivers/gpu/drm/i915/i915_drv.c

index 76ee67b901045e956d163a2e26f1a8c1f9ab5b60..e92b194d2745fbb11630e0060f2a98449b3ebaa8 100644 (file)
@@ -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);