]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/psr: Chase psr.enabled only under the psr.lock
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 5 Apr 2018 11:49:15 +0000 (12:49 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Apr 2018 10:38:42 +0000 (11:38 +0100)
commitc1b429da40be412b330cbf1b7601f7c100197498
tree50e2a2fbe5b61fe7dd7d96add9709e08985310b8
parent6d49bf48460c601de0e06e5ed1bb9f753c4ab2b4
drm/i915/psr: Chase psr.enabled only under the psr.lock

Inside the psr work function, we want to wait for PSR to idle first and
wish to do so without blocking the normal modeset path, so we do so
without holding the PSR lock. However, we first have to find which pipe
PSR was enabled on, which requires chasing into the PSR struct and
requires locking to prevent intel_psr_disable() from concurrently
setting our pointer to NULL.

Fixes: 99803abf8f81 ("drm/i915: VLV/CHV PSR Software timer mode")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: <stable@vger.kernel.org> # v4.0+
Reviewed-by: Jose Roberto de Souza <jose.souza@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180405114915.29609-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_psr.c