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 44CBAEB64D7 for ; Wed, 21 Jun 2023 16:52:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A96E410E335; Wed, 21 Jun 2023 16:52:06 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id E67F010E335 for ; Wed, 21 Jun 2023 16:52:04 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by madras.collabora.co.uk (Postfix) with ESMTPSA id 357776606F9B; Wed, 21 Jun 2023 17:52:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687366322; bh=Mm+AdwIw6r6mj9p2xBMgcytj5fGgNRK5P0AFu32aBcE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XxXJrPDXHYDdwrg+PXAIGXydRrnho3YUy4H63fkl3LJpthymz+xpDxYhUK8rvEGih /BeDwLrQLVYf4TkNlzimzvBoFi07iFFCAKISSlBnK4VLWDLipL9l90XOCFKuTw6YCa fao+g0dKfat29bFCIRoZEtyfXo3bAT9Dw4hBYsKNiT2fRzebOb17RyNo5IWkCHC+ZN q6nRCj3n+xqNjwPtab1T2ZJFqu0xFNgI1PDegLsqDYmR6rAX06bmCsFHIhpTcdA6L/ JiCDksaQgGz7i2fFXy76D3HW8qPHr9gSYWr7DTCX7LJJrNZfMecxarNvUEepp21D3u 77K3x3orm06YA== Date: Wed, 21 Jun 2023 18:51:59 +0200 From: Boris Brezillon To: "Christian =?UTF-8?B?S8O2bmln?=" Subject: Re: [PATCH 1/2] drm: execution context for GEM buffers v5 Message-ID: <20230621185159.29a1fcc7@collabora.com> In-Reply-To: <20230621133700.7588-1-christian.koenig@amd.com> References: <20230621133700.7588-1-christian.koenig@amd.com> Organization: Collabora X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas_os@shipmail.org, dakr@redhat.com, dri-devel@lists.freedesktop.org, arunpravin.paneerselvam@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 21 Jun 2023 15:36:59 +0200 "Christian K=C3=B6nig" wrote: > +/** > + * drm_exec_until_all_locked - loop until all GEM objects are locked > + * @exec: drm_exec object > + * > + * Core functionality of the drm_exec object. Loops until all GEM object= s are > + * locked and no more contention exists. At the beginning of the loop it= is > + * guaranteed that no GEM object is locked. > + * > + * Since labels can't be defined local to the loops body we use a jump p= ointer > + * to make sure that the retry is only used from within the loops body. > + */ > +#define drm_exec_until_all_locked(exec) \ > + for (void *__drm_exec_retry_ptr; ({ \ > + __label__ __drm_exec_retry; \ The warning reported by the bot on 'drm: add drm_exec selftests v4' should be fixed with a goto __drm_exec_retry; placed here. > +__drm_exec_retry: \ > + __drm_exec_retry_ptr =3D &&__drm_exec_retry; \ > + drm_exec_cleanup(exec); \ > + });)