RE: [PATCH] drm/amdgpu/gfx9: rework lbpw enable code

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

 



Reviewed-by: Evan Quan <evan.quan@xxxxxxx>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex
> Deucher
> Sent: 2018年11月9日 5:38
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> Subject: [PATCH] drm/amdgpu/gfx9: rework lbpw enable code
> 
> To avoid changing the global lbpw module parameter directly.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 ++++++++++++---------------
> --
>  1 file changed, 12 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 7abefb80f93d..138cc6c2caec 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -2499,26 +2499,21 @@ static int gfx_v9_0_rlc_resume(struct
> amdgpu_device *adev)
>  			return r;
>  	}
> 
> -	if (amdgpu_lbpw == -1) {
> -		switch (adev->asic_type) {
> -		case CHIP_RAVEN:
> -			amdgpu_lbpw = 1;
> -			break;
> -		case CHIP_VEGA20:
> -			amdgpu_lbpw = 0;
> -			break;
> -		default:
> -			amdgpu_lbpw = 0;
> -			break;
> -		}
> -	}
> -
> -	if (adev->asic_type == CHIP_RAVEN ||
> -	    adev->asic_type == CHIP_VEGA20) {
> -		if (amdgpu_lbpw != 0)
> +	switch (adev->asic_type) {
> +	case CHIP_RAVEN:
> +		if (amdgpu_lbpw == 0)
> +			gfx_v9_0_enable_lbpw(adev, false);
> +		else
> +			gfx_v9_0_enable_lbpw(adev, true);
> +		break;
> +	case CHIP_VEGA20:
> +		if (amdgpu_lbpw > 0)
>  			gfx_v9_0_enable_lbpw(adev, true);
>  		else
>  			gfx_v9_0_enable_lbpw(adev, false);
> +		break;
> +	default:
> +		break;
>  	}
> 
>  	gfx_v9_0_rlc_start(adev);
> --
> 2.13.6
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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