Re: [PATCH 2/2] drm/amdkfd: Disable gfxoff for CU occupancy

Alex Deucher <[email protected]>
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <CADnq5_PtJY0EBG1E9yS+PHDTTQHZdYmYBGvd99vsLZvMGWdrgA@mail.gmail.com>
Series is:
Reviewed-by: Alex Deucher <[email protected]>

On Fri, Aug 21, 2026 at 10:26 AM David Belanger <[email protected]> wrote:
>
> Disable gfxoff while collecting CU occupancy data.
>
> Reported-by: Alex Deucher <[email protected]>
> Signed-off-by: David Belanger <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 0a7c1900da959..4316cb73b4115 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -318,8 +318,10 @@ static int kfd_get_cu_occupancy(struct attribute *attr, char *buffer)
>          * XCCs in the partition.
>          * For PM4 queues, there is no cooperative dispatch so wave_cnt stay as it is.
>          */
> +       amdgpu_gfx_off_ctrl(dev->adev, false);
>         dev->kfd2kgd->get_cu_occupancy(dev->adev, cu_occupancy,
>                         &max_waves_per_cu, ffs(dev->xcc_mask) - 1);
> +       amdgpu_gfx_off_ctrl(dev->adev, true);
>
>         for (i = 0; i < AMDGPU_MAX_QUEUES; i++) {
>                 if (cu_occupancy[i].wave_cnt != 0 &&
> --
> 2.51.1
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.