From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org,
Akash Goel <akash.goel@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: Support creation of unbound wc user mappings for objects
Date: Thu, 6 Nov 2014 15:50:58 +0100 [thread overview]
Message-ID: <20141106145058.GF26941@phenom.ffwll.local> (raw)
In-Reply-To: <20141105124835.GY13658@nuc-i3427.alporthouse.com>
On Wed, Nov 05, 2014 at 12:48:35PM +0000, Chris Wilson wrote:
> On Thu, Oct 23, 2014 at 05:55:47PM +0100, Chris Wilson wrote:
> > From: Akash Goel <akash.goel@intel.com>
> >
> > This patch provides support to create write-combining virtual mappings of
> > GEM object. It intends to provide the same funtionality of 'mmap_gtt'
> > interface without the constraints and contention of a limited aperture
> > space, but requires clients handles the linear to tile conversion on their
> > own. This is for improving the CPU write operation performance, as with such
> > mapping, writes and reads are almost 50% faster than with mmap_gtt. Similar
> > to the GTT mmapping, unlike the regular CPU mmapping, it avoids the cache
> > flush after update from CPU side, when object is passed onto GPU. This
> > type of mapping is specially useful in case of sub-region update,
> > i.e. when only a portion of the object is to be updated. Using a CPU mmap
> > in such cases would normally incur a clflush of the whole object, and
> > using a GTT mmapping would likely require eviction of an active object or
> > fence and thus stall. The write-combining CPU mmap avoids both.
> >
> > To ensure the cache coherency, before using this mapping, the GTT domain
> > has been reused here. This provides the required cache flush if the object
> > is in CPU domain or synchronization against the concurrent rendering.
> > Although the access through an uncached mmap should automatically
> > invalidate the cache lines, this may not be true for non-temporal write
> > instructions and also not all pages of the object may be updated at any
> > given point of time through this mapping. Having a call to get_pages in
> > set_to_gtt_domain function, as added in the earlier patch 'drm/i915:
> > Broaden application of set-domain(GTT)', would guarantee the clflush and
> > so there will be no cachelines holding the data for the object before it
> > is accessed through this map.
> >
> > The drm_i915_gem_mmap structure (for the DRM_I915_GEM_MMAP_IOCTL) has been
> > extended with a new flags field (defaulting to 0 for existent users). In
> > order for userspace to detect the extended ioctl, a new parameter
> > I915_PARAM_HAS_EXT_MMAP has been added for versioning the ioctl interface.
> >
> > v2: Fix error handling, invalid flag detection, renaming (ickle)
> >
> > The new mmapping is exercised by igt/gem_mmap_wc,
> > igt/gem_concurrent_blit and igt/gem_gtt_speed.
> >
> > Change-Id: Ie883942f9e689525f72fe9a8d3780c3a9faa769a
> > Signed-off-by: Akash Goel <akash.goel@intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Daniel, since both Akash and myself developed this, we need a third body
> for the review. Tag.
Oh, patch itself looks good imo. It's the testcases that need review
(which Akash could do since you've written them), plus the missing bits
(like nasty invalid args checking for the mmap ioctl), which also Akash or
you could supply. Once that's done (plus the review from Akash on your
patch) I'll vavuum up all the kernel parts.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-11-06 14:50 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 13:20 [PATCH] drm/i915: Broaden application of set-domain(GTT) Chris Wilson
2014-10-14 12:47 ` Chris Wilson
2014-10-23 10:33 ` [PATCH] drm/i915: Support to create uncached user mapping for a Gem object akash.goel
2014-10-23 10:37 ` [PATCH] intel: New libdrm interface to create uncached CPU mapping akash.goel
2014-10-23 10:54 ` [PATCH] drm/i915: Support to create uncached user mapping for a Gem object Chris Wilson
2014-10-23 11:03 ` Chris Wilson
2014-10-23 11:56 ` Chris Wilson
2014-10-23 13:23 ` Chris Wilson
2014-12-10 4:48 ` Chad Versace
2014-12-10 8:02 ` Chris Wilson
2014-10-23 16:55 ` [PATCH] drm/i915: Support creation of unbound wc user mappings for objects Chris Wilson
2014-10-23 19:05 ` [PATCH 1/3] igt/gem_evict_(alignment|everything): contend with GPU hangs Chris Wilson
2014-10-23 19:05 ` [PATCH 2/3] lib/core: Check for kernel error messages and WARN if any are found Chris Wilson
2014-10-23 19:05 ` [PATCH 3/3] reg-read-8 Chris Wilson
2014-10-23 19:12 ` [PATCH 1/3] igt/gem_evict_(alignment|everything): contend with GPU hangs Chris Wilson
2014-10-23 19:11 ` [PATCH 1/3] igt/gem_mmap_wc: Exercise mmap(wc) interface Chris Wilson
2014-10-23 19:11 ` [PATCH 2/3] igt/gem_gtt_speed: compare against WC mmaps Chris Wilson
2014-10-23 19:11 ` [PATCH 3/3] igt/gem_concurrent_blit: Exercise wc mappings Chris Wilson
2014-10-25 11:51 ` [PATCH] intel: New libdrm interface to create unbound wc user mappings for objects akash.goel
2014-10-25 12:45 ` Damien Lespiau
2014-10-26 8:36 ` Akash Goel
2014-10-26 8:41 ` Chris Wilson
2014-10-28 13:09 ` [PATCH v3] " akash.goel
2014-10-28 16:11 ` Damien Lespiau
2014-12-03 14:13 ` Damien Lespiau
2014-12-03 18:18 ` Chris Wilson
2014-12-09 10:54 ` Chris Wilson
2014-12-09 16:53 ` Damien Lespiau
2014-12-14 8:41 ` [PATCH v4] " akash.goel
2016-03-09 9:09 ` [PATCH v5] " akash.goel
2016-03-10 8:39 ` Martin Peres
2016-03-14 16:51 ` Martin Peres
2016-03-15 8:41 ` Daniel Vetter
2015-03-03 14:20 ` [PATCH v3] " Damien Lespiau
2015-03-03 17:05 ` Chris Wilson
2015-03-03 17:11 ` Damien Lespiau
2015-03-03 17:13 ` Chris Wilson
2015-03-03 17:16 ` Damien Lespiau
2014-11-05 12:48 ` [PATCH] drm/i915: Support creation of " Chris Wilson
2014-11-06 14:50 ` Daniel Vetter [this message]
2014-12-17 12:46 ` Tvrtko Ursulin
2014-12-17 12:52 ` Chris Wilson
2014-10-24 8:40 ` [PATCH] drm/i915: Support to create uncached user mapping for a Gem object Daniel Vetter
2014-10-24 9:23 ` Chris Wilson
2014-11-05 12:49 ` [PATCH] drm/i915: Broaden application of set-domain(GTT) Chris Wilson
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=20141106145058.GF26941@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=akash.goel@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox