Re: [PATCH] drm/amdgpu: Enable SDMA MGCG for Vangogh

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

 



On Wed, Apr 21, 2021 at 03:12:50PM +0800, Su, Jinzhou (Joe) wrote:
> Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh.
> Start to open sdma mgcg from firmware version 70.
> 
> Signed-off-by: Jinzhou Su <Jinzhou.Su@xxxxxxx>

Reviewed-by: Huang Rui <ray.huang@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/amdgpu/nv.c        | 1 +
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index d54af7f8801b..0142f6760ad2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -1118,6 +1118,7 @@ static int nv_common_early_init(void *handle)
>  			AMD_CG_SUPPORT_MC_LS |
>  			AMD_CG_SUPPORT_GFX_FGCG |
>  			AMD_CG_SUPPORT_VCN_MGCG |
> +			AMD_CG_SUPPORT_SDMA_MGCG |
>  			AMD_CG_SUPPORT_JPEG_MGCG;
>  		adev->pg_flags = AMD_PG_SUPPORT_GFX_PG |
>  			AMD_PG_SUPPORT_VCN |
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> index b1ad9e52b234..4ba7fce4c0b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> @@ -1556,6 +1556,10 @@ static void sdma_v5_2_update_medium_grain_clock_gating(struct amdgpu_device *ade
>  	int i;
>  
>  	for (i = 0; i < adev->sdma.num_instances; i++) {
> +
> +		if (adev->sdma.instance[i].fw_version < 70 && adev->asic_type == CHIP_VANGOGH)
> +			adev->cg_flags &= ~AMD_CG_SUPPORT_SDMA_MGCG;
> +
>  		if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG)) {
>  			/* Enable sdma clock gating */
>  			def = data = RREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_CLK_CTRL));
> -- 
> 2.27.0
> 
_______________________________________________
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