]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu: Apply poison mode check to GFX IP only
authorHawking Zhang <Hawking.Zhang@amd.com>
Mon, 3 Jul 2023 06:38:45 +0000 (14:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Aug 2023 21:12:49 +0000 (17:12 -0400)
For GFX IP that only supports poison consumption, GFX
RAS won't be marked as enabled. i.e., hardware doesn't
support gfx sram ecc. But driver still needs to issue
firmware to enable poison consumption mode for GFX IP.
In such case, check poison mode and treat GFX IP as
RAS capable IP block.

Signed-off-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

index fa53a51db69f4ecad7c863e8cd25507cd6b4feaf..664b841f5cece2d53da5280f052e78bc868c6e85 100644 (file)
@@ -3153,6 +3153,7 @@ int amdgpu_ras_is_supported(struct amdgpu_device *adev,
         * that the ras block supports ras function.
         */
        if (!ret &&
+           block == AMDGPU_RAS_BLOCK__GFX &&
            amdgpu_ras_is_poison_mode_supported(adev) &&
            amdgpu_ras_get_ras_block(adev, block, 0))
                ret = 1;