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

drm/amd/display: Check hw_init state when determining if DMCUB is initialized

[Why]
CW2 may already be programmed when coming back from S4. In this case
we want to unconditionally replace whatever DMCUB version is currently
enabled with the latest.

[How]
Check the hw_init flag to know whether or not we've previously executed
the initliazed routine.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nicholas Kazlauskas and committed by
Alex Deucher
e5f0b521 a7da96fb

+3
+3
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c
··· 312 312 if (!dmub->sw_init) 313 313 return DMUB_STATUS_INVALID; 314 314 315 + if (!dmub->hw_init) 316 + return DMUB_STATUS_OK; 317 + 315 318 if (dmub->hw_funcs.is_hw_init) 316 319 *is_hw_init = dmub->hw_funcs.is_hw_init(dmub); 317 320