[Intel-gfx] [PATCH v2 2/3] drm/i915: noop forcewake get/put when vgpu activated

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 25 14:01:48 UTC 2017


On Wed, Jan 25, 2017 at 09:44:51PM +0800, Weinan Li wrote:
> Host maintian the hardware's forcewake state, guest don't need and also
> can't control it. Although vgpu_read/write bypass forcewake_get/put in MMIO
> read/write, but still have separate path called by
> "intel_uncore_forcewake_get/put" and
> "intel_uncore_forcewake_get/put__locked". Unnecessary MMIO access in guest
> waste much CPU cost. Since we full virtualize the MMIO, just noop the
> forcewake get/put.

For a virtualised GPU, the host maintains the forcewake state on the
real device. As we don't control forcewake ourselves, we can simply
set force_wake_get() and force_wake_put() to be no-ops. By setting the
vfuncs, we adjust both the manual control of forcewake and around the
mmio accessors (making our vgpu specific mmio routines redundant and
to be removed in the next patch).

> Signed-off-by: Weinan Li <weinan.z.li at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list