Skip to contentSkip to conversation

Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"

PATCH In review S, Shirish 4 participants 6 messages Oct 25, 2018 – Oct 26, 2018 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

S, Shirish

author
#0 lore raw

PATCH 1/1 Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

This msg should ideally be sent only when the UVD is about to decode a 4k video.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c +1 -4
index fef111d..53cf787 100644
@@ -1228,17 +1228,14 @@ static int smu8_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
 
 static int smu8_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)
 {
-	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, true, true);
+	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating))
 		return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_UVDPowerOFF);
-	}
 	return 0;
 }
 
 static int smu8_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)
 {
 	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, false, true);
 		return smum_send_msg_to_smc_with_parameter(
 			hwmgr,
 			PPSMC_MSG_UVDPowerON,
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1540484844-31056-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Patch is Acked-by: Rex Zhu <[email protected]>

Regards
Rex

Quoted 52 lines

-----Original Message-----
From: S, Shirish
Sent: Friday, October 26, 2018 12:28 AM
To: Zhu, Rex <[email protected]>; Agrawal, Akshu <[email protected]>; Deucher, Alexander <[email protected]>
Cc: [email protected]; S, Shirish <[email protected]>
Subject: [PATCH] Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_Disabl eLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008).
This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

This msg should ideally be sent only when the UVD is about to decode a 4k video.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c +1 -5
index fef111d..53cf787 100644
@@ -1228,17 +1228,14 @@ static int smu8_dpm_force_dpm_level(struct
 pp_hwmgr *hwmgr,
 
 static int smu8_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)  {
-	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, true, true);
+	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating))
 		return smum_send_msg_to_smc(hwmgr,
 PPSMC_MSG_UVDPowerOFF);
-	}
 	return 0;
 }
 
 static int smu8_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)  {
 	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, false, true);
 		return smum_send_msg_to_smc_with_parameter(
 			hwmgr,
 			PPSMC_MSG_UVDPowerON,
--
Quoted 1 line

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · Shirish

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

Does this patch that is being reverted actually break something or is it ok to leave as a workaround? It supposedly fixed display issues at 4k with video. Reverting it will bring that back won't it?

Alex

Quoted 35 lines

This msg should ideally be sent only when the UVD is about to decode a 4k video.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c +1 -5
index fef111d..53cf787 100644
@@ -1228,17 +1228,14 @@ static int smu8_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
 
 static int smu8_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)
 {
-       if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-               smu8_nbdpm_pstate_enable_disable(hwmgr, true, true);
+       if (PP_CAP(PHM_PlatformCaps_UVDPowerGating))
                return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_UVDPowerOFF);
-       }
        return 0;
 }
 
 static int smu8_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)
 {
        if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-               smu8_nbdpm_pstate_enable_disable(hwmgr, false, true);
                return smum_send_msg_to_smc_with_parameter(
                        hwmgr,
                        PPSMC_MSG_UVDPowerON,
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_PHg9re4FrfptZjqp60hDreEmjX0xd=tgVB1AHJmSaqvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#5 lore raw
Quoted 11 lines · Alex Deucher
Quoted 9 lines · Shirish

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

Quoted 6 lines

Does this patch that is being reverted actually break something or is it ok to leave as a workaround? It supposedly fixed display issues at 4k with video. Reverting it will bring that back won't it?

Alex

Yes Alex, it will break 4k video as there will be underrun. But we are working on patches that will Disable memory NBPstate only for 4k videos. We can have this patch in and will be posting couple of patches to fix 4k videos display issues.

Thanks,
Akshu
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 279a5ecb-4c54-916e-d3a4-0fa2d0fc6418-5C7GfCeVMHo@public.gmane.org

#7 lore raw
Quoted 19 lines · Akshu
Quoted 15 lines · Alex Deucher
Quoted 9 lines · Shirish

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

Does this patch that is being reverted actually break something or is it ok to leave as a workaround? It supposedly fixed display issues at 4k with video. Reverting it will bring that back won't it?

Quoted 6 lines
Quoted 2 lines

Alex

Yes Alex, it will break 4k video as there will be underrun. But we are working on patches that will Disable memory NBPstate only for 4k videos. We can have this patch in and will be posting couple of patches to fix 4k videos display issues.

Can we land them all together? Otherwise, we'll have a regressed state until the later fixes land.

Alex
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_P9KON_cyuAhre9XLmCnw5gfUdT5Y9oo=jdreybCrSMRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#9 lore raw
Quoted 27 lines · Alex Deucher
Quoted 19 lines · Akshu
Quoted 15 lines · Alex Deucher
Quoted 9 lines · Shirish

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is dependent on UVD to be powered ON, since it accesses UVD registers.

Does this patch that is being reverted actually break something or is it ok to leave as a workaround? It supposedly fixed display issues at 4k with video. Reverting it will bring that back won't it?

Quoted 6 lines
Quoted 2 lines

Alex

Yes Alex, it will break 4k video as there will be underrun. But we are working on patches that will Disable memory NBPstate only for 4k videos. We can have this patch in and will be posting couple of patches to fix 4k videos display issues.

Quoted 5 lines

Can we land them all together? Otherwise, we'll have a regressed state until the later fixes land.

Alex

Agreed, will push them as a series.

Thanks,
Akshu
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx