Re: [Intel-gfx] [PATCH v6 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-02-09 Thread Wang, Zhi A
On 2/9/22 7:32 AM, Christoph Hellwig wrote: > On Tue, Feb 08, 2022 at 06:11:50AM -0500, Zhi Wang wrote: >> +struct drm_i915_private *dev_priv = iter->i915; >> +u32 *mmio, i; >> + >> +for (i = offset; i < offset + size; i += 4) { >> +mmio = iter->data + i; >> +*mm

Re: [Intel-gfx] [PATCH v6 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-02-08 Thread Christoph Hellwig
On Tue, Feb 08, 2022 at 06:11:50AM -0500, Zhi Wang wrote: > + struct drm_i915_private *dev_priv = iter->i915; > + u32 *mmio, i; > + > + for (i = offset; i < offset + size; i += 4) { > + mmio = iter->data + i; > + *mmio = intel_uncore_read_notrace(to_gt(dev_priv)-

[Intel-gfx] [PATCH v6 2/3] i915/gvt: Save the initial HW state snapshot in i915

2022-02-08 Thread Zhi Wang
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 stat