[Intel-gfx] [PATCH 4/5] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Chris Wilson
chris at chris-wilson.co.uk
Wed Apr 29 03:57:49 PDT 2015
On Wed, Apr 29, 2015 at 11:19:18AM +0100, Chris Wilson wrote:
> On Wed, Apr 29, 2015 at 03:01:58PM +0530, ankitprasad.r.sharma at intel.com wrote:
> > + while (remain > 0) {
> > + /* Operation in this page
> > + *
> > + * page_base = page offset within aperture
> > + * page_offset = offset within page
> > + * page_length = bytes to copy for this page
> > + */
> > + page_base = offset & PAGE_MASK;
> > + page_offset = offset_in_page(offset);
> > + page_length = remain;
> > + if ((page_offset + remain) > PAGE_SIZE)
> > + page_length = PAGE_SIZE - page_offset;
> > +
> > + /* This is a slow read/write as it tries to read from
> > + * and write to user memory which may result into page
> > + * faults
> > + */
>
> Hmm, I am in the process of rewriting this function (GTT pwrite) to reduce
> aperture pressure (which will also be important here). However for your
> use case, we do need to drop the locks around slow_user_access() so that
> we can use non-atomic copy functions and *pagefault*. We do need the full
> level of complexity like i915_gem_shmem_pread()
It would be a good exercise to try and reproduce the fautling failure condition
with igt/gem_stolen.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list