From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 AA74A438012 for ; Thu, 13 Aug 2026 10:57:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786618640; cv=none; b=cCAf/vf0eKbCizIc00v0u1D6aQ8LODOJe6ODvYZWdVJaZvR/zJQPpMr4IQoNJkVic8dNXLx5rPUVaUmC+qhtL13HnEQPathy8r3PVCfaGBHB0VBZF4cWN7CaoudXvyYE1tNqubwTI7zpK10VDqH1FmYMD2/REjvO7QxbIRNUu9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786618640; c=relaxed/simple; bh=njNxc9b/azNODRsd2f13R8c8s/0MHcbZA5+JPNyyLkA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s0Mf5LsMPe4n3NFjMC2VIZ8UbQRFnJ9yB53eUfo1xYvCNOD6IxHB9BcolTI9Zxvoxt5tAcnvn4DcO8HwqTdqmmy1mXNe6kscvy1gxGIk1lALOasEomcAaTjDSWwm0WIO/JArQrURbpgDmYWa5BKL3Kaw0OssyLm2A2asiZ3HzjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=gZ9rqddC; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="gZ9rqddC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1786618627; bh=njNxc9b/azNODRsd2f13R8c8s/0MHcbZA5+JPNyyLkA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gZ9rqddCN5HC2wGmlPRfvxTdeHee/NMRHn/cRa5SPJ1JYuknCOQUZ8+GQXTu3Gmdu nmizAk5xegmvsRjd4NbXUFlnVfy3THfER83YBj+OMXKbRijCpftcOJJi/SxIMynrYY 2h3U+h1eSKxyNiIsAnvPtE6wUFFOe0t104z0Uu1nE0nj4IFpHTEcxc9GBQ+AZrmQ79 zV7suq/ySMTnRMHXqLk9XpFHSM8JNrpM0eiZfijN7FveIqEwULdZ41XSEm/7IU8dRm rhmS6gx1D7zKqZydS3+b3PayLWGlVG290geqOYpzDVwuLQgS87RgZBtsjxmpMK9lkM ASuZWWC0fpyhQ== Received: from fedora-21.home (unknown [100.64.0.11]) (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 bali.collaboradmins.com (Postfix) with ESMTPSA id 6F01E17E0F83; Thu, 13 Aug 2026 12:57:07 +0200 (CEST) From: Boris Brezillon Date: Thu, 13 Aug 2026 12:57:05 +0200 Subject: [PATCH v3 07/17] drm/panthor: Move the debugfs initialization to panthor_device.c 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-Transfer-Encoding: 7bit Message-Id: <20260813-panthor-unplug-fixes-v3-7-3ed4e961bbe7@collabora.com> References: <20260813-panthor-unplug-fixes-v3-0-3ed4e961bbe7@collabora.com> In-Reply-To: <20260813-panthor-unplug-fixes-v3-0-3ed4e961bbe7@collabora.com> To: Steven Price , Liviu Dudau Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Boris Brezillon X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786618621; l=2777; i=boris.brezillon@collabora.com; s=20260429; h=from:subject:message-id; bh=njNxc9b/azNODRsd2f13R8c8s/0MHcbZA5+JPNyyLkA=; b=2V8Fi/+lE+gMdx51HmhSTeX4W3KYXUupRprcWh7Sut84hSGljE3sdypny5V/SqkIR953HSvwt Udn1sF53HNACFMetuWPDrIAGzdeBpOdDbKlH+6OQmxo6RvsnnmFkc1B X-Developer-Key: i=boris.brezillon@collabora.com; a=ed25519; pk=eN+ORdOgQY7d5U+0kA8h5bf67XdD8bhKbjD/TCHexSY= Those are per-device debugfs-files, so it makes sense to have the initialization logic in panthor_device.c. Reviewed-by: Liviu Dudau Signed-off-by: Boris Brezillon --- 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 ffaff8c7088e..d4c75ff206bb 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 @@ -656,3 +657,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 ea23dde90fea..10c96abf9cff 100644 --- a/drivers/gpu/drm/panthor/panthor_device.h +++ b/drivers/gpu/drm/panthor/panthor_device.h @@ -406,6 +406,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