From: Dillon Varone <[email protected]>

[WHY&HOW]
Even if memory lower power feature policy states that it is disabled,
VPG memory should still be poweerd on if it is currently disabled when
requested.

Reviewed-by: Chris Park <[email protected]>
Acked-by: Wayne Lin <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c 
b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c
index f1deb1c3c363..cfb923d85630 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c
@@ -63,7 +63,12 @@ void vpg31_poweron(struct vpg *vpg)
 {
        struct dcn31_vpg *vpg31 = DCN31_VPG_FROM_VPG(vpg);
 
-       if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false)
+       uint32_t vpg_gsp_mem_pwr_state;
+
+       REG_GET(VPG_MEM_PWR, VPG_GSP_MEM_PWR_STATE, &vpg_gsp_mem_pwr_state);
+
+       if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false &&
+                       vpg_gsp_mem_pwr_state == 0)
                return;
 
        REG_UPDATE_2(VPG_MEM_PWR, VPG_GSP_MEM_LIGHT_SLEEP_DIS, 1, 
VPG_GSP_LIGHT_SLEEP_FORCE, 0);
-- 
2.37.3

Reply via email to