Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hawking Zhang and committed by
Alex Deucher
2fdb91a2 a6d9d6ab

+61
+1
drivers/gpu/drm/amd/amdgpu/Makefile
··· 131 131 sdma_v2_4.o \ 132 132 sdma_v3_0.o \ 133 133 sdma_v4_0.o \ 134 + sdma_v4_4.o \ 134 135 sdma_v5_0.o \ 135 136 sdma_v5_2.o 136 137
+4
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
··· 56 56 #include "ivsrcid/sdma1/irqsrcs_sdma1_4_0.h" 57 57 58 58 #include "amdgpu_ras.h" 59 + #include "sdma_v4_4.h" 59 60 60 61 MODULE_FIRMWARE("amdgpu/vega10_sdma.bin"); 61 62 MODULE_FIRMWARE("amdgpu/vega10_sdma1.bin"); ··· 2789 2788 case CHIP_VEGA20: 2790 2789 case CHIP_ARCTURUS: 2791 2790 adev->sdma.funcs = &sdma_v4_0_ras_funcs; 2791 + break; 2792 + case CHIP_ALDEBARAN: 2793 + adev->sdma.funcs = &sdma_v4_4_ras_funcs; 2792 2794 break; 2793 2795 default: 2794 2796 break;
+28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.c
··· 1 + /* 2 + * Copyright 2020 Advanced Micro Devices, Inc. 3 + * 4 + * Permission is hereby granted, free of charge, to any person obtaining a 5 + * copy of this software and associated documentation files (the "Software"), 6 + * to deal in the Software without restriction, including without limitation 7 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 + * and/or sell copies of the Software, and to permit persons to whom the 9 + * Software is furnished to do so, subject to the following conditions: 10 + * 11 + * The above copyright notice and this permission notice shall be included in 12 + * all copies or substantial portions of the Software. 13 + * 14 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 + * OTHER DEALINGS IN THE SOFTWARE. 21 + * 22 + */ 23 + #include "amdgpu.h" 24 + 25 + const struct amdgpu_sdma_ras_funcs sdma_v4_4_ras_funcs = { 26 + .ras_late_init = amdgpu_sdma_ras_late_init, 27 + .ras_fini = amdgpu_sdma_ras_fini, 28 + };
+28
drivers/gpu/drm/amd/amdgpu/sdma_v4_4.h
··· 1 + /* 2 + * Copyright 2020 Advanced Micro Devices, Inc. 3 + * 4 + * Permission is hereby granted, free of charge, to any person obtaining a 5 + * copy of this software and associated documentation files (the "Software"), 6 + * to deal in the Software without restriction, including without limitation 7 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 + * and/or sell copies of the Software, and to permit persons to whom the 9 + * Software is furnished to do so, subject to the following conditions: 10 + * 11 + * The above copyright notice and this permission notice shall be included in 12 + * all copies or substantial portions of the Software. 13 + * 14 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 + * OTHER DEALINGS IN THE SOFTWARE. 21 + * 22 + */ 23 + #ifndef __SDMA_V4_4_H__ 24 + #define __SDMA_V4_4_H__ 25 + 26 + extern const struct amdgpu_sdma_ras_funcs sdma_v4_4_ras_funcs; 27 + 28 + #endif