OSDN Git Service

drm/amd: Avoid reading the VBIOS part number twice
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 18 Jul 2023 18:02:58 +0000 (13:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Jul 2023 20:52:24 +0000 (16:52 -0400)
commitadf64e214280a0230af0638c1825b3812421c958
treef1c919a426664a2c80c1d2e3638f703441659569
parent18cf073faaa9467d92164dbd4722cf775766860a
drm/amd: Avoid reading the VBIOS part number twice

The VBIOS part number is read both in amdgpu_atom_parse() as well
as in atom_get_vbios_pn() and stored twice in the `struct atom_context`
structure. Remove the first unnecessary read and move the `pr_info`
line from that read into the second.

v2: squash in unused variable removal

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
drivers/gpu/drm/amd/amdgpu/atom.c
drivers/gpu/drm/amd/amdgpu/atom.h