drm/amd/display: not reset dmub in driver.
authorYongqiang Sun <yongqiang.sun@amd.com>
Wed, 27 May 2020 17:57:55 +0000 (13:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:21 +0000 (01:59 -0400)
[Why]
during S0i3, set power state is toggled a few times,
and dmub uC will restart with current reset/hw_init.

[How]
Remove reset in set power state, and before doing hw_init,
check if dmub is enabled, and doing FW autoload check only
if dmub is already enabled.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c

index 1e03f6f..2c4a2fe 100644 (file)
@@ -275,7 +275,11 @@ void dmub_dcn20_set_inbox1_wptr(struct dmub_srv *dmub, uint32_t wptr_offset)
 
 bool dmub_dcn20_is_hw_init(struct dmub_srv *dmub)
 {
-       return REG_READ(DMCUB_REGION3_CW2_BASE_ADDRESS) != 0;
+       uint32_t is_hw_init;
+
+       REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_hw_init);
+
+       return is_hw_init != 0;
 }
 
 bool dmub_dcn20_is_supported(struct dmub_srv *dmub)