[Intel-gfx] [PATCH] drm/i915: get runtime PM reference around GEM set_caching IOCTL

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 17 14:38:32 PST 2015


On Tue, Nov 17, 2015 at 11:16:09PM +0100, Daniel Vetter wrote:
> On Thu, Nov 5, 2015 at 12:56 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > The tricky part is reviewing the i915_gem_release_mmap() callers to
> > ensure that they have the right barrier. If you make
> > i915_gem_release_mmap() assert it holds an rpm ref, and then make the
> > i915_gem_release_all_mmaps() unlink the node directly that should do the
> > trick.
> 
> I think the easier solution would be to add a mutex for the
> fault_list. We call release_mmap from a lot of places,

We don't though. The only times we do are when we touching hw registers
(or gsm):

set_tiling_ioctl - which also may unbind and so needs rpm
fence_write - which needs rpm to write the reigsters
vma_unbind - which needs rpm to write through the gsm
set_caching - which needs rpm to write through the gsm

and currently by rpm itself.

I think it is certainly reasonable to use the rpm barriers for the
faulted list. The only one where we have to actually ensure we hold rpm
is the set_tiling_ioctl.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list