]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: add test to verify get/put fw domains
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 20 Mar 2019 08:00:52 +0000 (08:00 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 20 Mar 2019 11:32:13 +0000 (11:32 +0000)
commit6fcf1fc10dc6bb8e82757137157f33aadfe317a3
tree8cea135da27016ced20583deda859ceaf8299765
parent566f93afaed5c24c5be95a19f3f8a15495a52dcd
drm/i915/selftests: add test to verify get/put fw domains

Exercise acquiring and releasing forcewake around register reads. In
order to read a register behind a GT powerwell, we need to instruct that
powerwell to wake up using a forcewake. When we no longer require the GT
powerwell, we tell the GT to release our forcewake. Inside the
forcewake, the register read should work but outside it should just
return garbage, 0 being the most common garbage. Thus we can detect when
we are inside and outside of the forcewake with just a simple register
read, and so can verify that the GT powerwell is released when we say
so.

v2: Picking the right forcewaked register to return 0 outside of
forcewake is an art.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190320080052.27273-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/intel_uncore.c