drm/amdgpu: add sdma v4_4 ras function
sdma ras function is the main structure to support sdma ras on aldebaran. the patch initializes late_init late_fini callbacks. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Dennis Li<Dennis.Li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
a6d9d6ab84
commit
2fdb91a25e
@@ -131,6 +131,7 @@ amdgpu-y += \
|
|||||||
sdma_v2_4.o \
|
sdma_v2_4.o \
|
||||||
sdma_v3_0.o \
|
sdma_v3_0.o \
|
||||||
sdma_v4_0.o \
|
sdma_v4_0.o \
|
||||||
|
sdma_v4_4.o \
|
||||||
sdma_v5_0.o \
|
sdma_v5_0.o \
|
||||||
sdma_v5_2.o
|
sdma_v5_2.o
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
#include "ivsrcid/sdma1/irqsrcs_sdma1_4_0.h"
|
#include "ivsrcid/sdma1/irqsrcs_sdma1_4_0.h"
|
||||||
|
|
||||||
#include "amdgpu_ras.h"
|
#include "amdgpu_ras.h"
|
||||||
|
#include "sdma_v4_4.h"
|
||||||
|
|
||||||
MODULE_FIRMWARE("amdgpu/vega10_sdma.bin");
|
MODULE_FIRMWARE("amdgpu/vega10_sdma.bin");
|
||||||
MODULE_FIRMWARE("amdgpu/vega10_sdma1.bin");
|
MODULE_FIRMWARE("amdgpu/vega10_sdma1.bin");
|
||||||
@@ -2789,6 +2790,9 @@ static void sdma_v4_0_set_ras_funcs(struct amdgpu_device *adev)
|
|||||||
case CHIP_ARCTURUS:
|
case CHIP_ARCTURUS:
|
||||||
adev->sdma.funcs = &sdma_v4_0_ras_funcs;
|
adev->sdma.funcs = &sdma_v4_0_ras_funcs;
|
||||||
break;
|
break;
|
||||||
|
case CHIP_ALDEBARAN:
|
||||||
|
adev->sdma.funcs = &sdma_v4_4_ras_funcs;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
Normal file
28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Advanced Micro Devices, Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include "amdgpu.h"
|
||||||
|
|
||||||
|
const struct amdgpu_sdma_ras_funcs sdma_v4_4_ras_funcs = {
|
||||||
|
.ras_late_init = amdgpu_sdma_ras_late_init,
|
||||||
|
.ras_fini = amdgpu_sdma_ras_fini,
|
||||||
|
};
|
||||||
28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.h
Normal file
28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Advanced Micro Devices, Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef __SDMA_V4_4_H__
|
||||||
|
#define __SDMA_V4_4_H__
|
||||||
|
|
||||||
|
extern const struct amdgpu_sdma_ras_funcs sdma_v4_4_ras_funcs;
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user