From patchwork Tue Aug 6 09:05:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11078501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA23613AC for ; Tue, 6 Aug 2019 09:07:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A825A26AE3 for ; Tue, 6 Aug 2019 09:07:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CB6628944; Tue, 6 Aug 2019 09:07:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5C60126AE3 for ; Tue, 6 Aug 2019 09:07:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D13CB6E33E; Tue, 6 Aug 2019 09:07:34 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 414246E33A for ; Tue, 6 Aug 2019 09:07:31 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 17901467-1500050 for multiple; Tue, 06 Aug 2019 10:05:38 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Aug 2019 10:05:23 +0100 Message-Id: <20190806090535.14807-10-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190806090535.14807-1-chris@chris-wilson.co.uk> References: <20190806090535.14807-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 10/22] drm/i915: Use intel_engine_lookup_user for probing HAS_BSD etc X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Use the same mechanism to determine if a backend engine exists for a uabi mapping as used internally. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index ac5868c12b97..d7bc6e5d5c52 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);