drm/i915: Create vGPU specific MMIO operations to reduce traps
authorYu Zhang <yu.c.zhang@linux.intel.com>
Tue, 10 Feb 2015 11:05:53 +0000 (19:05 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Feb 2015 22:28:25 +0000 (23:28 +0100)
commit3be0bf5acca61daa9800219088b0b95712ced520
tree134c2465908cd94500ddcdfdeb2a089bc195b93e
parentf61018b1fe00238407724ea7a502003c3f71d9a0
drm/i915: Create vGPU specific MMIO operations to reduce traps

In the virtualized environment, forcewake operations are not
necessary for the driver, because mmio accesses will be trapped
and emulated by the host side, and real forcewake operations are
also done in the host. New mmio access handlers are added to directly
call the __raw_i915_read/write, therefore will reduce many traps and
increase the overall performance for drivers running in the VM with
Intel GVT-g enhancement.

v2:
take Chris' comments:
        - register the mmio hooks in intel_uncore_init()
v3:
take Daniel's comments:
        - use macros to assign mmio write functions for vGPU
v4:
take Tvrtko's comments:
        - also use mmio hooks for read operations

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>k
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_uncore.c