i915/gvt: Save the initial HW state snapshot in i915
authorZhi Wang <zhi.a.wang@intel.com>
Thu, 7 Apr 2022 07:19:44 +0000 (03:19 -0400)
committerZhi Wang <zhi.a.wang@intel.com>
Thu, 21 Apr 2022 11:36:56 +0000 (07:36 -0400)
commit66e7a8063381cb2f568cd3436df2f0ec239a84f9
tree65c2c1c01427581350b3fb9291a1832029833218
parente0f74ed4634d6d662e7dca19115d0da1143a3ec0
i915/gvt: Save the initial HW state snapshot in i915

Save the initial HW state snapshot in i915 so that the rest code of GVT-g
can be moved into a dedicated module while it can still get a clean
initial HW state saved at the correct time during the initialization of
i915. The futhrer vGPU created by GVT-g will use this HW state as the
initial HW state.

v6:
- Remove the reference of intel_gvt_device_info.(Christoph)
- Refine the save_mmio() function. (Christoph)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Vivi Rodrigo <rodrigo.vivi@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220407071945.72148-3-zhi.a.wang@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_gvt.c