[PATCH] drm/i915/gvt: add missing display part reset for vGPU reset

Gao, Ping A ping.a.gao at intel.com
Tue Feb 14 07:11:55 UTC 2017


Looks good to me. :)

On 2017/2/14 14:50, Du, Changbin wrote:
> From: Changbin Du <changbin.du at intel.com>
>
> We also need reset vGPU virtual display emulation. Since all vreg has
> been cleared, we need reset display related vreg to reflect our display
> setting.
>
> Signed-off-by: Changbin Du <changbin.du at intel.com>
> Cc: Ping Gao <ping.a.gao at intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/display.c | 12 ++++++++++++
>  drivers/gpu/drm/i915/gvt/display.h |  1 +
>  drivers/gpu/drm/i915/gvt/vgpu.c    |  1 +
>  3 files changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/display.c b/drivers/gpu/drm/i915/gvt/display.c
> index c0c884a..4731dce 100644
> --- a/drivers/gpu/drm/i915/gvt/display.c
> +++ b/drivers/gpu/drm/i915/gvt/display.c
> @@ -328,3 +328,15 @@ int intel_vgpu_init_display(struct intel_vgpu *vgpu)
>  	else
>  		return setup_virtual_dp_monitor(vgpu, PORT_B, GVT_DP_B);
>  }
> +
> +/**
> + * intel_vgpu_reset_display- reset vGPU virtual display emulation
> + * @vgpu: a vGPU
> + *
> + * This function is used to reset vGPU virtual display emulation stuffs
> + *
> + */
> +void intel_vgpu_reset_display(struct intel_vgpu *vgpu)
> +{
> +	emulate_monitor_status_change(vgpu);
> +}
> diff --git a/drivers/gpu/drm/i915/gvt/display.h b/drivers/gpu/drm/i915/gvt/display.h
> index 7a60cb8..8b234ea 100644
> --- a/drivers/gpu/drm/i915/gvt/display.h
> +++ b/drivers/gpu/drm/i915/gvt/display.h
> @@ -158,6 +158,7 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt);
>  void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt);
>  
>  int intel_vgpu_init_display(struct intel_vgpu *vgpu);
> +void intel_vgpu_reset_display(struct intel_vgpu *vgpu);
>  void intel_vgpu_clean_display(struct intel_vgpu *vgpu);
>  
>  #endif
> diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
> index 7295bc8..2c17e07 100644
> --- a/drivers/gpu/drm/i915/gvt/vgpu.c
> +++ b/drivers/gpu/drm/i915/gvt/vgpu.c
> @@ -384,6 +384,7 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
>  		intel_vgpu_reset_resource(vgpu);
>  		intel_vgpu_reset_mmio(vgpu);
>  		populate_pvinfo_page(vgpu);
> +		intel_vgpu_reset_display(vgpu);
>  
>  		if (dmlr)
>  			intel_vgpu_reset_cfg_space(vgpu);



More information about the intel-gvt-dev mailing list