From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11C37191F7E for ; Thu, 5 Sep 2024 10:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531576; cv=none; b=uKP3wPREsa2XC2Ib7q7d3/cs/Y6pk8QeKApMnh2s31H8bNWZLKZ+97inBypAyjdrScnBGjB+plMVZOLjqs8IDgB9jYMMDPJRNX224A+Y0bkGHrCiPkcgNhaPPd12eyeIl/+mBsC1d9ZQnkdC3DsrKeZ+1Qm6d2IleXz+7Fxv2CA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725531576; c=relaxed/simple; bh=Td6g4nELzgmet9YirghDsSit/1MQ4dV3k8w8v8efOnM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BFg72mc1ftJnWIpndcAyGVigIQcDRu5q4IJOFclH9tWh/Lv15KV9HYYOaIUFo72va8zcSJ6WA794lMlENmiQ2q0Fga6UYRTDQ6r6FGBuqohlr7Vi0UBpLINwJI+uc7oGEJ1iYZfAidkb0WH2wPDe3LJLfFCEoX8MadB0y7z5jJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 218D3FEC; Thu, 5 Sep 2024 03:20:00 -0700 (PDT) Received: from [10.1.29.28] (e122027.cambridge.arm.com [10.1.29.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 541133F73F; Thu, 5 Sep 2024 03:19:32 -0700 (PDT) Message-ID: <21f335cd-145f-42b0-929a-f0ee11efa8db@arm.com> Date: Thu, 5 Sep 2024 11:19:30 +0100 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/panthor: Don't add write fences to the shared BOs To: Boris Brezillon , Liviu Dudau , =?UTF-8?Q?Adri=C3=A1n_Larumbe?= Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com, Matthew Brost , Simona Vetter , stable@vger.kernel.org References: <20240905070155.3254011-1-boris.brezillon@collabora.com> From: Steven Price Content-Language: en-GB In-Reply-To: <20240905070155.3254011-1-boris.brezillon@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 05/09/2024 08:01, Boris Brezillon wrote: > The only user (the mesa gallium driver) is already assuming explicit > synchronization and doing the export/import dance on shared BOs. The > only reason we were registering ourselves as writers on external BOs > is because Xe, which was the reference back when we developed Panthor, > was doing so. Turns out Xe was wrong, and we really want bookkeep on > all registered fences, so userspace can explicitly upgrade those to > read/write when needed. > > Fixes: 4bdca1150792 ("drm/panthor: Add the driver frontend block") > Cc: Matthew Brost > Cc: Simona Vetter > Cc: > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c > index 9a0ff48f7061..41260cf4beb8 100644 > --- a/drivers/gpu/drm/panthor/panthor_sched.c > +++ b/drivers/gpu/drm/panthor/panthor_sched.c > @@ -3423,13 +3423,8 @@ void panthor_job_update_resvs(struct drm_exec *exec, struct drm_sched_job *sched > { > struct panthor_job *job = container_of(sched_job, struct panthor_job, base); > > - /* Still not sure why we want USAGE_WRITE for external objects, since I > - * was assuming this would be handled through explicit syncs being imported > - * to external BOs with DMA_BUF_IOCTL_IMPORT_SYNC_FILE, but other drivers > - * seem to pass DMA_RESV_USAGE_WRITE, so there must be a good reason. > - */ > panthor_vm_update_resvs(job->group->vm, exec, &sched_job->s_fence->finished, > - DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_WRITE); > + DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_BOOKKEEP); > } > > void panthor_sched_unplug(struct panthor_device *ptdev)