Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dillon Varone and committed by
Alex Deucher
9fe5d08f 218987fd

+3 -1
+3 -1
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c
··· 299 299 300 300 bool dmub_dcn32_is_hw_init(struct dmub_srv *dmub) 301 301 { 302 + union dmub_fw_boot_status status; 302 303 uint32_t is_hw_init; 303 304 305 + status.all = REG_READ(DMCUB_SCRATCH0); 304 306 REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_hw_init); 305 307 306 - return is_hw_init != 0; 308 + return is_hw_init != 0 && status.bits.dal_fw; 307 309 } 308 310 309 311 bool dmub_dcn32_is_supported(struct dmub_srv *dmub)