[PATCH] drm/amdgpu: add is_raven_kicker judgement for raven1

Huang Rui ray.huang at amd.com
Mon Feb 17 02:02:28 UTC 2020


On Fri, Feb 14, 2020 at 12:03:58PM +0800, Zhu, Changfeng wrote:
> From: changzhu <Changfeng.Zhu at amd.com>
> 
> The rlc version of raven_kicer_rlc is different from the legacy rlc
> version of raven_rlc. So it needs to add a judgement function for
> raven_kicer_rlc and avoid disable GFXOFF when loading raven_kicer_rlc.
> 
> Change-Id: I00d726cc39eae4ea788c1d5faeb8ce75ec0b884d
> Signed-off-by: changzhu <Changfeng.Zhu at amd.com>

Reviewed-by: Huang Rui <ray.huang at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 4d8b58e9d0ae..9b7ff783e9a5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1193,6 +1193,14 @@ static bool gfx_v9_0_should_disable_gfxoff(struct pci_dev *pdev)
>  	return false;
>  }
>  
> +static bool is_raven_kicker(struct amdgpu_device *adev)
> +{
> +	if (adev->pm.fw_version >= 0x41e2b)
> +		return true;
> +	else
> +		return false;
> +}
> +
>  static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
>  {
>  	if (gfx_v9_0_should_disable_gfxoff(adev->pdev))
> @@ -1205,9 +1213,8 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
>  		break;
>  	case CHIP_RAVEN:
>  		if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8) &&
> -		    ((adev->gfx.rlc_fw_version != 106 &&
> +		    ((!is_raven_kicker(adev) &&
>  		      adev->gfx.rlc_fw_version < 531) ||
> -		     (adev->gfx.rlc_fw_version == 53815) ||
>  		     (adev->gfx.rlc_feature_version < 1) ||
>  		     !adev->gfx.rlc.is_rlc_v2_1))
>  			adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
> -- 
> 2.17.1
> 


More information about the amd-gfx mailing list