]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Keep user GGTT alive for a minimum of 250ms
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 27 May 2019 11:51:14 +0000 (12:51 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 May 2019 07:23:09 +0000 (08:23 +0100)
commit4b7fd97cd6c237f8e457df2c5ff31b0028f0a2b7
treedbed55ae5948ebd895a12e01921dd01253942934
parent8574c8e4b20e826bc040bf232901ebf625cfa291
drm/i915: Keep user GGTT alive for a minimum of 250ms

Do not allow runtime pm autosuspend to remove userspace GGTT mmaps too
quickly. For example, igt sets the autosuspend delay to 0, and so we
immediately attempt to perform runtime suspend upon releasing the
wakeref. Unfortunately, that involves tearing down GGTT mmaps as they
require an active device.

Override the autosuspend for GGTT mmaps, by keeping the wakeref around
for 250ms after populating the PTE for a fresh mmap.

v2: Prefer refcount_t for its under/overflow error detection
v3: Flush the user runtime autosuspend prior to system system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527115114.13448-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Kconfig.profile
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_pm.c
drivers/gpu/drm/i915/intel_wakeref.c
drivers/gpu/drm/i915/intel_wakeref.h