STRUCT PANTHOR_GEM_OBJECT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct panthor_gem_object β€” the driver-specific GEM object, bestie. Like, this is the Panthor driver's very own GEM object struct, no cap ✨


🌸 SYNOPSIS 🌸

struct panthor_gem_object {
    struct drm_gem_object base;
    struct panthor_gem_backing backing;
    struct panthor_gem_cpu_map cmap;
    struct panthor_gem_dev_map dmap;
    enum panthor_gem_reclaim_state reclaim_state;
    atomic_t reclaimed_count;
    struct drm_gem_object *exclusive_vm_root_gem;
    u32 flags;
    struct {
      const char *str;
      struct mutex lock;
    } label;
  #ifdef CONFIG_DEBUG_FS;
    struct panthor_gem_debugfs debugfs;
  #endif;
  };

πŸ‘‘ MEMBERS πŸ‘‘

Ok so let's go field by field, because every single one of these is carrying the whole team on its back 🫢

  • base β€” inherits from drm_gem_object. It's giving "my parent is iconic and I'm their main character child" πŸ’…
  • backing β€” the memory backing state. The literal foundation, lowkey.
  • cmap β€” CPU mapping state.
  • dmap β€” device mapping state.
  • reclaim_state β€” the cached reclaim state.
  • reclaimed_count β€” how many times the object has been evicted to swap 😭 The count saturates at INT_MAX and will never wrap around to 0. Periodt β€” it hits the ceiling and stays there, it does not loop back around, fr fr.
  • exclusive_vm_root_gem β€” the root GEM of the exclusive VM that this GEM object is attached to.

So listen: if exclusive_vm_root_gem != NULL, then any attempt to bind the GEM to a different VM will fail. That's the vibe check and it does not negotiate πŸ’€

Also, all FW memory objects have this field set to the root GEM of the MCU VM. Noted, queen.

  • flags β€” a combination of drm_panthor_bo_flags flags.
  • label β€” the BO tagging fields πŸŽ€ The label can be assigned within the driver itself or through a specific IOCTL.
  • label.str β€” pointer to NULL-terminated string,
🧚 tiny note: the struct also has a struct mutex lock; hanging out inside label, and a struct panthor_gem_debugfs debugfs; that only exists #ifdef CONFIG_DEBUG_FS β€” both fully in the synopsis above, so nobody's getting left out πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/gpu/drm/panthor/panthor_gem.h, plus these absolute icons:

  • struct panthor_gem_debugfs(9)
  • struct panthor_gem_backing(9)
  • struct panthor_gem_cpu_map(9)
  • struct panthor_gem_dev_map(9)
  • enum panthor_gem_reclaim_state(9)
  • struct panthor_kernel_bo(9)

πŸ’œ and that's the whole page, bestie πŸ’œ This little beauty lives over at ./drivers/gpu/drm/panthor, and this version is dated October 2026. Go forth and bind responsibly πŸ˜­βœ¨πŸŽ€

πŸ“¦ where this page comes from