aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-06-26 10:04:07 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-07-07 13:51:47 -0400
commit649663af73f59ca6f7dc9021b93c087877e4d8e3 (patch)
tree3a75874ff0bb3151e26de3ea461ad8d3a9bc4c37 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
parent98d19a6c49b5d61d75cf53c7001541f157683bb8 (diff)
downloadlinux-649663af73f59ca6f7dc9021b93c087877e4d8e3.tar.gz
linux-649663af73f59ca6f7dc9021b93c087877e4d8e3.tar.bz2
linux-649663af73f59ca6f7dc9021b93c087877e4d8e3.zip
drm/amd: Add documentation for how to flash a dGPU
The flashing process for dGPUs uses sysfs files in a non-obvious way, so document it for users. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index a22485eedd81..7c20994be0c0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -3570,6 +3570,11 @@ void psp_copy_fw(struct psp_context *psp, uint8_t *start_addr, uint32_t bin_size
drm_dev_exit(idx);
}
+/**
+ * DOC: usbc_pd_fw
+ * Reading from this file will retrieve the USB-C PD firmware version. Writing to
+ * this file will trigger the update process.
+ */
static DEVICE_ATTR(usbc_pd_fw, 0644,
psp_usbc_pd_fw_sysfs_read,
psp_usbc_pd_fw_sysfs_write);
@@ -3663,6 +3668,11 @@ rel_buf:
return 0;
}
+/**
+ * DOC: psp_vbflash
+ * Writing to this file will stage an IFWI for update. Reading from this file
+ * will trigger the update process.
+ */
static struct bin_attribute psp_vbflash_bin_attr = {
.attr = {.name = "psp_vbflash", .mode = 0660},
.size = 0,
@@ -3670,6 +3680,12 @@ static struct bin_attribute psp_vbflash_bin_attr = {
.read = amdgpu_psp_vbflash_read,
};
+/**
+ * DOC: psp_vbflash_status
+ * The status of the flash process.
+ * 0: IFWI flash not complete.
+ * 1: IFWI flash complete.
+ */
static ssize_t amdgpu_psp_vbflash_status(struct device *dev,
struct device_attribute *attr,
char *buf)