File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
drivers/gpu/drm/amd/display/dmub/src Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -66,24 +66,20 @@ void dmub_dcn401_reset(struct dmub_srv *dmub)
66
66
const uint32_t timeout_us = 1 * 1000 * 1000 ; //1s
67
67
const uint32_t poll_delay_us = 1 ; //1us
68
68
uint32_t i = 0 ;
69
- uint32_t in_reset , scratch , pwait_mode ;
69
+ uint32_t enabled , in_reset , scratch , pwait_mode ;
70
70
71
- REG_GET (DMCUB_CNTL2 , DMCUB_SOFT_RESET , & in_reset );
71
+ REG_GET (DMCUB_CNTL ,
72
+ DMCUB_ENABLE , & enabled );
73
+ REG_GET (DMCUB_CNTL2 ,
74
+ DMCUB_SOFT_RESET , & in_reset );
72
75
73
- if (in_reset == 0 ) {
76
+ if (enabled && in_reset == 0 ) {
74
77
cmd .bits .status = 1 ;
75
78
cmd .bits .command_code = DMUB_GPINT__STOP_FW ;
76
79
cmd .bits .param = 0 ;
77
80
78
81
dmub -> hw_funcs .set_gpint (dmub , cmd );
79
82
80
- for (i = 0 ; i < timeout_us ; i ++ ) {
81
- if (dmub -> hw_funcs .is_gpint_acked (dmub , cmd ))
82
- break ;
83
-
84
- udelay (poll_delay_us );
85
- }
86
-
87
83
for (; i < timeout_us ; i ++ ) {
88
84
scratch = dmub -> hw_funcs .get_gpint_response (dmub );
89
85
if (scratch == DMUB_GPINT__STOP_FW_RESPONSE )
You can’t perform that action at this time.
0 commit comments