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 D13D8D1118B for ; Wed, 26 Nov 2025 17:24:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4142710E6C5; Wed, 26 Nov 2025 17:24:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="K3CPd1RI"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3CC6F10E6AC; Wed, 26 Nov 2025 17:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1764177892; bh=Uc+ssNiXxhERUUzPvJb+iWY49nLHIm/x9daYUYqrCwc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K3CPd1RInTrx+Emz0MHRB+YiM0J8JpqcsqshFwztXkRwhTydVl3u8XzIaVx/0zyrp V0ymqaNSqTJZq71ZAyAhinFtLd5BxazQF6Z4OyZGmlfGVwAKPb8rPKVir9lahCfxI3 d/m3pb90R2cKwXiEZMBRGfiw5ET2qcF/f6UHuaknQLyfR6uRHTx0SkFENPo+/r6w4u XDxL72ou5BJbDMeD7PnEBxU3YC3gEQgEiwFtQuxWBqpmjrgcpb040QB5ZkacAo2Fxs QLKdbKJU9Soh3+hqXPpvZQRx8i54gr3KtiAb/vVgwVUVGlkLdY2NqtYWzsNcWCzn+0 tzXIBFy8R/YkQ== Received: from fedora (unknown [IPv6:2a01:e0a:2c:6930:d919:a6e:5ea1:8a9f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id A3A4F17E10E9; Wed, 26 Nov 2025 18:24:51 +0100 (CET) Date: Wed, 26 Nov 2025 18:24:47 +0100 From: Boris Brezillon To: Thomas Zimmermann Cc: Steven Price , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Faith Ekstrand , Thierry Reding , Mikko Perttunen , Melissa Wen , =?UTF-8?B?TWHDrXJh?= Canal , Lucas De Marchi , Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= , Rodrigo Vivi , Frank Binns , Matt Coster , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Alex Deucher , Christian =?UTF-8?B?S8O2bmln?= , amd-gfx@lists.freedesktop.org, kernel@collabora.com Subject: Re: [PATCH v6 00/16] drm/panfrost,panthor: Cached maps and explicit flushing Message-ID: <20251126182447.41d9b2e5@fedora> In-Reply-To: References: <20251126124455.3656651-1-boris.brezillon@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Wed, 26 Nov 2025 17:20:08 +0100 Thomas Zimmermann wrote: > Hi > > Am 26.11.25 um 13:44 schrieb Boris Brezillon: > > This series implements cached maps and explicit flushing for both panfrost > > and panthor. To avoid code/bug duplication, the tricky guts of the cache > > flushing ioctl which walk the sg list are broken into a new common shmem > > helper which can be used by any driver. > > Gem-shmem is getting more and more complicated. I think gem-shmem would > be better off to be a simple implementation for all the drivers that use > shadow buffering and software rendering. There are plenty of them. And > drivers like the ones in sysfb/ are our failure-mode fallback. They > should have non-complicated memory management wherever possible. Just to be clear, none of the gem-shmem additions in this series are forced to existing gem-shmem users, and no extra field is added to drm_gem_shmem_object. Given how far were are, I'd be tempted to merge this series, and revisit things later. > > Therefore, could we first duplicate the existing gem-shmem code into > gem-uma as we discussed recently on IRC? The changes are simple: > > - copy the existing gem-shmem to gem-uma (plus renames) > - convert panthor and panfrost to the new interfaces Actually, I started a panthor patchset adding reclaim support, and one of the patch is parting ways with gem-shmem. I was planning on sending that after I've got all the pending panthor patches merged. Based on what we end up with, and if others are interested in moving to this new implementation, I'll extract the code into a gem-uma layer, as discussed. > > And on top of that, further improvements, such as the series at hand, > could be done. Later we'd convert other drivers to gem-uma where it > fits, such as lima. I'm fine with the request to fork gem-shmem in order to simplify the implementation for the non-GPU use cases, it's the ordering I'm not super happy with, because we're already at v6, and I was expecting those changes to be merged soon...