[Intel-gfx] [PATCH 2/2] drm/i915/gvt: Purge dev_priv->gt

Zhenyu Wang zhenyuw at linux.intel.com
Fri Jan 29 07:52:59 UTC 2021


On 2021.01.29 00:49:33 +0000, Chris Wilson wrote:
> Use the right intel_gt stored as a backpointer in intel_vgpu.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---

Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>

I'll queue these two. Thanks!

>  drivers/gpu/drm/i915/gvt/execlist.c  | 8 +++-----
>  drivers/gpu/drm/i915/gvt/scheduler.c | 3 +--
>  2 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
> index 158873f269b1..c8dcda6d4f0d 100644
> --- a/drivers/gpu/drm/i915/gvt/execlist.c
> +++ b/drivers/gpu/drm/i915/gvt/execlist.c
> @@ -522,12 +522,11 @@ static void init_vgpu_execlist(struct intel_vgpu *vgpu,
>  static void clean_execlist(struct intel_vgpu *vgpu,
>  			   intel_engine_mask_t engine_mask)
>  {
> -	struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
> -	struct intel_engine_cs *engine;
>  	struct intel_vgpu_submission *s = &vgpu->submission;
> +	struct intel_engine_cs *engine;
>  	intel_engine_mask_t tmp;
>  
> -	for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp) {
> +	for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp) {
>  		kfree(s->ring_scan_buffer[engine->id]);
>  		s->ring_scan_buffer[engine->id] = NULL;
>  		s->ring_scan_buffer_size[engine->id] = 0;
> @@ -537,11 +536,10 @@ static void clean_execlist(struct intel_vgpu *vgpu,
>  static void reset_execlist(struct intel_vgpu *vgpu,
>  			   intel_engine_mask_t engine_mask)
>  {
> -	struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
>  	struct intel_engine_cs *engine;
>  	intel_engine_mask_t tmp;
>  
> -	for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp)
> +	for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp)
>  		init_vgpu_execlist(vgpu, engine);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
> index 43f31c2eab14..a55ae50dbbe1 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -1015,13 +1015,12 @@ void intel_vgpu_clean_workloads(struct intel_vgpu *vgpu,
>  				intel_engine_mask_t engine_mask)
>  {
>  	struct intel_vgpu_submission *s = &vgpu->submission;
> -	struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
>  	struct intel_engine_cs *engine;
>  	struct intel_vgpu_workload *pos, *n;
>  	intel_engine_mask_t tmp;
>  
>  	/* free the unsubmited workloads in the queues. */
> -	for_each_engine_masked(engine, &dev_priv->gt, engine_mask, tmp) {
> +	for_each_engine_masked(engine, vgpu->gvt->gt, engine_mask, tmp) {
>  		list_for_each_entry_safe(pos, n,
>  			&s->workload_q_head[engine->id], list) {
>  			list_del_init(&pos->list);
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210129/5a49a95b/attachment.sig>


More information about the Intel-gfx mailing list