[PATCH 06/20] drm/amdgpu:no need use sriov judge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Tuesday, February 07, 2017 1:11 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 06/20] drm/amdgpu:no need use sriov judge
> 
> Change-Id: I9717e200be8af36f52d6305e02ffea178044c851
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>

Please add a better patch description.  We ultimately want to re-use this for bare metal, so no need to have vf checks in the KIQ code itself since kiq itself is currently only used in VF cases.  With that fixed,
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index df1cfc5..fd29124 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -1379,11 +1379,9 @@ static int gfx_v8_0_kiq_init_ring(struct
> amdgpu_device *adev,
>  {
>  	int r = 0;
> 
> -	if (amdgpu_sriov_vf(adev)) {
> -		r = amdgpu_wb_get(adev, &adev->virt.reg_val_offs);
> -		if (r)
> -			return r;
> -	}
> +	r = amdgpu_wb_get(adev, &adev->virt.reg_val_offs);
> +	if (r)
> +		return r;
> 
>  	ring->adev = NULL;
>  	ring->ring_obj = NULL;
> @@ -1407,13 +1405,10 @@ static int gfx_v8_0_kiq_init_ring(struct
> amdgpu_device *adev,
> 
>  	return r;
>  }
> -
>  static void gfx_v8_0_kiq_free_ring(struct amdgpu_ring *ring,
>  				   struct amdgpu_irq_src *irq)
>  {
> -	if (amdgpu_sriov_vf(ring->adev))
> -		amdgpu_wb_free(ring->adev, ring->adev-
> >virt.reg_val_offs);
> -
> +	amdgpu_wb_free(ring->adev, ring->adev->virt.reg_val_offs);
>  	amdgpu_ring_fini(ring);
>  	irq->data = NULL;
>  }
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux