The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>,
	linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
	Boris Brezillon <boris.brezillon@collabora.com>,
	kernel@collabora.com, Rob Herring <robh@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Subject: Re: [PATCH v3 2/5] drm/panfrost: Internally label some BOs
Date: Wed, 21 May 2025 16:52:36 +0100	[thread overview]
Message-ID: <41515a2d-75c0-4537-888a-8d27c2050a80@arm.com> (raw)
In-Reply-To: <20250520174634.353267-3-adrian.larumbe@collabora.com>

On 20/05/2025 18:43, Adrián Larumbe wrote:
> Perfcnt samples buffer is not exposed to UM, but we would like to keep
> a tag on it as a potential debug aid.
> 
> PRIME imported GEM buffers are UM exposed, but since the usual Panfrost
> UM driver code path is not followed in their creation, they might remain
> unlabelled for their entire lifetime, so a generic tag was deemed
> preferable. The tag is assigned before a UM handle is created so it
> doesn't contradict the logic about labelling internal BOs.
> 
> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  drivers/gpu/drm/panfrost/panfrost_gem.c     | 10 ++++++++++
>  drivers/gpu/drm/panfrost/panfrost_perfcnt.c |  2 ++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
> index 4c5be7ccc9cc..04483d5fb45d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
> @@ -305,6 +305,16 @@ panfrost_gem_prime_import_sg_table(struct drm_device *dev,
>  	bo = to_panfrost_bo(obj);
>  	bo->noexec = true;
>  
> +	/*
> +	 * We assign this generic label because this function cannot
> +	 * be reached through any of the Panfrost UM driver-specific
> +	 * code paths, unless one is given by explicitly calling the
> +	 * SET_LABEL_BO ioctl. It is therefore preferable to have a
> +	 * blanket BO tag that tells us the object was imported from
> +	 * another driver than nothing at all.
> +	 */
> +	panfrost_gem_internal_set_label(obj, "GEM PRIME buffer");
> +
>  	return obj;
>  }
>  
> diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> index 52befead08c6..563f16bae543 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
> @@ -111,6 +111,8 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
>  		goto err_put_mapping;
>  	perfcnt->buf = map.vaddr;
>  
> +	panfrost_gem_internal_set_label(&bo->base, "Perfcnt sample buffer");
> +
>  	/*
>  	 * Invalidate the cache and clear the counters to start from a fresh
>  	 * state.


  parent reply	other threads:[~2025-05-21 15:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 17:43 [PATCH v3 0/5] Panfrost BO tagging and GEMS debug display Adrián Larumbe
2025-05-20 17:43 ` [PATCH v3 1/5] drm/panfrost: Add BO labelling to Panfrost Adrián Larumbe
2025-05-21  6:09   ` Boris Brezillon
2025-06-02 12:55   ` Steven Price
2025-05-20 17:43 ` [PATCH v3 2/5] drm/panfrost: Internally label some BOs Adrián Larumbe
2025-05-21  6:09   ` Boris Brezillon
2025-05-21 15:52   ` Steven Price [this message]
2025-05-20 17:44 ` [PATCH v3 3/5] drm/panfrost: Add driver IOCTL for setting BO labels Adrián Larumbe
2025-05-20 17:44 ` [PATCH v3 4/5] drm/panfrost: show device-wide list of DRM GEM objects over DebugFS Adrián Larumbe
2025-05-21  6:10   ` Boris Brezillon
2025-05-21 15:52   ` Steven Price
2025-05-20 17:44 ` [PATCH v3 5/5] drm/panfrost: Fix panfrost device variable name in devfreq Adrián Larumbe
2025-05-21  6:12   ` Boris Brezillon
2025-05-21 15:52   ` Steven Price

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=41515a2d-75c0-4537-888a-8d27c2050a80@arm.com \
    --to=steven.price@arm.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox