[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250803035816.603405-59-jim.cromie@gmail.com>
Date: Sat, 2 Aug 2025 21:58:16 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: linux-kernel@...r.kernel.org,
jbaron@...mai.com,
gregkh@...uxfoundation.org,
ukaszb@...omium.org,
louis.chauvet@...tlin.com
Cc: dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org,
intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org,
daniel.vetter@...ll.ch,
tvrtko.ursulin@...ux.intel.com,
jani.nikula@...el.com,
ville.syrjala@...ux.intel.com,
seanpaul@...omium.org,
robdclark@...il.com,
groeck@...gle.com,
yanivt@...gle.com,
bleung@...gle.com,
quic_saipraka@...cinc.com,
will@...nel.org,
catalin.marinas@....com,
quic_psodagud@...cinc.com,
maz@...nel.org,
arnd@...db.de,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
mingo@...hat.com,
jim.cromie@...il.com
Subject: [PATCH v4 58/58] accel: add -DDYNAMIC_DEBUG_MODULE to subdir-cflags - RFC
Currently amdxdna uses drm_dbg, so it needs this cflag in order to
compile; it currently gets the cflag from its own Makefile.
If other accel modules want to use DRM.debug, they will need this flag
too, so add it in accel/Makefile.
NOTE: ivpu has its own CLASS-ish dbg system:
./drivers/accel/ivpu$ grep IVPU_DBG_ *
ivpu_drv.c:MODULE_PARM_DESC(dbg_mask, "Driver debug mask. See IVPU_DBG_* macros.");
ivpu_drv.h:#define IVPU_DBG_REG BIT(0)
ivpu_drv.h:#define IVPU_DBG_IRQ BIT(1)
ivpu_drv.h:#define IVPU_DBG_MMU BIT(2)
ivpu_drv.h:#define IVPU_DBG_FILE BIT(3)
ivpu_drv.h:#define IVPU_DBG_MISC BIT(4)
ivpu_drv.h:#define IVPU_DBG_FW_BOOT BIT(5)
ivpu_drv.h:#define IVPU_DBG_PM BIT(6)
ivpu_drv.h:#define IVPU_DBG_IPC BIT(7)
ivpu_drv.h:#define IVPU_DBG_BO BIT(8)
ivpu_drv.h:#define IVPU_DBG_JOB BIT(9)
ivpu_drv.h:#define IVPU_DBG_JSM BIT(10)
ivpu_drv.h:#define IVPU_DBG_KREF BIT(11)
ivpu_drv.h:#define IVPU_DBG_RPM BIT(12)
ivpu_drv.h:#define IVPU_DBG_MMU_MAP BIT(13)
ivpu_drv.h: if (unlikely(IVPU_DBG_##type & ivpu_dbg_mask)) \
./drivers/accel/ivpu$ grep ivpu_dbg * | cut -f1,2 -d, | cut -d: -f2- | perl -pe 's/\s+/ /' | sort -u
extern int ivpu_dbg_mask;
if (unlikely(IVPU_DBG_##type & ivpu_dbg_mask)) \
int ivpu_dbg_mask;
ivpu_dbg_bo(vdev, bo
ivpu_dbg(vdev, BO
ivpu_dbg(vdev, FILE
ivpu_dbg(vdev, FW_BOOT
ivpu_dbg(vdev, IPC
ivpu_dbg(vdev, IRQ
ivpu_dbg(vdev, JOB
ivpu_dbg(vdev, JSM
ivpu_dbg(vdev, KREF
ivpu_dbg(vdev, MISC
ivpu_dbg(vdev, MMU
ivpu_dbg(vdev, MMU_MAP
ivpu_dbg(vdev, PM
ivpu_dbg(vdev, REG
module_param_named(dbg_mask, ivpu_dbg_mask
static inline void ivpu_dbg_bo(struct ivpu_device *vdev, struct ivpu_bo *bo
This looks readily convertible to a dyndbg classmap and controlling kparam.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
drivers/accel/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/accel/Makefile b/drivers/accel/Makefile
index a301fb6089d4c..e437549cba8ac 100644
--- a/drivers/accel/Makefile
+++ b/drivers/accel/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+subdir-cflags-$(CONFIG_DYNAMIC_DEBUG_CORE) == -DDYNAMIC_DEBUG_MODULE
+
obj-$(CONFIG_DRM_ACCEL_AMDXDNA) += amdxdna/
obj-$(CONFIG_DRM_ACCEL_HABANALABS) += habanalabs/
obj-$(CONFIG_DRM_ACCEL_IVPU) += ivpu/
--
2.50.1
Powered by blists - more mailing lists