From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93AF589E1B for ; Mon, 28 Jun 2021 19:56:53 +0000 (UTC) Date: Mon, 28 Jun 2021 12:56:51 -0700 Message-ID: <871r8l930c.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210617191516.577394-22-jason@jlekstrand.net> References: <20210617191256.577244-1-jason@jlekstrand.net> <20210617191516.577394-22-jason@jlekstrand.net> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t 71/79] lib/i915: Rework engine API availability checks (v2) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Jason Ekstrand Cc: igt-dev@lists.freedesktop.org List-ID: On Thu, 17 Jun 2021 12:15:08 -0700, Jason Ekstrand wrote: > > bool gem_has_engine_topology(int fd) > { > - struct drm_i915_gem_context_param param = { > - .param = I915_CONTEXT_PARAM_ENGINES, > - }; > - > - return !__gem_context_get_param(fd, ¶m); > + struct intel_engine_data ed; > + return !__query_engine_list(fd, &ed); Is this correct? Isn't this actually a check for the presence of I915_CONTEXT_PARAM_ENGINES (seems so looking from which this is called)? So we could probably just create a new context and do a set_engines on it and return true if that succeeded? Or do that in addition to __query_engine_list? Maybe intel_ctx_create_all_physical() will do both? Thanks. _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev