[PATCH] drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu

Lazar, Lijo lijo.lazar at amd.com
Tue Jan 2 05:50:31 UTC 2024


On 12/22/2023 10:52 PM, Asad Kamal wrote:
> Expose sysfs entry mem_busy_percent for GC version
> 9.4.3 APU system
> 
> Signed-off-by: Asad Kamal <asad.kamal at amd.com>

Reviewed-by: Lijo Lazar <lijo.lazar at amd.com>

Thanks,
Lijo
> ---
>   drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 2cd995b0ceba..f3cb490fe79b 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -2168,7 +2168,9 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
>   		if (amdgpu_dpm_is_overdrive_supported(adev))
>   			*states = ATTR_STATE_SUPPORTED;
>   	} else if (DEVICE_ATTR_IS(mem_busy_percent)) {
> -		if (adev->flags & AMD_IS_APU || gc_ver == IP_VERSION(9, 0, 1))
> +		if ((adev->flags & AMD_IS_APU &&
> +		     gc_ver != IP_VERSION(9, 4, 3)) ||
> +		    gc_ver == IP_VERSION(9, 0, 1))
>   			*states = ATTR_STATE_UNSUPPORTED;
>   	} else if (DEVICE_ATTR_IS(pcie_bw)) {
>   		/* PCIe Perf counters won't work on APU nodes */



More information about the amd-gfx mailing list