[RFC PATCH 0/2] Allow fdinfo to display size of internal BO's

Adrián Larumbe posted 2 patches 1 month, 3 weeks ago
drivers/gpu/drm/drm_file.c               |  6 ++-
drivers/gpu/drm/msm/msm_drv.c            |  2 +-
drivers/gpu/drm/panfrost/panfrost_drv.c  |  2 +-
drivers/gpu/drm/panthor/panthor_device.c |  2 +
drivers/gpu/drm/panthor/panthor_device.h |  6 +++
drivers/gpu/drm/panthor/panthor_drv.c    | 16 +++++--
drivers/gpu/drm/panthor/panthor_fw.c     | 14 ++++--
drivers/gpu/drm/panthor/panthor_fw.h     |  6 ++-
drivers/gpu/drm/panthor/panthor_gem.c    | 55 ++++++++++++++++++++++--
drivers/gpu/drm/panthor/panthor_gem.h    | 15 ++++++-
drivers/gpu/drm/panthor/panthor_heap.c   | 20 ++++++---
drivers/gpu/drm/panthor/panthor_heap.h   |  6 ++-
drivers/gpu/drm/panthor/panthor_mmu.c    |  7 ++-
drivers/gpu/drm/panthor/panthor_mmu.h    |  3 +-
drivers/gpu/drm/panthor/panthor_sched.c  | 19 ++++----
drivers/gpu/drm/v3d/v3d_drv.c            |  2 +-
include/drm/drm_file.h                   |  7 ++-
17 files changed, 150 insertions(+), 38 deletions(-)
[RFC PATCH 0/2] Allow fdinfo to display size of internal BO's
Posted by Adrián Larumbe 1 month, 3 weeks ago
This patch series lets DRM fdinfo stats functions display an additional tag
that will reflect the amount of memory internal BOs of a DRM driver take
up.

The rationale for this is that some drivers, like Panthor, need quite a bit
of memory for things like queue ring buffers or tiler heap chunks, and
these will vary dynamically as new scheduler groups, queues or heap chunks
are created by one or more render contexts.

Because these are tied to an open DRM file that represents an ongoing
render context, then it makes sense to provide users with this information
in the DRM file fdinfo descriptor, even though they would never be exposed
to UM through a handle.

These two patches were originally part of a wider series, but broke it down
into two different submissions for ease of discussion.

The previous debate can be found at [1], in its latest two patches.

[1] https://lore.kernel.org/dri-devel/dqhnxhgho6spfh7xhw6yvs2iiqeqzeg63e6jqqpw2g7gkrfphn@dojsixyl4esv/

Adrián Larumbe (2):
  drm/drm_file: Add display of driver's internal memory size
  drm/panthor: register size of internal objects through fdinfo

 drivers/gpu/drm/drm_file.c               |  6 ++-
 drivers/gpu/drm/msm/msm_drv.c            |  2 +-
 drivers/gpu/drm/panfrost/panfrost_drv.c  |  2 +-
 drivers/gpu/drm/panthor/panthor_device.c |  2 +
 drivers/gpu/drm/panthor/panthor_device.h |  6 +++
 drivers/gpu/drm/panthor/panthor_drv.c    | 16 +++++--
 drivers/gpu/drm/panthor/panthor_fw.c     | 14 ++++--
 drivers/gpu/drm/panthor/panthor_fw.h     |  6 ++-
 drivers/gpu/drm/panthor/panthor_gem.c    | 55 ++++++++++++++++++++++--
 drivers/gpu/drm/panthor/panthor_gem.h    | 15 ++++++-
 drivers/gpu/drm/panthor/panthor_heap.c   | 20 ++++++---
 drivers/gpu/drm/panthor/panthor_heap.h   |  6 ++-
 drivers/gpu/drm/panthor/panthor_mmu.c    |  7 ++-
 drivers/gpu/drm/panthor/panthor_mmu.h    |  3 +-
 drivers/gpu/drm/panthor/panthor_sched.c  | 19 ++++----
 drivers/gpu/drm/v3d/v3d_drv.c            |  2 +-
 include/drm/drm_file.h                   |  7 ++-
 17 files changed, 150 insertions(+), 38 deletions(-)

-- 
2.46.2