diff options
author | Dillon Varone <dillon.varone@amd.com> | 2022-04-14 16:57:17 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-06-03 16:44:15 -0400 |
commit | 9fe5d08fc8230adb64128986ee4af267a54e56dd (patch) | |
tree | 1875f14fe4ec51ba320b4a40ff41bbb7a27bde9d | |
parent | 218987fdead218ae0e714cd9059bc9fc480220f9 (diff) | |
download | linux-9fe5d08fc8230adb64128986ee4af267a54e56dd.tar.gz linux-9fe5d08fc8230adb64128986ee4af267a54e56dd.tar.bz2 linux-9fe5d08fc8230adb64128986ee4af267a54e56dd.zip |
drm/amd/display: Ensure that DMCUB fw in use is loaded by DC and not VBIOS
[Why?]
On wake from S3/S4, driver checks if DMUB is initialized. On S4 VBIOS loads
DMUB, and driver does not reload as it appears to be initialized already.
[How?]
Add a check for the DAL_FW bit to ensure that loaded FW is from driver and
not VBIOS.
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c index 0a498082ccc6..d298f6016e0b 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c @@ -299,11 +299,13 @@ void dmub_dcn32_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset) bool dmub_dcn32_is_hw_init(struct dmub_srv *dmub) { + union dmub_fw_boot_status status; uint32_t is_hw_init; + status.all = REG_READ(DMCUB_SCRATCH0); REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_hw_init); - return is_hw_init != 0; + return is_hw_init != 0 && status.bits.dal_fw; } bool dmub_dcn32_is_supported(struct dmub_srv *dmub) |