From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 158E8C05027 for ; Thu, 2 Feb 2023 16:13:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AEC210E585; Thu, 2 Feb 2023 16:13:28 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id B381A10E1E5; Thu, 2 Feb 2023 16:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675354405; x=1706890405; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=V0xCUBI6dq7amJ3yogUFQU19VtZbUgW5jy5B3GBbsvQ=; b=ZBI6vLEqg+v05ldeeQTy3Sqs6haGUKk4EIhQyTGnNzr4fQPccMIND9Sy IprmuNLQRjXL36+TefMlRicDK70EGv1pIO1LE9My9eKwY4btbY1bM+ah7 i+U6CsmS68rXNpOoJbz9hTcXt2p8pHxvwLLNRYz8dpN0+g2l6Cb/7BUUj ULhOZeRkQMIeriVNKq5G6Te7bOIocwRRu+Xu2LyXSDqdBq/0AtsRlN4th fOQoYHTEYZyyS5lIGp31rWskJgAdFGphgt/o4NepEZ93YGoioQzIbpcOJ DNyH1EEyvhL43ocXYyNq1AkX646TUBgqDAwasQI/OpsA5n3yT0EXognjf A==; X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="326179860" X-IronPort-AV: E=Sophos;i="5.97,267,1669104000"; d="scan'208";a="326179860" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 08:11:58 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="615339031" X-IronPort-AV: E=Sophos;i="5.97,267,1669104000"; d="scan'208";a="615339031" Received: from mrogowsx-mobl.ger.corp.intel.com (HELO intel.com) ([10.249.35.12]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 08:11:54 -0800 Date: Thu, 2 Feb 2023 17:11:52 +0100 From: Andi Shyti To: Niranjana Vishwanathapura Message-ID: References: <20230118071609.17572-1-niranjana.vishwanathapura@intel.com> <20230118071609.17572-19-niranjana.vishwanathapura@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118071609.17572-19-niranjana.vishwanathapura@intel.com> Subject: Re: [Intel-gfx] [PATCH v10 18/23] drm/i915/vm_bind: Limit vm_bind mode to non-recoverable contexts X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: paulo.r.zanoni@intel.com, jani.nikula@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, thomas.hellstrom@intel.com, matthew.auld@intel.com, daniel.vetter@intel.com, christian.koenig@amd.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Niranjana, On Tue, Jan 17, 2023 at 11:16:04PM -0800, Niranjana Vishwanathapura wrote: > Only support vm_bind mode with non-recoverable contexts. > With new vm_bind mode with eb3 submission path, we need not > support older recoverable contexts. > > Reviewed-by: Matthew Auld > Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Andi Shyti Andi > --- > drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c > index fb4d2dab5053..9809c58316c2 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c > @@ -1617,6 +1617,12 @@ i915_gem_create_context(struct drm_i915_private *i915, > INIT_LIST_HEAD(&ctx->stale.engines); > > if (pc->vm) { > + /* Only non-recoverable contexts are allowed in vm_bind mode */ > + if (i915_gem_vm_is_vm_bind_mode(pc->vm) && > + (pc->user_flags & BIT(UCONTEXT_RECOVERABLE))) { > + err = -EINVAL; > + goto err_ctx; > + } > vm = i915_vm_get(pc->vm); > } else if (HAS_FULL_PPGTT(i915)) { > struct i915_ppgtt *ppgtt; > -- > 2.21.0.rc0.32.g243a4c7e27