]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: don't frob mm.suspended when not using ums
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 9 Jul 2013 14:51:37 +0000 (16:51 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 10 Jul 2013 12:30:25 +0000 (14:30 +0200)
commit9723ca418a6f15ab07229dc279142239a75ad372
tree3a41dc26b0589368bedbad57b0692351b971b82c
parent46f27b7bb271f1c9a894a93e86635b48ba1bae84
drm/i915: don't frob mm.suspended when not using ums

In kernel modeset driver mode we're in full control of the chip,
always. So there's no need at all to set mm.suspended in
i915_gem_idle. Hence move that out into the leavevt ioctl. Since
i915_gem_idle doesn't suspend gem any more we can also drop the
re-enabling for KMS in the thaw function.

Also clean up the handling of mm.suspend at driver load by coalescing
all the assignments.

Stumbled over while reading through our resume code for unrelated
reasons.

v2: Shovel mm.suspended into the (newly created) ums dungeon as
suggested by Chris Wilson. The plan is that once we've completely
stopped relying on the register save/restore code we could shovel even
that in there.

v3: Improve the locking for the entervt/leavevt ioctls a bit by moving
the dev->struct_mutex locking outside of i915_gem_idle. Also don't
clear dev_priv->ums.mm_suspended for the kms case, we allocate it with
kzalloc. Both suggested by Chris Wilson.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c