drm/amd/display: Add MPC memory shutdown support for DCN3
authorJacky Liao <ziyu.liao@amd.com>
Tue, 13 Oct 2020 22:43:34 +0000 (18:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Nov 2020 20:29:47 +0000 (15:29 -0500)
commit3e5b4cdf2668cb90bea1c8076e5a430e5ac451b9
tree7842991eb66c5ed10dd0267cfc4f3da530841b47
parent585e7cedf304ce76410c922e632bef04fd316ead
drm/amd/display: Add MPC memory shutdown support for DCN3

[Why]
The MPC memory blocks in DCN3 should be powered down completely when
they are not in use. This will reduce power consumption.

[How]
This commits changes behaviour for dcn3 and does the following:
1. Write to MPC_RMU<X>_LOW_PWR_MODE and MPCC_OGAM_MEM_LOW_PWR_MODE to
   automatically shut down memory when not in use
2. mpc3_power_on_shaper_3dlut and mpc3_power_on_ogam_lut are called
   to disable force power on when configuration finishes
3. Added a debug option to allow this behaviour to be turned off

Signed-off-by: Jacky Liao <ziyu.liao@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.h