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 7B43CC433EF for ; Fri, 17 Jun 2022 12:28:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8B5811AEBF; Fri, 17 Jun 2022 12:28:47 +0000 (UTC) Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id 704E711AEBF for ; Fri, 17 Jun 2022 12:28:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id ED5993F4DA; Fri, 17 Jun 2022 14:28:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2qq76ym5NGOj; Fri, 17 Jun 2022 14:28:42 +0200 (CEST) Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 5535F3F4AA; Fri, 17 Jun 2022 14:28:38 +0200 (CEST) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b="L0ExsEU6"; dkim-atps=neutral Received: from [192.168.0.209] (unknown [192.198.151.53]) by mail1.shipmail.org (Postfix) with ESMTPSA id 43BCF36016C; Fri, 17 Jun 2022 14:28:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1655468917; bh=pkvt4dL4jw2qqvp5gx6kTLQqbPCJTYjQvOkaDj1Wmt8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=L0ExsEU6XAPo5//+i6mDN++zaPDkp8c5GUPHFmlnym85W/oOMtccjY8tRRPZAhFYR RxhyCuLkP1LQAkxYC79OV6DUnNPos0umjpxqemIqKaFo4xwjae7YTWV1PRwGq/7QTM IkWajWrcS0QLklZ9u+qIco1UEHQC1zsrLJeQXdos= Message-ID: Date: Fri, 17 Jun 2022 14:28:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: Matthew Auld , intel-gfx@lists.freedesktop.org References: <20220525184337.491763-1-matthew.auld@intel.com> <20220525184337.491763-9-matthew.auld@intel.com> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= In-Reply-To: <20220525184337.491763-9-matthew.auld@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Intel-gfx] [PATCH 08/10] drm/i915/uapi: disable capturing objects on 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: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , Kenneth Graunke , dri-devel@lists.freedesktop.org, Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 5/25/22 20:43, Matthew Auld wrote: > A non-recoverable context must be used if the user wants proper error > capture on discrete platforms. In the future the kernel may want to blit > the contents of some objects when later doing the capture stage. > > Testcase: igt@gem_exec_capture@capture-recoverable-discrete > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Lionel Landwerlin > Cc: Tvrtko Ursulin > Cc: Jon Bloomfield > Cc: Daniel Vetter > Cc: Jordan Justen > Cc: Kenneth Graunke > Cc: Akeem G Abodunrin > --- > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > index b279588c0672..e27ccfa50dc3 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > @@ -1961,7 +1961,7 @@ eb_find_first_request_added(struct i915_execbuffer *eb) > #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) > > /* Stage with GFP_KERNEL allocations before we enter the signaling critical path */ > -static void eb_capture_stage(struct i915_execbuffer *eb) > +static int eb_capture_stage(struct i915_execbuffer *eb) > { > const unsigned int count = eb->buffer_count; > unsigned int i = count, j; > @@ -1974,6 +1974,10 @@ static void eb_capture_stage(struct i915_execbuffer *eb) > if (!(flags & EXEC_OBJECT_CAPTURE)) > continue; > > + if (i915_gem_context_is_recoverable(eb->gem_context) && > + IS_DGFX(eb->i915)) > + return -EINVAL; > + We should also require this for future integrated, for capture buffer memory allocation purposes. Otherwise Reviewed-by: Thomas Hellström