diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-03-05 22:33:25 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:53:26 -0400 |
commit | cf4270ec689d4b3672941ecfe87578125020c9d7 (patch) | |
tree | e731288155719b94643a53d7167d08b20a22f9d1 /drivers/gpu/drm/amd/amdgpu/atom.c | |
parent | c5cb934ebd4cfc007f81e0a36c504f33fa5b8361 (diff) |
drm/amdgpu: print full bios version in dmesg.
v2: fix merge error.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@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/atom.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/atom.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c index d1444aaca038..81c60a277eeb 100644 --- a/drivers/gpu/drm/amd/amdgpu/atom.c +++ b/drivers/gpu/drm/amd/amdgpu/atom.c | |||
@@ -1300,8 +1300,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) | |||
1300 | struct atom_context *ctx = | 1300 | struct atom_context *ctx = |
1301 | kzalloc(sizeof(struct atom_context), GFP_KERNEL); | 1301 | kzalloc(sizeof(struct atom_context), GFP_KERNEL); |
1302 | char *str; | 1302 | char *str; |
1303 | char name[512]; | 1303 | u16 idx; |
1304 | int i; | ||
1305 | 1304 | ||
1306 | if (!ctx) | 1305 | if (!ctx) |
1307 | return NULL; | 1306 | return NULL; |
@@ -1339,18 +1338,13 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) | |||
1339 | return NULL; | 1338 | return NULL; |
1340 | } | 1339 | } |
1341 | 1340 | ||
1342 | str = CSTR(CU16(base + ATOM_ROM_MSG_PTR)); | 1341 | idx = CU16(ATOM_ROM_PART_NUMBER_PTR); |
1343 | while (*str && ((*str == '\n') || (*str == '\r'))) | 1342 | if (idx == 0) |
1344 | str++; | 1343 | idx = 0x80; |
1345 | /* name string isn't always 0 terminated */ | 1344 | |
1346 | for (i = 0; i < 511; i++) { | 1345 | str = CSTR(idx); |
1347 | name[i] = str[i]; | 1346 | if (*str != '\0') |
1348 | if (name[i] < '.' || name[i] > 'z') { | 1347 | pr_info("ATOM BIOS: %s\n", str); |
1349 | name[i] = 0; | ||
1350 | break; | ||
1351 | } | ||
1352 | } | ||
1353 | pr_info("ATOM BIOS: %s\n", name); | ||
1354 | 1348 | ||
1355 | return ctx; | 1349 | return ctx; |
1356 | } | 1350 | } |