OSDN Git Service

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)
commitdb1b76ca6a79c774074ae87bee7afc0825a478f5
tree3a41dc26b0589368bedbad57b0692351b971b82c
parent885b012008583ba70e5537d479454450f5bdfa09
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