From: Steven Price <steven.price@arm.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>,
"Boris Brezillon" <boris.brezillon@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>,
"Daniel Vetter" <daniel@ffwll.ch>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH 1/2] drm/panfrost: Consider dma-buf imported objects as resident
Date: Mon, 27 Nov 2023 11:33:52 +0000 [thread overview]
Message-ID: <4a519708-6b5c-4947-b6ca-3fdd503392ed@arm.com> (raw)
In-Reply-To: <20231125205438.375407-2-adrian.larumbe@collabora.com>
On 25/11/2023 20:52, Adrián Larumbe wrote:
> A GEM object constructed from a dma-buf imported sgtable should be regarded
> as being memory resident, because the dma-buf API mandates backing storage
> to be allocated when attachment succeeds.
This obviously can cause a bit of double-counting system wide (both the
exporter and importer could show the memory usage). But I think we're
better off over-counting rather than under-counting.
Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
> Fixes: 9ccdac7aa822 ("drm/panfrost: Add fdinfo support for memory stats")
> Reported-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
> index 0cf64456e29a..d47b40b82b0b 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
> @@ -200,7 +200,7 @@ static enum drm_gem_object_status panfrost_gem_status(struct drm_gem_object *obj
> struct panfrost_gem_object *bo = to_panfrost_bo(obj);
> enum drm_gem_object_status res = 0;
>
> - if (bo->base.pages)
> + if (bo->base.base.import_attach || bo->base.pages)
> res |= DRM_GEM_OBJECT_RESIDENT;
>
> if (bo->base.madv == PANFROST_MADV_DONTNEED)
next prev parent reply other threads:[~2023-11-27 11:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-25 20:52 [PATCH 0/2] Panfrost devfreq and GEM status fixes Adrián Larumbe
2023-11-25 20:52 ` [PATCH 1/2] drm/panfrost: Consider dma-buf imported objects as resident Adrián Larumbe
2023-11-27 11:33 ` Steven Price [this message]
2023-11-25 20:52 ` [PATCH 2/2] drm/panfrost: Fix incorrect updating of current device frequency Adrián Larumbe
2023-11-27 11:34 ` Steven Price
2023-11-30 11:29 ` [PATCH 0/2] Panfrost devfreq and GEM status fixes 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=4a519708-6b5c-4947-b6ca-3fdd503392ed@arm.com \
--to=steven.price@arm.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel@ffwll.ch \
--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=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
all inboxes | Powered by JetHome®