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

drm/amdgpu: init sos microcode for psp v13

Initialize sos microcode for aldebaran

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <Le.Ma@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Hawking Zhang and committed by
Alex Deucher
742d3c61 be14729a

+89 -1
+2 -1
drivers/gpu/drm/amd/amdgpu/Makefile
··· 107 107 psp_v3_1.o \ 108 108 psp_v10_0.o \ 109 109 psp_v11_0.o \ 110 - psp_v12_0.o 110 + psp_v12_0.o \ 111 + psp_v13_0.o 111 112 112 113 # add DCE block 113 114 amdgpu-y += \
+57
drivers/gpu/drm/amd/amdgpu/psp_v13_0.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 + #include "amdgpu_psp.h" 25 + #include "amdgpu_ucode.h" 26 + #include "soc15_common.h" 27 + #include "psp_v13_0.h" 28 + 29 + MODULE_FIRMWARE("amdgpu/aldebaran_sos.bin"); 30 + 31 + static int psp_v13_0_init_microcode(struct psp_context *psp) 32 + { 33 + struct amdgpu_device *adev = psp->adev; 34 + const char *chip_name; 35 + int err = 0; 36 + 37 + switch (adev->asic_type) { 38 + case CHIP_ALDEBARAN: 39 + chip_name = "aldebaran"; 40 + break; 41 + default: 42 + BUG(); 43 + } 44 + 45 + err = psp_init_sos_microcode(psp, chip_name); 46 + 47 + return err; 48 + } 49 + 50 + static const struct psp_funcs psp_v13_0_funcs = { 51 + .init_microcode = psp_v13_0_init_microcode, 52 + }; 53 + 54 + void psp_v13_0_set_psp_funcs(struct psp_context *psp) 55 + { 56 + psp->funcs = &psp_v13_0_funcs; 57 + }
+30
drivers/gpu/drm/amd/amdgpu/psp_v13_0.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 __PSP_V13_0_H__ 24 + #define __PSP_V13_0_H__ 25 + 26 + #include "amdgpu_psp.h" 27 + 28 + void psp_v13_0_set_psp_funcs(struct psp_context *psp); 29 + 30 + #endif