drm/amd/display: Clear GPINT1 before taking DMCUB out of reset
authorSamson Tam <Samson.Tam@amd.com>
Wed, 23 Feb 2022 15:23:25 +0000 (10:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Apr 2023 19:43:08 +0000 (15:43 -0400)
[Why]
Workaround for DMCUB front door load

[How]
Clear GPINT after reset so its consistent

Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c

index a76da0131addd3cee7d320e47a508761eeb8d8e7..568a2702d5f75054975d0af0be1802fb2e3dc0f7 100644 (file)
@@ -116,10 +116,6 @@ void dmub_dcn32_reset(struct dmub_srv *dmub)
                                break;
                }
 
-               /* Clear the GPINT command manually so we don't reset again. */
-               cmd.all = 0;
-               dmub->hw_funcs.set_gpint(dmub, cmd);
-
                /* Force reset in case we timed out, DMCUB is likely hung. */
        }
 
@@ -131,6 +127,10 @@ void dmub_dcn32_reset(struct dmub_srv *dmub)
        REG_WRITE(DMCUB_OUTBOX1_RPTR, 0);
        REG_WRITE(DMCUB_OUTBOX1_WPTR, 0);
        REG_WRITE(DMCUB_SCRATCH0, 0);
+
+       /* Clear the GPINT command manually so we don't reset again. */
+       cmd.all = 0;
+       dmub->hw_funcs.set_gpint(dmub, cmd);
 }
 
 void dmub_dcn32_reset_release(struct dmub_srv *dmub)