aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/atom.c
diff options
context:
space:
mode:
authorKent Russell <kent.russell@amd.com>2017-08-22 12:31:43 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-08-29 15:27:54 -0400
commitdb95e2185523ee9d46a13ceee37bffe8442d2e1c (patch)
treeea7d938a8a312220162983bf1c693a76a036a20a /drivers/gpu/drm/amd/amdgpu/atom.c
parent96bec198352799794b0f8937620e811ef8b9fa22 (diff)
drm/amdgpu: Add debugfs file for VBIOS and version
Add 2 debugfs files, one that contains the VBIOS version, and one that contains the VBIOS itself. These won't change after initialization, so we can add the VBIOS version when we parse the atombios information. This ensures that we can find out the VBIOS version, even when the dmesg buffer fills up, and makes it easier to associate which VBIOS version is for which GPU on mGPU configurations. Set the size to 20 characters in case of some weird VBIOS version that exceeds the expected 17 character format (3-8-3\0). The VBIOS dump also allows for easy debugging v2: Move to debugfs, clarify commit message, add VBIOS dump file Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/atom.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/atom.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index d69aa2e179bb..69500a8b4e2d 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1343,8 +1343,11 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
1343 idx = 0x80; 1343 idx = 0x80;
1344 1344
1345 str = CSTR(idx); 1345 str = CSTR(idx);
1346 if (*str != '\0') 1346 if (*str != '\0') {
1347 pr_info("ATOM BIOS: %s\n", str); 1347 pr_info("ATOM BIOS: %s\n", str);
1348 strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version));
1349 }
1350
1348 1351
1349 return ctx; 1352 return ctx;
1350} 1353}