[PATCH] drm/amdgpu: Enable GFXOFF for Compute on GFX11 V2

Alex Deucher alexdeucher at gmail.com
Thu Dec 14 20:07:50 UTC 2023


On Thu, Dec 14, 2023 at 3:06 PM Ori Messinger <Ori.Messinger at amd.com> wrote:
>
> GFXOFF was previously disabled as a temporary workaround for GFX11
> due to issues in some compute applications.
> This patch re-enables GFXOFF for GFX version 11.
>
> V2: keep GFXOFF disabled on GFX11 if MES KIQ is below version 64.
>
> Signed-off-by: Ori Messinger <Ori.Messinger at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> index 067690ba7bff..6586b00c3b2d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> @@ -695,10 +695,8 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
>  void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
>  {
>         enum amd_powergating_state state = idle ? AMD_PG_STATE_GATE : AMD_PG_STATE_UNGATE;
> -       /* Temporary workaround to fix issues observed in some
> -        * compute applications when GFXOFF is enabled on GFX11.
> -        */
> -       if (IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 11) {
> +       if (IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 11 &&
> +           (adev->mes.kiq_version & AMDGPU_MES_VERSION_MASK <= 64)) {
>                 pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
>                 amdgpu_gfx_off_ctrl(adev, idle);
>         } else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
> --
> 2.25.1
>


More information about the amd-gfx mailing list