Some GFX11 models are capable of user queues and have
mqd->compute_perfcount_enable, therefore they
support PMC.

Signed-off-by: Zhu Lingshan <[email protected]>
Reviewed-by: Benjamin Welton <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
index e5ff9005d204..87875dbb6432 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
@@ -1652,6 +1652,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block 
*ip_block)
                    adev->mes.fw_version[0] >= 120) {
                        adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                        adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = 
&userq_mes_funcs;
+                       adev->pmc_profiler.supported = true;
                }
                break;
        case IP_VERSION(11, 0, 1):
@@ -1664,6 +1665,7 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block 
*ip_block)
                if (0 && !adev->gfx.disable_uq) {
                        adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                        adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = 
&userq_mes_funcs;
+                       adev->pmc_profiler.supported = true;
                }
                break;
        default:
-- 
2.53.0

Reply via email to