drm/amd/display: Redefine DMCU_SCRATCH to identify DMCU state
authorMartin Tsai <martin.tsai@amd.com>
Thu, 13 Dec 2018 04:25:19 +0000 (12:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:39:22 +0000 (15:39 -0500)
commitffb6c1c6c5a12a623205c0d984851ed10dabb75f
tree7c0c493237f93e7e0536bd7839263251df0ea891
parent070fe7246f0666d8da2b06e4e829adaf26c75a0f
drm/amd/display: Redefine DMCU_SCRATCH to identify DMCU state

[why]
To resume system before entering S0i3 completely will cause PSP not
reload DMCU FW since there is not HW power state change.
In this case, driver cannot get correct DMCU version from IRAM
since driver override it and DMCU didn't reload to update it.
It makes driver return false in dcn10_dmcu_init().

[how]
1.To redefine DMCU_SCRATCH to identify different DMCU state.
2.To reserve IRAM 0xF0~0xFF write by DMCU only.
3.To remove dcn10_get_dmcu_state

Signed-off-by: Martin Tsai <martin.tsai@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
drivers/gpu/drm/amd/display/modules/power/power_helpers.c