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,
Steven Price <steven.price@arm.com>,
kernel@collabora.com, Liviu Dudau <liviu.dudau@arm.com>,
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>,
Daniel Almeida <daniel.almeida@collabora.com>,
Alice Ryhl <aliceryhl@google.com>
Subject: Re: [PATCH v7 5/6] drm/panthor: Support sparse mappings
Date: Fri, 17 Apr 2026 10:19:34 +0200 [thread overview]
Message-ID: <20260417101934.7320f562@fedora> (raw)
In-Reply-To: <aeEpRJhu2b3UWbCs@sobremesa>
On Thu, 16 Apr 2026 19:25:01 +0100
Adrián Larumbe <adrian.larumbe@collabora.com> wrote:
> > > +/**
> > > + * panthor_dummy_bo_create() - Create a Panthor BO meant to back sparse bindings.
> > > + * @ptdev: Device.
> > > + *
> > > + * Return: A valid pointer in case of success, an ERR_PTR() otherwise.
> > > + */
> > > +struct panthor_gem_object *
> > > +panthor_dummy_bo_create(struct panthor_device *ptdev)
> > > +{
> > > + u32 dummy_flags = DRM_PANTHOR_BO_NO_MMAP;
> > > + struct panthor_gem_object *bo;
> > > + struct page **pages;
> > > +
> > > + bo = panthor_gem_create(&ptdev->base, SZ_2M, dummy_flags, NULL, 0);
> > > + if (IS_ERR_OR_NULL(bo))
> > > + return bo;
> > > +
> > > + pages = drm_gem_get_pages(&bo->base);
> >
> > Why not use panthor_gem_backing_get_pages_locked() here? Also,
> > drm_gem_get_pages() doesn't give any guarantee that you'll get a huge
> > page, nor can you guarantee that the 2M won't be reclaimed and later
> > on be re-allocated as 4k chunks. I'd probably keep things simple for
> > now, and
> >
> > - keep it a 2M GEM object
> > - force the page allocation at map time, just like we do for regular BOs
>
> On a second thought, if I force page allocation at map time, then there's no need to wait
> until a sparse vm_bind operation to create the dummy BO. I can just do it at VM creation time
> and then let the vm_bind ioctl path allocate the pages.
Yep, you can do that, indeed.
next prev parent reply other threads:[~2026-04-17 8:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 11:28 [PATCH v7 0/6] Support sparse mappings in Panthor Adrián Larumbe
2026-04-15 11:28 ` [PATCH v7 1/6] drm/panthor: Expose GPU page sizes to UM Adrián Larumbe
2026-04-15 13:10 ` Boris Brezillon
2026-04-15 15:19 ` Steven Price
2026-04-15 11:28 ` [PATCH v7 2/6] drm/panthor: Pass vm_bind_op to vm_prepare_map_op_ctx Adrián Larumbe
2026-04-15 13:11 ` Boris Brezillon
2026-04-15 15:19 ` Steven Price
2026-04-15 11:28 ` [PATCH v7 3/6] drm/panthor: Delete spurious whitespace from uAPI header Adrián Larumbe
2026-04-15 13:41 ` Boris Brezillon
2026-04-15 15:19 ` Steven Price
2026-04-15 11:28 ` [PATCH v7 4/6] drm/panthor: Remove unused operation context field Adrián Larumbe
2026-04-15 13:41 ` Boris Brezillon
2026-04-15 15:20 ` Steven Price
2026-04-15 11:28 ` [PATCH v7 5/6] drm/panthor: Support sparse mappings Adrián Larumbe
2026-04-15 15:12 ` Boris Brezillon
2026-04-15 22:09 ` Adrián Larumbe
2026-04-16 6:55 ` Boris Brezillon
2026-04-16 7:03 ` Boris Brezillon
2026-04-15 23:15 ` Adrián Larumbe
2026-04-16 18:25 ` Adrián Larumbe
2026-04-17 8:19 ` Boris Brezillon [this message]
2026-04-15 11:28 ` [PATCH v7 6/6] drm/panthor: Bump the driver version to 1.9 Adrián Larumbe
2026-04-15 13:54 ` Jani Nikula
2026-04-15 14:01 ` Adrián Larumbe
2026-04-15 16:20 ` Jani Nikula
2026-04-15 15:26 ` Boris Brezillon
2026-04-15 15:22 ` Boris Brezillon
2026-04-15 15:27 ` Boris Brezillon
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=20260417101934.7320f562@fedora \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--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