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 4B5963DB331 for ; Tue, 4 Aug 2026 12:50:36 +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=1785847839; cv=none; b=GlTR1xQ0kaXQFaysmDuCoXqsAVIbCpjCUJOjJX5dXlZAH1qlVft6xvb+X9ocNfOwnHGnXPmQQJ6J5v+pQfwq6jSTd9SqEZbK4QiBCqDnqPbOzp2ro1EMDmlLfcFjHaXSqRWxCIczGtnSZvetJmtXY6huOT5Jz8wclgmn+N+mOhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785847839; c=relaxed/simple; bh=snTQtcGEqteAJu+Rvoz3D4mB2JBxEopiOgm2EBh9KKc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IVJ7CKLTEwlTkgjOne94Kq3hUQCZYzul2pKm8SaclXsiVQCoKvDuxjMx7PsTEg04JzX/wy2IF5tD1xpmFuLQYmtenLOJHtu4Lwm0Cg+9xllGW2XGlIO3045gOcbD95/TnnljU91vbG9L+JHhJiYWbPV8atAN+GDxBQ/rKkOzM50= 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; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=sooKMK9M; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="sooKMK9M" 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 00A37165C for ; Tue, 4 Aug 2026 05:50:32 -0700 (PDT) Received: from [10.2.11.34] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B8D833F66F for ; Tue, 4 Aug 2026 05:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785847836; bh=snTQtcGEqteAJu+Rvoz3D4mB2JBxEopiOgm2EBh9KKc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sooKMK9MX5eEmnmFsDomzjbQfRcUNtHNha9Xb+oTU4XHUqlC+dv2gmA35kJ0yvOyE JwnclR48586w0QIWK5YZChCpzDOV1WFHMksSrrGvGSc8hWWiSurBVKjU6j9QrqdXRI XbSo7MNAejdg0JL7mOLx/KiVACcIUa2ksit2X75I= Date: Tue, 4 Aug 2026 13:50:25 +0100 From: Liviu Dudau To: Boris Brezillon Cc: Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/12] drm/panthor: Move the debugfs initialization to panthor_device.c Message-ID: References: <20260804-panthor-unplug-fixes-v1-0-abbbd2d41b13@collabora.com> <20260804-panthor-unplug-fixes-v1-3-abbbd2d41b13@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260804-panthor-unplug-fixes-v1-3-abbbd2d41b13@collabora.com> On Tue, Aug 04, 2026 at 12:09:42PM +0200, Boris Brezillon wrote: > Those are per-device debugfs-files, so it makes sense to have the > initialization logic in panthor_device.c. > > Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Best regards, Liviu > --- > drivers/gpu/drm/panthor/panthor_device.c | 9 +++++++++ > drivers/gpu/drm/panthor/panthor_device.h | 4 ++++ > drivers/gpu/drm/panthor/panthor_drv.c | 10 +--------- > 3 files changed, 14 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c > index 1aa86d00646f..7d336f160d1f 100644 > --- a/drivers/gpu/drm/panthor/panthor_device.c > +++ b/drivers/gpu/drm/panthor/panthor_device.c > @@ -13,6 +13,7 @@ > #include > > #include > +#include > #include > #include > > @@ -616,3 +617,11 @@ int panthor_device_suspend(struct device *dev) > atomic_set(&ptdev->pm.state, PANTHOR_DEVICE_PM_STATE_SUSPENDED); > return 0; > } > + > +#ifdef CONFIG_DEBUG_FS > +void panthor_device_debugfs_init(struct drm_minor *minor) > +{ > + panthor_mmu_debugfs_init(minor); > + panthor_gem_debugfs_init(minor); > +} > +#endif > diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h > index 0fda64fbe5f2..a6b1a2a5fca4 100644 > --- a/drivers/gpu/drm/panthor/panthor_device.h > +++ b/drivers/gpu/drm/panthor/panthor_device.h > @@ -403,6 +403,10 @@ int panthor_device_mmap_io(struct panthor_device *ptdev, > int panthor_device_resume(struct device *dev); > int panthor_device_suspend(struct device *dev); > > +#ifdef CONFIG_DEBUG_FS > +void panthor_device_debugfs_init(struct drm_minor *minor); > +#endif > + > static inline int panthor_device_resume_and_get(struct panthor_device *ptdev) > { > int ret = pm_runtime_resume_and_get(ptdev->base.dev); > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > index 46a3080b0b20..924a7ecd3733 100644 > --- a/drivers/gpu/drm/panthor/panthor_drv.c > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > @@ -1764,14 +1764,6 @@ static const struct file_operations panthor_drm_driver_fops = { > .fop_flags = FOP_UNSIGNED_OFFSET, > }; > > -#ifdef CONFIG_DEBUG_FS > -static void panthor_debugfs_init(struct drm_minor *minor) > -{ > - panthor_mmu_debugfs_init(minor); > - panthor_gem_debugfs_init(minor); > -} > -#endif > - > /* > * PanCSF driver version: > * - 1.0 - initial interface > @@ -1807,7 +1799,7 @@ static const struct drm_driver panthor_drm_driver = { > .gem_prime_import_sg_table = panthor_gem_prime_import_sg_table, > .gem_prime_import = panthor_gem_prime_import, > #ifdef CONFIG_DEBUG_FS > - .debugfs_init = panthor_debugfs_init, > + .debugfs_init = panthor_device_debugfs_init, > #endif > }; > > > -- > 2.55.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯