diff options
author | Weinan Li <weinan.z.li@intel.com> | 2018-02-23 14:46:45 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2018-03-06 13:19:23 +0800 |
commit | cd7e61b93d068a80bfe6cb55bf00f17332d831a1 (patch) | |
tree | 7ddde05df7b4ddfd9dea1d187463fc294a4eb8b7 /drivers/gpu/drm/i915/gvt/mmio_context.h | |
parent | 64f46f55bb30aebf146ae3cd2c2a4e2a06bcea04 (diff) | |
download | linux-cd7e61b93d068a80bfe6cb55bf00f17332d831a1.tar.gz linux-cd7e61b93d068a80bfe6cb55bf00f17332d831a1.tar.bz2 linux-cd7e61b93d068a80bfe6cb55bf00f17332d831a1.zip |
drm/i915/gvt: init mmio by lri command in vgpu inhibit context
There is one issue relates to Coarse Power Gating(CPG) on KBL NUC in GVT-g,
vgpu can't get the correct default context by updating the registers before
inhibit context submission. It always get back the hardware default value
unless the inhibit context submission happened before the 1st time
forcewake put. With this wrong default context, vgpu will run with
incorrect state and meet unknown issues.
The solution is initialize these mmios by adding lri command in ring buffer
of the inhibit context, then gpu hardware has no chance to go down RC6 when
lri commands are right being executed, and then vgpu can get correct
default context for further use.
v3:
- fix code fault, use 'for' to loop through mmio render list(Zhenyu)
v4:
- save the count of engine mmio need to be restored for inhibit context and
refine some comments. (Kevin)
v5:
- code rebase
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Weinan Li <weinan.z.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/mmio_context.h')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/mmio_context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.h b/drivers/gpu/drm/i915/gvt/mmio_context.h index 4df87c7314c9..0439eb8057a8 100644 --- a/drivers/gpu/drm/i915/gvt/mmio_context.h +++ b/drivers/gpu/drm/i915/gvt/mmio_context.h @@ -51,4 +51,7 @@ void intel_gvt_init_engine_mmio_context(struct intel_gvt *gvt); bool is_inhibit_context(struct i915_gem_context *ctx, int ring_id); +int intel_vgpu_restore_inhibit_context(struct intel_vgpu *vgpu, + struct i915_request *req); + #endif |