mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/amdgpu: add helper function to query dynamic boot config cap
Check firmware flags to determine whether dynmaic boot config is supported or not. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: John Clements <john.clements@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
82a5203016
commit
cffd6f9d42
3 changed files with 18 additions and 0 deletions
|
@ -452,6 +452,22 @@ bool amdgpu_atomfirmware_sram_ecc_supported(struct amdgpu_device *adev)
|
||||||
return (fw_cap & ATOM_FIRMWARE_CAP_SRAM_ECC) ? true : false;
|
return (fw_cap & ATOM_FIRMWARE_CAP_SRAM_ECC) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper function to query dynamic boot config capability
|
||||||
|
*
|
||||||
|
* @adev: amdgpu_device pointer
|
||||||
|
*
|
||||||
|
* Return true if vbios supports dynamic boot config or false if not
|
||||||
|
*/
|
||||||
|
bool amdgpu_atomfirmware_dynamic_boot_config_supported(struct amdgpu_device *adev)
|
||||||
|
{
|
||||||
|
u32 fw_cap;
|
||||||
|
|
||||||
|
fw_cap = adev->mode_info.firmware_flags;
|
||||||
|
|
||||||
|
return (fw_cap & ATOM_FIRMWARE_CAP_DYNAMIC_BOOT_CFG_ENABLE) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
union smu_info {
|
union smu_info {
|
||||||
struct atom_smu_info_v3_1 v31;
|
struct atom_smu_info_v3_1 v31;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,7 @@ int amdgpu_atomfirmware_get_gfx_info(struct amdgpu_device *adev);
|
||||||
bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev);
|
bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev);
|
||||||
bool amdgpu_atomfirmware_sram_ecc_supported(struct amdgpu_device *adev);
|
bool amdgpu_atomfirmware_sram_ecc_supported(struct amdgpu_device *adev);
|
||||||
bool amdgpu_atomfirmware_mem_training_supported(struct amdgpu_device *adev);
|
bool amdgpu_atomfirmware_mem_training_supported(struct amdgpu_device *adev);
|
||||||
|
bool amdgpu_atomfirmware_dynamic_boot_config_supported(struct amdgpu_device *adev);
|
||||||
int amdgpu_atomfirmware_get_fw_reserved_fb_size(struct amdgpu_device *adev);
|
int amdgpu_atomfirmware_get_fw_reserved_fb_size(struct amdgpu_device *adev);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -501,6 +501,7 @@ enum atombios_firmware_capability
|
||||||
ATOM_FIRMWARE_CAP_SRAM_ECC = 0x00000200,
|
ATOM_FIRMWARE_CAP_SRAM_ECC = 0x00000200,
|
||||||
ATOM_FIRMWARE_CAP_ENABLE_2STAGE_BIST_TRAINING = 0x00000400,
|
ATOM_FIRMWARE_CAP_ENABLE_2STAGE_BIST_TRAINING = 0x00000400,
|
||||||
ATOM_FIRMWARE_CAP_ENABLE_2ND_USB20PORT = 0x0008000,
|
ATOM_FIRMWARE_CAP_ENABLE_2ND_USB20PORT = 0x0008000,
|
||||||
|
ATOM_FIRMWARE_CAP_DYNAMIC_BOOT_CFG_ENABLE = 0x0020000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum atom_cooling_solution_id{
|
enum atom_cooling_solution_id{
|
||||||
|
|
Loading…
Add table
Reference in a new issue