]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: introduce intel_vgpu_reset_cfg_space to reset configuration space
authorChangbin Du <changbin.du@intel.com>
Fri, 13 Jan 2017 03:15:59 +0000 (11:15 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 13 Jan 2017 07:05:38 +0000 (15:05 +0800)
commit586b660c8818962686e5ef083c8985d7ca3dba37
tree5dbf3e01edba3b504d7bc2470460146a54ee37da
parentd31d2e7237223ad0cd2d6aca3a9ea7477ff25a30
drm/i915/gvt: introduce intel_vgpu_reset_cfg_space to reset configuration space

This patch introduces a new function intel_vgpu_reset_cfg_space()
to reset vGPU configuration space. This function will unmap gttmmio
and aperture if they are mapped before. Then entire cfg space will
be restored to default values.

Currently we only do such reset when vGPU is not owned by any VM
so we simply restore entire cfg space to default value, not following
the PCIe FLR spec that some fields should remain unchanged.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/cfg_space.c
drivers/gpu/drm/i915/gvt/gvt.h