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 AA8F5C636D4 for ; Mon, 13 Feb 2023 16:32:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AECD910E61E; Mon, 13 Feb 2023 16:32:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2218510E620 for ; Mon, 13 Feb 2023 16:32:14 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DFBC54B3; Mon, 13 Feb 2023 08:32:56 -0800 (PST) Received: from [10.57.13.51] (unknown [10.57.13.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1DD973F703; Mon, 13 Feb 2023 08:32:10 -0800 (PST) Message-ID: <5c8d003c-c460-62e1-e32a-7ed37ae1f52f@arm.com> Date: Mon, 13 Feb 2023 16:32:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2 4/5] drm/panfrost: Use drm_sched_job_add_syncobj_dependency() Content-Language: en-GB To: =?UTF-8?Q?Ma=c3=adra_Canal?= , Luben Tuikov , David Airlie , Daniel Vetter , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , Qiang Yu , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Rob Clark , Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Melissa Wen References: <20230209124447.467867-1-mcanal@igalia.com> <20230209124447.467867-5-mcanal@igalia.com> From: Steven Price In-Reply-To: <20230209124447.467867-5-mcanal@igalia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: dri-devel@lists.freedesktop.org, Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 09/02/2023 12:44, Maíra Canal wrote: > As panfrost_copy_in_sync() performs the same steps as > drm_sched_job_add_syncobj_dependency(), replace the open-coded > implementation in Panfrost in order to simply use the DRM function. > > Reviewed-by: Alyssa Rosenzweig > Signed-off-by: Maíra Canal Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c > index abb0dadd8f63..f49096f53141 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c > @@ -220,15 +220,8 @@ panfrost_copy_in_sync(struct drm_device *dev, > } > > for (i = 0; i < in_fence_count; i++) { > - struct dma_fence *fence; > - > - ret = drm_syncobj_find_fence(file_priv, handles[i], 0, 0, > - &fence); > - if (ret) > - goto fail; > - > - ret = drm_sched_job_add_dependency(&job->base, fence); > - > + ret = drm_sched_job_add_syncobj_dependency(&job->base, file_priv, > + handles[i], 0); > if (ret) > goto fail; > }