From: Rob Herring <robh@kernel.org>
To: dri-devel@lists.freedesktop.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Robin Murphy <robin.murphy@arm.com>,
Steven Price <steven.price@arm.com>,
David Airlie <airlied@linux.ie>,
Boris Brezillon <boris.brezillon@collabora.com>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
Sean Paul <sean@poorly.run>
Subject: [PATCH v4 1/9] drm/gem: Allow sparsely populated page arrays in drm_gem_put_pages
Date: Thu, 8 Aug 2019 16:21:52 -0600 [thread overview]
Message-ID: <20190808222200.13176-2-robh@kernel.org> (raw)
In-Reply-To: <20190808222200.13176-1-robh@kernel.org>
Panfrost has a need for pages allocated on demand via GPU page faults.
When releasing the pages, the only thing preventing using
drm_gem_put_pages() is needing to skip over unpopulated pages, so allow
for skipping over NULL struct page pointers.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/gpu/drm/drm_gem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index afc38cece3f5..a2dd198177f2 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -633,6 +633,9 @@ void drm_gem_put_pages(struct drm_gem_object *obj, struct page **pages,
pagevec_init(&pvec);
for (i = 0; i < npages; i++) {
+ if (!pages[i])
+ continue;
+
if (dirty)
set_page_dirty(pages[i]);
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-08-08 22:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 22:21 [PATCH v4 0/9] drm/panfrost: Add heap and no execute buffer allocation Rob Herring
2019-08-08 22:21 ` Rob Herring [this message]
2019-08-08 22:21 ` [PATCH v4 2/9] drm/shmem: Put pages independent of a SG table being set Rob Herring
2019-08-08 23:15 ` Eric Anholt
2019-08-08 22:21 ` [PATCH v4 3/9] drm/panfrost: Restructure the GEM object creation Rob Herring
2019-08-09 10:11 ` Steven Price
2019-08-09 21:38 ` Alyssa Rosenzweig
2019-08-08 22:21 ` [PATCH v4 4/9] drm/panfrost: Split panfrost_mmu_map SG list mapping to its own function Rob Herring
2019-08-08 22:21 ` [PATCH v4 5/9] drm/panfrost: Add a no execute flag for BO allocations Rob Herring
2019-08-08 22:21 ` [PATCH v4 6/9] drm/panfrost: Consolidate reset handling Rob Herring
2019-08-09 10:24 ` Steven Price
2019-08-09 21:40 ` Alyssa Rosenzweig
2019-08-08 22:21 ` [PATCH v4 7/9] drm/panfrost: Convert MMU IRQ handler to threaded handler Rob Herring
2019-08-08 22:21 ` [PATCH v4 8/9] drm/panfrost: Add support for GPU heap allocations Rob Herring
2019-08-09 10:31 ` Steven Price
2019-08-08 22:22 ` [PATCH v4 9/9] drm/panfrost: Bump driver version to 1.1 Rob Herring
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=20190808222200.13176-2-robh@kernel.org \
--to=robh@kernel.org \
--cc=airlied@linux.ie \
--cc=alyssa.rosenzweig@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maxime.ripard@bootlin.com \
--cc=robin.murphy@arm.com \
--cc=sean@poorly.run \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
/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.