From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84B0B4683 for ; Fri, 24 Nov 2023 10:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Menz/y9Q" Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E6B41614E3 for ; Fri, 24 Nov 2023 10:44:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E6B41614E3 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=Menz/y9Q X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.1 X-Spam-Level: Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CJJEcpB0xJkE for ; Fri, 24 Nov 2023 10:44:44 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9B875614E0 for ; Fri, 24 Nov 2023 10:44:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9B875614E0 Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (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 89ECF66073AA; Fri, 24 Nov 2023 10:44:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700822681; bh=HUayWawTRXmfbHFm7UBPnjChIrhOUK/HDExzWJYbs9Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Menz/y9Qab2IoSBmYzFfmk1KN6E8CoUz5G+pXwk9yOTBHYfe/cJKYSblQATxcipuv qkZwJsjhxlUo0F1iaaD3tWgPPYcKII0O+2Z7ZePgljna/NaROPlAQGJ/8iBH7Uqgyw rfGcM2jEdw2DjE3wNNmhklrKmjvm4XCDg0vbxR1tbtqZcJQ0aZDHQ0g3velLy0iHqB LOw3is/bW1TJEVMCS/CXfkG6Myqttr8A05sszW5QhtKm8eSxDes9T4MZC3tI7hpsYX /1unloM6DUeT8GM3mK3QumfK4FdGm+6SSX+ALTTfLjaHyeFW/2CLrtqEOJxum/nOvf ub3kWCL08gWXA== Date: Fri, 24 Nov 2023 11:44:36 +0100 From: Boris Brezillon To: Maxime Ripard Cc: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Maarten Lankhorst , Thomas Zimmermann , Christian =?UTF-8?B?S8O2bmln?= , Qiang Yu , Steven Price , Emma Anholt , Melissa Wen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v18 04/26] drm/shmem-helper: Refactor locked/unlocked functions Message-ID: <20231124114436.7c8ef723@collabora.com> In-Reply-To: References: <20231029230205.93277-1-dmitry.osipenko@collabora.com> <20231029230205.93277-5-dmitry.osipenko@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 24 Nov 2023 11:40:06 +0100 Maxime Ripard wrote: > On Mon, Oct 30, 2023 at 02:01:43AM +0300, Dmitry Osipenko wrote: > > Add locked and remove unlocked postfixes from drm-shmem function names, > > making names consistent with the drm/gem core code. > > > > Reviewed-by: Boris Brezillon > > Suggested-by: Boris Brezillon > > Signed-off-by: Dmitry Osipenko > > This contradicts my earlier ack on a patch but... > > > --- > > drivers/gpu/drm/drm_gem_shmem_helper.c | 64 +++++++++---------- > > drivers/gpu/drm/lima/lima_gem.c | 8 +-- > > drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- > > drivers/gpu/drm/panfrost/panfrost_gem.c | 6 +- > > .../gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +- > > drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- > > drivers/gpu/drm/v3d/v3d_bo.c | 4 +- > > drivers/gpu/drm/virtio/virtgpu_object.c | 4 +- > > include/drm/drm_gem_shmem_helper.h | 36 +++++------ > > 9 files changed, 64 insertions(+), 64 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c > > index 0d61f2b3e213..154585ddae08 100644 > > --- a/drivers/gpu/drm/drm_gem_shmem_helper.c > > +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c > > @@ -43,8 +43,8 @@ static const struct drm_gem_object_funcs drm_gem_shmem_funcs = { > > .pin = drm_gem_shmem_object_pin, > > .unpin = drm_gem_shmem_object_unpin, > > .get_sg_table = drm_gem_shmem_object_get_sg_table, > > - .vmap = drm_gem_shmem_object_vmap, > > - .vunmap = drm_gem_shmem_object_vunmap, > > + .vmap = drm_gem_shmem_object_vmap_locked, > > + .vunmap = drm_gem_shmem_object_vunmap_locked, > > While I think we should indeed be consistent with the names, I would > also expect helpers to get the locking right by default. > > I'm not sure how reasonable it is, but I think I'd prefer to turn this > around and keep the drm_gem_shmem_object_vmap/unmap helpers name, and > convert whatever function needs to be converted to the unlock suffix so > we get a consistent naming. > > Does that make sense? I don't mind, as long as it's consistent, it's just that that there's probably more to patch if we do it the other way around.