[PATCH 1/2] drm/amdgpu/mes11: optimize MES pipe FW version fetching

Mario Limonciello mario.limonciello at amd.com
Wed Apr 2 19:48:34 UTC 2025


On 3/28/2025 8:08 AM, Alex Deucher wrote:
> Don't fetch it again if we already have it.  It seems the
> registers don't reliably have the value at resume in some
> cases.
> 
> Fixes: 028c3fb37e70 ("drm/amdgpu/mes11: initiate mes v11 support")
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4083
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> index 16f8bc36afa07..06b51867c9aac 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> @@ -895,6 +895,10 @@ static void mes_v11_0_get_fw_version(struct amdgpu_device *adev)
>   {
>   	int pipe;
>   
> +	/* return early if we have already fetched these */
> +	if (adev->mes.sched_version && adev->mes.kiq_version)
> +		return;
> +
>   	/* get MES scheduler/KIQ versions */
>   	mutex_lock(&adev->srbm_mutex);
>   

Reviewed-by: Mario Limonciello <mario.limonciello at amd.com>


More information about the amd-gfx mailing list