drm/amdgpu: add debugfs access to the IP discovery table
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Jul 2021 18:53:37 +0000 (14:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Oct 2021 19:22:58 +0000 (15:22 -0400)
Useful for debugging and new asic validation.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

index d356e32..cdb963b 100644 (file)
@@ -830,6 +830,7 @@ struct amdgpu_device {
        struct notifier_block           acpi_nb;
        struct amdgpu_i2c_chan          *i2c_bus[AMDGPU_MAX_I2C_BUS];
        struct debugfs_blob_wrapper     debugfs_vbios_blob;
+       struct debugfs_blob_wrapper     debugfs_discovery_blob;
        struct mutex                    srbm_mutex;
        /* GRBM index mutex. Protects concurrent access to GRBM index */
        struct mutex                    grbm_idx_mutex;
index 074ffcf..31e16a4 100644 (file)
@@ -1757,6 +1757,11 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
        debugfs_create_blob("amdgpu_vbios", 0444, root,
                            &adev->debugfs_vbios_blob);
 
+       adev->debugfs_discovery_blob.data = adev->mman.discovery_bin;
+       adev->debugfs_discovery_blob.size = adev->mman.discovery_tmr_size;
+       debugfs_create_blob("amdgpu_discovery", 0444, root,
+                           &adev->debugfs_discovery_blob);
+
        return 0;
 }