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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/ras: add uniras smu feature flag init func

add flag to indicate if pmfw eeprom is supported or
not, and initialize it

v2: change copyright from 2025 to 2026

Signed-off-by: Gangliang Xie <ganglxie@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Gangliang Xie and committed by
Alex Deucher
12f4d448 689b03a0

+74 -1
+2 -1
drivers/gpu/drm/amd/ras/rascore/Makefile
··· 36 36 ras_log_ring.o \ 37 37 ras_cper.o \ 38 38 ras_psp.o \ 39 - ras_psp_v13_0.o 39 + ras_psp_v13_0.o \ 40 + ras_eeprom_fw.o 40 41 41 42 42 43 RAS_CORE = $(addprefix $(AMD_GPU_RAS_PATH)/rascore/,$(RAS_CORE_FILES))
+3
drivers/gpu/drm/amd/ras/rascore/ras.h
··· 36 36 #include "ras_mp1.h" 37 37 #include "ras_psp.h" 38 38 #include "ras_log_ring.h" 39 + #include "ras_eeprom_fw.h" 39 40 40 41 #define RAS_HW_ERR "[Hardware Error]: " 41 42 ··· 336 335 spinlock_t seqno_lock; 337 336 338 337 bool ras_core_enabled; 338 + 339 + u64 ras_fw_features; 339 340 }; 340 341 341 342 struct ras_core_context *ras_core_create(struct ras_core_config *init_config);
+2
drivers/gpu/drm/amd/ras/rascore/ras_core.c
··· 384 384 if (ret) 385 385 goto init_err5; 386 386 387 + ras_fw_init_feature_flags(ras_core); 388 + 387 389 ret = ras_eeprom_hw_init(ras_core); 388 390 if (ret) 389 391 goto init_err6;
+38
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c
··· 1 + // SPDX-License-Identifier: MIT 2 + /* 3 + * Copyright 2026 Advanced Micro Devices, Inc. 4 + * 5 + * Permission is hereby granted, free of charge, to any person obtaining a 6 + * copy of this software and associated documentation files (the "Software"), 7 + * to deal in the Software without restriction, including without limitation 8 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 + * and/or sell copies of the Software, and to permit persons to whom the 10 + * Software is furnished to do so, subject to the following conditions: 11 + * 12 + * The above copyright notice and this permission notice shall be included in 13 + * all copies or substantial portions of the Software. 14 + * 15 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 + * OTHER DEALINGS IN THE SOFTWARE. 22 + * 23 + */ 24 + 25 + #include "ras.h" 26 + 27 + void ras_fw_init_feature_flags(struct ras_core_context *ras_core) 28 + { 29 + struct ras_mp1 *mp1 = &ras_core->ras_mp1; 30 + const struct ras_mp1_sys_func *sys_func = mp1->sys_func; 31 + uint64_t flags = 0ULL; 32 + 33 + if (!sys_func || !sys_func->mp1_get_ras_enabled_mask) 34 + return; 35 + 36 + if (!sys_func->mp1_get_ras_enabled_mask(ras_core, &flags)) 37 + ras_core->ras_fw_features = flags; 38 + }
+29
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* 3 + * Copyright 2026 Advanced Micro Devices, Inc. 4 + * 5 + * Permission is hereby granted, free of charge, to any person obtaining a 6 + * copy of this software and associated documentation files (the "Software"), 7 + * to deal in the Software without restriction, including without limitation 8 + * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 + * and/or sell copies of the Software, and to permit persons to whom the 10 + * Software is furnished to do so, subject to the following conditions: 11 + * 12 + * The above copyright notice and this permission notice shall be included in 13 + * all copies or substantial portions of the Software. 14 + * 15 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20 + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21 + * OTHER DEALINGS IN THE SOFTWARE. 22 + * 23 + */ 24 + #ifndef __RAS_EEPROM_FW_H__ 25 + #define __RAS_EEPROM_FW_H__ 26 + 27 + void ras_fw_init_feature_flags(struct ras_core_context *ras_core); 28 + 29 + #endif