drm/amd/amdgpu: Add APU flag to gca_config debugfs data (v3)
authorTom St Denis <tom.stdenis@amd.com>
Tue, 15 Feb 2022 14:59:07 +0000 (09:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Feb 2022 20:59:05 +0000 (15:59 -0500)
Needed by umr to detect if ip discovered ASIC is an APU or not.

(v2): Remove asic type from packet it's not strictly needed
(v3): Correct comment

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

index 4b950de9bf663ad7ece3139ce8467d4b0032b2b6..db8a8710333e02968a05c7223475a4188eeab160 100644 (file)
@@ -728,7 +728,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
                return -ENOMEM;
 
        /* version, increment each time something is added */
-       config[no_regs++] = 3;
+       config[no_regs++] = 4;
        config[no_regs++] = adev->gfx.config.max_shader_engines;
        config[no_regs++] = adev->gfx.config.max_tile_pipes;
        config[no_regs++] = adev->gfx.config.max_cu_per_sh;
@@ -768,6 +768,9 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
        config[no_regs++] = adev->pdev->subsystem_device;
        config[no_regs++] = adev->pdev->subsystem_vendor;
 
+       /* rev==4 APU flag */
+       config[no_regs++] = adev->flags & AMD_IS_APU ? 1 : 0;
+
        while (size && (*pos < no_regs * 4)) {
                uint32_t value;