All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	kernel@collabora.com
Subject: Re: [PATCH v10 0/4] Panthor BO tagging and GEMS debug display
Date: Wed, 23 Apr 2025 10:36:24 +0200	[thread overview]
Message-ID: <20250423103624.22d55b6f@collabora.com> (raw)
In-Reply-To: <20250423021238.1639175-1-adrian.larumbe@collabora.com>

On Wed, 23 Apr 2025 03:12:30 +0100
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:

> This patch series is aimed at providing UM with detailed memory profiling
> information in debug builds. It is achieved through a device-wide list of
> DRM GEM objects, and also implementing the ability to label BO's from UM
> through a new IOCTL.
> 
> The new debugfs file shows a list of driver DRM GEM objects in tabular mode.
> To visualise it, cat sudo cat /sys/kernel/debug/dri/*.gpu/gems.
> To test this functionality from UM, please refer to this Mesa patch series:
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224
> 
> Discussion of previous revision of this patch series can be found at:
> https://lore.kernel.org/dri-devel/20250418022710.74749-1-adrian.larumbe@collabora.com/
> 
> Changelog:
> v10:
>  - Simplified printing of GEM state and usage flags: now they're printed numericaly,
>    and their meanings given in the DebugFS file prelude
>  - Some minor formating changes
>  - Fixed all checkpatch issues with --strict
> 
> v9:
>  - Added padding field to uAPI BO label ioctl struct
>  - Simplified copying and bounds checking of label in ioctl function
> 
> v8:
>  - Renamed NULL to NUL in comments describing NUL-terminated strings
>  - Removed 'size' parameter from labelling ioctl() as max length can be
>    handled by the kernel itself
>  - Made sure to use kfree_const() everywhere labels are freed
>  - Replaced maximum label size with numerical constant rather than page size
>  - Added some warnings and checks in kernel BO labelling function
> 
> v7:
>  - Improved formating of DebugFS GEM's status and usage flags
>  - Deleted some spurious white spaces
>  - Renamed usage flags setting function
> 
> v6:
>  - Replaced some mutex calls with scoped guards
>  - Documented data size limits in the label ioctl
>  - Simplified GEMS status flags treatment (Panthor doesn't use madvise)
>  - Fixed some array size and string bugs
>  - Improved the naming of GEM status and usage flags to reflect their meaning
>  - Improved the formatting of the output table
> 
> v5:
>  - Kept case and naming of kernel BO's consistent
>  - Increased the driver minor after new ioctl
>  - Now adds BO to debugfs GEMs list at GEM object creation time
>  - No longer try to hide BO creator's name when it's a workqueue or modprobe
>  - Reworked the procedure for printing GEM state and kernel BO flags
>  - Turned kernel BO flags and GEM state flags into bit enums
>  - Wait until BO state is marked as initialied for debugfs display
> 
> v4:
>  - Labelled all kernel BO's, not just heap chunks.
>  - Refactored DebugGFs GEMs list handling functions
>  - Added debugfs GEMS node mask to tell different kinds of BO's
> 
> 
> Adrián Larumbe (4):
>   drm/panthor: Introduce BO labeling
>   drm/panthor: Add driver IOCTL for setting BO labels
>   drm/panthor: Label all kernel BO's
>   drm/panthor: show device-wide list of DRM GEM objects over DebugFS

Queued to drm-misc-next.

Thanks,

Boris

> 
>  drivers/gpu/drm/panthor/panthor_device.c |   5 +
>  drivers/gpu/drm/panthor/panthor_device.h |  11 ++
>  drivers/gpu/drm/panthor/panthor_drv.c    |  69 +++++++-
>  drivers/gpu/drm/panthor/panthor_fw.c     |   8 +-
>  drivers/gpu/drm/panthor/panthor_gem.c    | 207 ++++++++++++++++++++++-
>  drivers/gpu/drm/panthor/panthor_gem.h    |  86 +++++++++-
>  drivers/gpu/drm/panthor/panthor_heap.c   |   6 +-
>  drivers/gpu/drm/panthor/panthor_sched.c  |   9 +-
>  include/uapi/drm/panthor_drm.h           |  23 +++
>  9 files changed, 413 insertions(+), 11 deletions(-)
> 
> --
> 2.48.1


      parent reply	other threads:[~2025-04-23  8:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  2:12 [PATCH v10 0/4] Panthor BO tagging and GEMS debug display Adrián Larumbe
2025-04-23  2:12 ` [PATCH v10 1/4] drm/panthor: Introduce BO labeling Adrián Larumbe
2025-04-23  2:12 ` [PATCH v10 2/4] drm/panthor: Add driver IOCTL for setting BO labels Adrián Larumbe
2025-04-23  2:12 ` [PATCH v10 3/4] drm/panthor: Label all kernel BO's Adrián Larumbe
2025-04-23  2:12 ` [PATCH v10 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS Adrián Larumbe
2025-04-23  7:01   ` Boris Brezillon
2025-04-23  8:34     ` Boris Brezillon
2025-05-07 12:04   ` [WARNING: A/V UNSCANNABLE]Re: " kernel test robot
2025-04-23  8:36 ` Boris Brezillon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423103624.22d55b6f@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.