From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id B48BA6E55C for ; Mon, 28 Jun 2021 20:16:20 +0000 (UTC) Date: Mon, 28 Jun 2021 13:16:19 -0700 Message-ID: <87zgv97njg.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210617191516.577394-16-jason@jlekstrand.net> References: <20210617191256.577244-1-jason@jlekstrand.net> <20210617191516.577394-16-jason@jlekstrand.net> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t 65/79] lib/i915/gem_context: Delete all the context clone/copy stuff 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:02 -0700, Jason Ekstrand wrote: > > lib/i915/gem_context: Delete all the context clone/copy stuff A couple of comments below but otherwise this is: Reviewed-by: Ashutosh Dixit > -bool gem_has_queues(int i915) > -{ > - return __gem_context_has(i915, > - I915_CONTEXT_CLONE_VM, > - I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE); > -} > - > -uint32_t gem_queue_create(int i915) > -{ > - return gem_context_clone(i915, 0, > - I915_CONTEXT_CLONE_VM | > - I915_CONTEXT_CLONE_ENGINES, > - I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE); > -} We are discussing if we can have alternative queue functions so let's see if that happens, now or later. > -uint32_t gem_context_create_for_engine(int i915, unsigned int class, unsigned int inst) > -{ > - I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 1) = { > - .engines = { { .engine_class = class, .engine_instance = inst } } > - }; > - struct drm_i915_gem_context_create_ext_setparam p_engines = { > - .base = { > - .name = I915_CONTEXT_CREATE_EXT_SETPARAM, > - .next_extension = 0, /* end of chain */ > - }, > - .param = { > - .param = I915_CONTEXT_PARAM_ENGINES, > - .value = to_user_pointer(&engines), > - .size = sizeof(engines), > - }, > - }; > - struct drm_i915_gem_context_create_ext create = { > - .flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS, > - .extensions = to_user_pointer(&p_engines), > - }; > - > - igt_assert_eq(create_ext_ioctl(i915, &create), 0); > - igt_assert_neq(create.ctx_id, 0); > - return create.ctx_id; > -} gem_context_create_for_engine could probably stay if it doesn't cause link warnings? _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev