]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: Add vcn and jpeg ras support flag
authorMohammad Zafar Ziya <Mohammadzafar.ziya@amd.com>
Thu, 17 Mar 2022 01:45:42 +0000 (09:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Mar 2022 16:54:39 +0000 (12:54 -0400)
Add vcn and jpeg ras support options

V2: vcn and jpeg ras flag enabled for aldebaran asic only

V3: vcn and jpeg ras flag disabled for error counter query
Generic poison query interface added
VCN and JPEG ras enabled based on IP version check

V4: vcn and jpeg ras flag moved under ecc flag for dGPU

Signed-off-by: Mohammad Zafar Ziya <Mohammadzafar.ziya@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h

index 424c22a841f401ae0a5177cb3183855254b65689..ec709997c9c74eb0a6e09fb5ad0d5cc6232b8028 100644 (file)
@@ -66,6 +66,8 @@ const char *ras_block_string[] = {
        "mp1",
        "fuse",
        "mca",
+       "vcn",
+       "jpeg",
 };
 
 const char *ras_mca_block_string[] = {
@@ -2205,6 +2207,13 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev)
                        dev_info(adev->dev, "SRAM ECC is active.\n");
                        adev->ras_hw_enabled |= ~(1 << AMDGPU_RAS_BLOCK__UMC |
                                                    1 << AMDGPU_RAS_BLOCK__DF);
+
+                       if (adev->ip_versions[VCN_HWIP][0] == IP_VERSION(2, 6, 0))
+                               adev->ras_hw_enabled |= (1 << AMDGPU_RAS_BLOCK__VCN |
+                                               1 << AMDGPU_RAS_BLOCK__JPEG);
+                       else
+                               adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__VCN |
+                                               1 << AMDGPU_RAS_BLOCK__JPEG);
                } else {
                        dev_info(adev->dev, "SRAM ECC is not presented.\n");
                }
index 9314fde81e68fbfd775a1c321ca69d77ec24b905..1e1a3b736859e582d9e3f1f479d1a2c4a8576e76 100644 (file)
@@ -49,6 +49,8 @@ enum amdgpu_ras_block {
        AMDGPU_RAS_BLOCK__MP1,
        AMDGPU_RAS_BLOCK__FUSE,
        AMDGPU_RAS_BLOCK__MCA,
+       AMDGPU_RAS_BLOCK__VCN,
+       AMDGPU_RAS_BLOCK__JPEG,
 
        AMDGPU_RAS_BLOCK__LAST
 };