From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 3/5] drm/i915: Add support for CPU mapping to DRM_IOCTL_I915_GEM_MMAP_GTT
Date: Wed, 27 Jan 2016 17:10:08 +0100 [thread overview]
Message-ID: <20160127161008.GO11240@phenom.ffwll.local> (raw)
In-Reply-To: <56A8E9D6.1070204@linux.intel.com>
On Wed, Jan 27, 2016 at 04:01:26PM +0000, Tvrtko Ursulin wrote:
>
> On 27/01/16 15:51, Daniel Vetter wrote:
> >On Wed, Jan 27, 2016 at 03:21:48PM +0000, Tvrtko Ursulin wrote:
> >>From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >>
> >>This enables mapping via CPU using the proper DRM mmap API for
> >>better debug (Valgrind) and implementation symmetry in the
> >>driver.
> >>
> >>v2:
> >> * Use normal mutex, skip domain management and pin pages. (Chris Wilson)
> >> * No need to drop struct mutex over vma_insert_pfn.
> >
> >I think we still neeed that on first fault:
> >
> >- userspac calls set_domain(GTT)
> >- kernel does nothing since there's no binding
> >- userspace starts accessing gtt mmap
> >- kernel faults, but doesn't update domain/flush cpu caches
> >-> BOOM
>
> Boom what? :) (seriously I don't follow)
I screwed up the example, this one explains why we need the set_domain for
gtt mmaps. For cpu mmaps I think we can get away with it, since we never
optimize away a set_domain(CPU). The problem is just the asymmetry in how
we treat set_domain(GTT) when there's no gtt mmaping.
> And as an aside, you would merge this in general or see value in it?
I think the idea makes sense, seems to still lack justification in form of
some open-source userspace wanting this ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
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:[~2016-01-27 16:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 14:53 [RFC 0/5] Adding CPU mmap support to DRM_IOCTL_I915_GEM_MMAP_GTT Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 1/5] drm: Allow drivers setting vm_ops per vma offset node Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 2/5] drm/i915: Extract code mapping errno to vm fault code Tvrtko Ursulin
2016-01-26 15:18 ` Chris Wilson
2016-01-26 16:24 ` Tvrtko Ursulin
2016-01-26 16:42 ` Chris Wilson
2016-01-26 14:53 ` [RFC 3/5] drm/i915: Add support for CPU mapping to DRM_IOCTL_I915_GEM_MMAP_GTT Tvrtko Ursulin
2016-01-26 15:10 ` Chris Wilson
2016-01-26 16:23 ` Tvrtko Ursulin
2016-01-26 16:59 ` Chris Wilson
2016-01-27 15:24 ` Tvrtko Ursulin
2016-01-27 16:36 ` Chris Wilson
2016-01-27 16:40 ` Chris Wilson
2016-01-27 15:21 ` [PATCH v2 " Tvrtko Ursulin
2016-01-27 15:51 ` Daniel Vetter
2016-01-27 16:01 ` Tvrtko Ursulin
2016-01-27 16:10 ` Daniel Vetter [this message]
2016-01-27 16:32 ` Chris Wilson
2016-01-26 14:53 ` [RFC 4/5] drm/i915: Add support for write-combined " Tvrtko Ursulin
2016-01-26 15:11 ` Chris Wilson
2016-01-27 15:22 ` [PATCH v2 " Tvrtko Ursulin
2016-01-26 14:53 ` [RFC 5/5] drm/i915: Announce the new DRM_IOCTL_I915_GEM_MMAP_GTT capabilities Tvrtko Ursulin
2016-01-28 9:18 ` ✓ Fi.CI.BAT: success for Adding CPU mmap support to DRM_IOCTL_I915_GEM_MMAP_GTT (rev3) Patchwork
2016-01-28 16:10 ` Patchwork
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=20160127161008.GO11240@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox