Skip to contentSkip to conversation

drm/amdgpu: update fw_load_type module parameter doc to match code

PATCH Superseded Yann Dirson 2 participants 2 messages Nov 28, 2021 – Nov 29, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: update fw_load_type module parameter doc to match code

amdgpu_ucode_get_load_type() does not interpret this parameter as documented. It is ignored for many ASIC types (which presumably only support one load_type), and when not ignored it is only used to force direct loading instead of PSP loading. SMU loading is only available for ASICs for which the parameter is ignored.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -2
index ecdec75fdf69..8ab12368b3b6 100644
@@ -315,9 +315,12 @@ module_param_named(dpm, amdgpu_dpm, int, 0444);
 
 /**
  * DOC: fw_load_type (int)
- * Set different firmware loading type for debugging (0 = direct, 1 = SMU, 2 = PSP). The default is -1 (auto).
+ * Set different firmware loading type for debugging, if supported.
+ * Set to 0 to force direct loading if supported by the ASIC.  All
+ * other values select the default loading mode as defined by the
+ * driver.  The default is -1 (auto).
  */
-MODULE_PARM_DESC(fw_load_type, "firmware loading type (0 = direct, 1 = SMU, 2 = PSP, -1 = auto)");
+MODULE_PARM_DESC(fw_load_type, "firmware loading type (0 = force direct if supported, non-zero = auto)");
 module_param_named(fw_load_type, amdgpu_fw_load_type, int, 0444);
 
 /**
Signature · 1 line
2.31.1
#1 lore raw
Quoted 18 lines · Yann Dirson

amdgpu_ucode_get_load_type() does not interpret this parameter as documented. It is ignored for many ASIC types (which presumably only support one load_type), and when not ignored it is only used to force direct loading instead of PSP loading. SMU loading is only available for ASICs for which the parameter is ignored.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
index ecdec75fdf69..8ab12368b3b6 100644
@@ -315,9 +315,12 @@ module_param_named(dpm, amdgpu_dpm, int, 0444);
 

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_param_named(dpm, amdgpu_dpm, int, 0444); · line 323

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -2
 /**
  * DOC: fw_load_type (int)
- * Set different firmware loading type for debugging (0 = direct, 1 = SMU, 2 = PSP). The default is -1 (auto).
+ * Set different firmware loading type for debugging, if supported.
+ * Set to 0 to force direct loading if supported by the ASIC.  All
+ * other values select the default loading mode as defined by the
+ * driver.  The default is -1 (auto).
  */
-MODULE_PARM_DESC(fw_load_type, "firmware loading type (0 = direct, 1 = SMU, 2 = PSP, -1 = auto)");
+MODULE_PARM_DESC(fw_load_type, "firmware loading type (0 = force direct if supported, non-zero = auto)");

Please change the documentation to 0 for direct and -1 for auto in case other methods get added in the future.

Alex

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
 module_param_named(fw_load_type, amdgpu_fw_load_type, int, 0444);
 
 /**
--

2.31.1