Re: [PATCH v9 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

From: Boris Brezillon
Date: Fri Apr 18 2025 - 04:12:12 EST


On Fri, 18 Apr 2025 03:27:07 +0100
Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx> wrote:

> + static const char * const gem_state_flags_names[] = {
> + [PANTHOR_DEBUGFS_GEM_STATE_FLAG_IMPORTED] = "imported",
> + [PANTHOR_DEBUGFS_GEM_STATE_FLAG_EXPORTED] = "exported",

Okay, I think I know where the flag indexing issue comes from:
PANTHOR_DEBUGFS_GEM_STATE_FLAG_xx are flags, not bit positions, so we
can't use them as indices here.

> + };
> +
> + static const char * const gem_usage_flags_names[] = {
> + [PANTHOR_DEBUGFS_GEM_USAGE_FLAG_KERNEL] = "kernel",
> + [PANTHOR_DEBUGFS_GEM_USAGE_FLAG_FW_MAPPED] = "fw-mapped",

Same problem here.

> + };
> +