drm/amdgpu/vcn: drop gfxoff control for VCN2+
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/vcn: drop gfxoff control for VCN2+
Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -2
@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true);amdgpu_device_ip_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCN ,AMD_PG_STATE_GATE ); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,
@@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)atomic_inc (&adev->vcn.total_submission_cnt);if (!cancel_delayed_work_sync (&adev->vcn.idle_work)) { -amdgpu_gfx_off_ctrl (adev, false); r =amdgpu_dpm_switch_power_profile (adev,PP_SMC_POWER_PROFILE_VIDEO , true);if (r)
Signature · 6 lines
2.31.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi,
doesn't this patch apply the change to VCN1.0 also, which has that bug you mentioned?
Regards
//Ernst
Den mån 7 juni 2021 kl 22:29 skrev Alex Deucher <[email protected]>:
Quoted 46 lines
Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0
-1@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true); amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN,
AMD_PG_STATE_GATE);
r = amdgpu_dpm_switch_power_profile(adev,PP_SMC_POWER_PROFILE_VIDEO,drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0
-1@@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)atomic_inc (&adev->vcn.total_submission_cnt);if (!cancel_delayed_work_sync (&adev->vcn.idle_work)) { -amdgpu_gfx_off_ctrl (adev, false); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,true); if (r)
Quoted 8 lines
--
2.31.1_______________________________________________
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
Quoted 5 lines · Ernst Sjöstrand
Hi,
doesn't this patch apply the change to VCN1.0 also, which has that bug you mentioned?
Nope. VCN1.0 uses vcn_v1_0_idle_work_handler() and vcn_v1_0_ring_begin_use() as they have other special handling in addition to this.
Alex
Quoted 48 lines
Regards
//ErnstDen mån 7 juni 2021 kl 22:29 skrev Alex Deucher <[email protected]>:
Quoted 44 lines
Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0
-3@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true);amdgpu_device_ip_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCN ,AMD_PG_STATE_GATE ); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,@@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)atomic_inc (&adev->vcn.total_submission_cnt);if (!cancel_delayed_work_sync (&adev->vcn.idle_work)) { -amdgpu_gfx_off_ctrl (adev, false); r =amdgpu_dpm_switch_power_profile (adev,PP_SMC_POWER_PROFILE_VIDEO , true);if (r) --2.31.1
Quoted 9 lines
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Patch is
Thanks,
Boyuan
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: June 7, 2021 4:29 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/vcn: drop gfxoff control for VCN2+
Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true);amdgpu_device_ip_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCN ,AMD_PG_STATE_GATE ); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO, @@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
atomic_inc(&adev->vcn.total_submission_cnt);
if (!cancel_delayed_work_sync(&adev->vcn.idle_work)) {
- amdgpu_gfx_off_ctrl(adev, false);
r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO,
true);
if (r)--
2.31.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cboyuan.zhang%40amd.com%7Ca1496b99775a485b297d08d929f2e950%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637586945547703815%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=35UfXI3gTYEWcWKn4fFVhac8rHKyZlk6ASIZqjKINJQ%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Acked-byAm 07.06.21 um 23:32 schrieb Zhang, Boyuan:
Quoted 46 lines
[AMD Official Use Only]
Patch is
Reviewed-by Boyuan Zhang <[email protected]>Thanks,
Boyuan-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: June 7, 2021 4:29 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/vcn: drop gfxoff control for VCN2+Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0
-1@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true);amdgpu_device_ip_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCN ,AMD_PG_STATE_GATE ); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO, @@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)atomic_inc(&adev->vcn.total_submission_cnt); if (!cancel_delayed_work_sync(&adev->vcn.idle_work)) { - amdgpu_gfx_off_ctrl(adev, false); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO, true); if (r)--
2.31.1
Quoted 8 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cboyuan.zhang%40amd.com%7Ca1496b99775a485b297d08d929f2e950%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637586945547703815%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=35UfXI3gTYEWcWKn4fFVhac8rHKyZlk6ASIZqjKINJQ%3D&reserved=0
_______________________________________________
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
[AMD Official Use Only]
Thanks & Best Regards!
James Zhu
________________________________
From: amd-gfx <[email protected]> on behalf of Christian König <[email protected]>
Sent: Tuesday, June 8, 2021 3:23 AM
To: Zhang, Boyuan <[email protected]>; Deucher, Alexander <[email protected]>; [email protected] <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/vcn: drop gfxoff control for VCN2+
Am 07.06.21 um 23:32 schrieb Zhang, Boyuan:
Quoted 46 lines
[AMD Official Use Only]
Patch is
Reviewed-by Boyuan Zhang <[email protected]>Thanks,
Boyuan-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: June 7, 2021 4:29 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/vcn: drop gfxoff control for VCN2+Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling.
VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0
-1@@ -393,7 +393,6 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work) }if (!fences && !atomic_read (&adev->vcn.total_submission_cnt)) { -amdgpu_gfx_off_ctrl (adev, true);amdgpu_device_ip_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCN ,AMD_PG_STATE_GATE ); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO, @@ -413,7 +412,6 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)atomic_inc(&adev->vcn.total_submission_cnt); if (!cancel_delayed_work_sync(&adev->vcn.idle_work)) { - amdgpu_gfx_off_ctrl(adev, false); r = amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_VIDEO, true); if (r)--
2.31.1
Quoted 8 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cjames.zhu%40amd.com%7Ccf628d25d7704545c4a108d92a4e428c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637587337878810926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hN8cuKAmvSK8b2%2B3uhT%2Fb6I6QnKlhIhZkjO6XeD6%2Bgg%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cjames.zhu%40amd.com%7Ccf628d25d7704545c4a108d92a4e428c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637587337878810926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hN8cuKAmvSK8b2%2B3uhT%2Fb6I6QnKlhIhZkjO6XeD6%2Bgg%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cjames.zhu%40amd.com%7Ccf628d25d7704545c4a108d92a4e428c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637587337878810926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hN8cuKAmvSK8b2%2B3uhT%2Fb6I6QnKlhIhZkjO6XeD6%2Bgg%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx