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/amdgpu: Print full vbios info

Add build number, version and date to the existing part number print.

Example:

[drm] ATOM BIOS: 113-PN000108-103, build: 00159017, ver: 022.040.003.043.000001, 2025/07/27

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
4fd7b724 a17ef941

+26 -2
+26 -2
drivers/gpu/drm/amd/amdgpu/atom.c
··· 1462 1462 1463 1463 ctx->vbios_pn[count] = 0; 1464 1464 } 1465 - 1466 - drm_info(ctx->card->dev, "ATOM BIOS: %s\n", ctx->vbios_pn); 1467 1465 } 1468 1466 1469 1467 static void atom_get_vbios_version(struct atom_context *ctx) ··· 1516 1518 len = min(atom_rom_hdr - str, STRLEN_NORMAL); 1517 1519 if (len) 1518 1520 strscpy(ctx->build_num, str, len); 1521 + } 1522 + 1523 + static inline void atom_print_vbios_info(struct atom_context *ctx) 1524 + { 1525 + char vbios_info[256]; 1526 + int off = 0; 1527 + 1528 + if (ctx->vbios_pn[0]) 1529 + off += scnprintf(vbios_info + off, sizeof(vbios_info) - off, 1530 + "%s", ctx->vbios_pn); 1531 + if (ctx->build_num[0]) 1532 + off += scnprintf(vbios_info + off, sizeof(vbios_info) - off, 1533 + "%sbuild: %s", off ? ", " : "", 1534 + ctx->build_num); 1535 + if (ctx->vbios_ver_str[0]) 1536 + off += scnprintf(vbios_info + off, sizeof(vbios_info) - off, 1537 + "%sver: %s", off ? ", " : "", 1538 + ctx->vbios_ver_str); 1539 + if (ctx->date[0]) 1540 + off += scnprintf(vbios_info + off, sizeof(vbios_info) - off, 1541 + "%s%.10s", off ? ", " : "", 1542 + ctx->date); 1543 + if (off) 1544 + drm_info(ctx->card->dev, "ATOM BIOS: %s\n", vbios_info); 1519 1545 } 1520 1546 1521 1547 struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) ··· 1603 1581 atom_get_vbios_date(ctx); 1604 1582 atom_get_vbios_version(ctx); 1605 1583 atom_get_vbios_build(ctx); 1584 + 1585 + atom_print_vbios_info(ctx); 1606 1586 1607 1587 return ctx; 1608 1588 }