Skip to contentSkip to conversation

drm/amdgpu: remove unused power control for vcn

PATCH In review Leo Liu 4 participants 7 messages Jul 26, 2017 – Jul 27, 2017 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Leo Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: remove unused power control for vcn

The power control for vcn has been moved to firmware, kernel'll spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each time when application runs, so let's remove it.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23 +----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h |  1 -
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c   |  4 ++--
 3 files changed, 3 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -22
index 09190fa..4186f45 100644
@@ -207,29 +207,8 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
 		container_of(work, struct amdgpu_device, vcn.idle_work.work);
 	unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
 
-	if (fences == 0) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, false);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 0, 0);
-		}
-	} else {
+	if (fences != 0)
 		schedule_delayed_work(&adev->vcn.idle_work, VCN_IDLE_TIMEOUT);
-	}
-}
-
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
-{
-	struct amdgpu_device *adev = ring->adev;
-	bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
-
-	if (set_clocks) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, true);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-		}
-	}
 }
 
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
index d50ba06..930903d 100644
@@ -65,7 +65,6 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev);
 int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);
 int amdgpu_vcn_suspend(struct amdgpu_device *adev);
 int amdgpu_vcn_resume(struct amdgpu_device *adev);
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring);
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring);
 
 int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -2
index 21e7b88..94814f0 100644
@@ -1122,7 +1122,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = {
 	.insert_start = vcn_v1_0_dec_ring_insert_start,
 	.insert_end = vcn_v1_0_dec_ring_insert_end,
 	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
 	.end_use = amdgpu_vcn_ring_end_use,
 };
 
@@ -1148,7 +1148,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = {
 	.insert_nop = amdgpu_ring_insert_nop,
 	.insert_end = vcn_v1_0_enc_ring_insert_end,
 	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
 	.end_use = amdgpu_vcn_ring_end_use,
 };
 
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): 1501096057-10197-1-git-send-email-leo.liu-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Leo Liu
Sent: Wednesday, July 26, 2017 3:08 PM
To: [email protected]
Cc: Liu, Leo
Subject: [PATCH] drm/amdgpu: remove unused power control for vcn

Quoted 6 lines

The power control for vcn has been moved to firmware, kernel'll spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each
time when application runs, so let's remove it.

Does firmware cover powergating/clockgating as well or just dpm? I think we may still need to handle clock and powergating manually.

Alex

Quoted 88 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23 +----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h |  1 -
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c   |  4 ++--
 3 files changed, 3 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -7
index 09190fa..4186f45 100644
@@ -207,29 +207,8 @@ static void amdgpu_vcn_idle_work_handler(struct
 work_struct *work)
 		container_of(work, struct amdgpu_device,
 vcn.idle_work.work);
 	unsigned fences = amdgpu_fence_count_emitted(&adev-
 >vcn.ring_dec);
 
-	if (fences == 0) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, false);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 0, 0);
-		}
-	} else {
+	if (fences != 0)
 		schedule_delayed_work(&adev->vcn.idle_work,

VCN_IDLE_TIMEOUT);

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
-	}
-}
-
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
-{
-	struct amdgpu_device *adev = ring->adev;
-	bool set_clocks = !cancel_delayed_work_sync(&adev-
Quoted 1 line

vcn.idle_work);

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -8
-
-	if (set_clocks) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, true);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-		}
-	}
 }
 
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
index d50ba06..930903d 100644
@@ -65,7 +65,6 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev);
 int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);
 int amdgpu_vcn_suspend(struct amdgpu_device *adev);
 int amdgpu_vcn_resume(struct amdgpu_device *adev);
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring);
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring);
 
 int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -3
index 21e7b88..94814f0 100644
@@ -1122,7 +1122,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_dec_ring_vm_funcs = {
 	.insert_start = vcn_v1_0_dec_ring_insert_start,
 	.insert_end = vcn_v1_0_dec_ring_insert_end,
 	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
 	.end_use = amdgpu_vcn_ring_end_use,
 };
@@ -1148,7 +1148,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_enc_ring_vm_funcs = {
 	.insert_nop = amdgpu_ring_insert_nop,
 	.insert_end = vcn_v1_0_enc_ring_insert_end,
 	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
 	.end_use = amdgpu_vcn_ring_end_use,
 };
 
--

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): BN6PR12MB1652D771EA8F795335E7372DF7BE0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw

Am 27.07.2017 um 04:44 schrieb Deucher, Alexander:

Quoted 8 lines
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Leo Liu
Sent: Wednesday, July 26, 2017 3:08 PM
To: [email protected]
Cc: Liu, Leo
Subject: [PATCH] drm/amdgpu: remove unused power control for vcn

Quoted 7 lines
Quoted 6 lines

The power control for vcn has been moved to firmware, kernel'll spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each
time when application runs, so let's remove it.

Does firmware cover powergating/clockgating as well or just dpm? I think we may still need to handle clock and powergating manually.

Additional to that you could remove even more when that isn't used any more. E.g. the whole idle_work and end_use() function can now go away as well.

Christian.

Quoted 90 lines

Alex

Quoted 87 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23 +----------------------
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h |  1 -
  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c   |  4 ++--
  3 files changed, 3 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -14
index 09190fa..4186f45 100644
@@ -207,29 +207,8 @@ static void amdgpu_vcn_idle_work_handler(struct
 work_struct *work)
  		container_of(work, struct amdgpu_device,
 vcn.idle_work.work);
  	unsigned fences = amdgpu_fence_count_emitted(&adev-
 > vcn.ring_dec);
-	if (fences == 0) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, false);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 0, 0);
-		}
-	} else {
+	if (fences != 0)
  		schedule_delayed_work(&adev->vcn.idle_work,
 VCN_IDLE_TIMEOUT);
-	}
-}
-
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
-{
-	struct amdgpu_device *adev = ring->adev;
-	bool set_clocks = !cancel_delayed_work_sync(&adev-
Quoted 1 line

vcn.idle_work);

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -8
-
-	if (set_clocks) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, true);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-		}
-	}
  }
 
  void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
index d50ba06..930903d 100644
@@ -65,7 +65,6 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev);
  int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);
  int amdgpu_vcn_suspend(struct amdgpu_device *adev);
  int amdgpu_vcn_resume(struct amdgpu_device *adev);
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring);
  void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring);
 
  int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -3
index 21e7b88..94814f0 100644
@@ -1122,7 +1122,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_dec_ring_vm_funcs = {
  	.insert_start = vcn_v1_0_dec_ring_insert_start,
  	.insert_end = vcn_v1_0_dec_ring_insert_end,
  	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
  	.end_use = amdgpu_vcn_ring_end_use,
  };
@@ -1148,7 +1148,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_enc_ring_vm_funcs = {
  	.insert_nop = amdgpu_ring_insert_nop,
  	.insert_end = vcn_v1_0_enc_ring_insert_end,
  	.pad_ib = amdgpu_ring_generic_pad_ib,
-	.begin_use = amdgpu_vcn_ring_begin_use,
+	.begin_use = NULL,
  	.end_use = amdgpu_vcn_ring_end_use,
  };
 
--

2.7.4

Quoted 8 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

author
#5 lore raw
In reply to a message not in the archive
Quoted 8 lines · Alexander
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Leo Liu
Sent: Wednesday, July 26, 2017 3:08 PM
To: [email protected]
Cc: Liu, Leo
Subject: [PATCH] drm/amdgpu: remove unused power control for vcn

Quoted 8 lines
Quoted 6 lines

The power control for vcn has been moved to firmware, kernel'll spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each
time when application runs, so let's remove it.

Does firmware cover powergating/clockgating as well or just dpm?

No. dpm only.

Quoted 1 line

I think we may still need to handle clock and powergating manually.

I will keep the function and comment it out till pg/cg, since it's annoying to spin that error message.

The new patch will follow shortly.

Leo

Quoted 88 lines

Alex

Quoted 85 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23 +----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h |  1 -
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c   |  4 ++--
 3 files changed, 3 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -7
index 09190fa..4186f45 100644
@@ -207,29 +207,8 @@ static void amdgpu_vcn_idle_work_handler(struct
 work_struct *work)
               container_of(work, struct amdgpu_device,
 vcn.idle_work.work);
       unsigned fences = amdgpu_fence_count_emitted(&adev-
 >vcn.ring_dec);
 
-     if (fences == 0) {
-             if (adev->pm.dpm_enabled) {
-                     amdgpu_dpm_enable_uvd(adev, false);
-             } else {
-                     amdgpu_asic_set_uvd_clocks(adev, 0, 0);
-             }
-     } else {
+     if (fences != 0)
 schedule_delayed_work(&adev->vcn.idle_work,

VCN_IDLE_TIMEOUT);

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
-     }
-}
-
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
-{
-     struct amdgpu_device *adev = ring->adev;
-     bool set_clocks = !cancel_delayed_work_sync(&adev-
Quoted 1 line

vcn.idle_work);

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -8
-
-     if (set_clocks) {
-             if (adev->pm.dpm_enabled) {
-                     amdgpu_dpm_enable_uvd(adev, true);
-             } else {
-                     amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-             }
-     }
 }
 
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
index d50ba06..930903d 100644
@@ -65,7 +65,6 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev);
 int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);
 int amdgpu_vcn_suspend(struct amdgpu_device *adev);
 int amdgpu_vcn_resume(struct amdgpu_device *adev);
-void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring);
 void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring);
 
 int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -2
index 21e7b88..94814f0 100644
@@ -1122,7 +1122,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_dec_ring_vm_funcs = {
       .insert_start = vcn_v1_0_dec_ring_insert_start,
       .insert_end = vcn_v1_0_dec_ring_insert_end,
       .pad_ib = amdgpu_ring_generic_pad_ib,
-     .begin_use = amdgpu_vcn_ring_begin_use,
+     .begin_use = NULL,
       .end_use = amdgpu_vcn_ring_end_use,
 };
@@ -1148,7 +1148,7 @@ static const struct amdgpu_ring_funcs
 vcn_v1_0_enc_ring_vm_funcs = {
       .insert_nop = amdgpu_ring_insert_nop,
       .insert_end = vcn_v1_0_enc_ring_insert_end,
       .pad_ib = amdgpu_ring_generic_pad_ib,
-     .begin_use = amdgpu_vcn_ring_begin_use,
+     .begin_use = NULL,
       .end_use = amdgpu_vcn_ring_end_use,
 };
Quoted 7 lines
Quoted 7 lines

--
2.7.4

_______________________________________________
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

author
#6 lore raw

PATCH 1/1 drm/amdgpu: disable vcn power control for now

In reply to a message not in the archive

The dpm control for vcn has been moved to firmware, kernel always spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each time when application runs, disable it for now till pg/cg. Also remove clock manual setting when dpm disabled, which was inherited from uvd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -8
index 09190fa..d58ca82 100644
@@ -209,9 +209,9 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
 
 	if (fences == 0) {
 		if (adev->pm.dpm_enabled) {
+			/* might be used when with pg/cg
 			amdgpu_dpm_enable_uvd(adev, false);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 0, 0);
+			*/
 		}
 	} else {
 		schedule_delayed_work(&adev->vcn.idle_work, VCN_IDLE_TIMEOUT);
@@ -223,12 +223,10 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
 	struct amdgpu_device *adev = ring->adev;
 	bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
 
-	if (set_clocks) {
-		if (adev->pm.dpm_enabled) {
-			amdgpu_dpm_enable_uvd(adev, true);
-		} else {
-			amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-		}
+	if (set_clocks && adev->pm.dpm_enabled) {
+		/* might be used when with pg/cg
+		amdgpu_dpm_enable_uvd(adev, true);
+		*/
 	}
 }
 
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): 1501172259-7240-1-git-send-email-leo.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#8 lore raw

Re: [PATCH] drm/amdgpu: disable vcn power control for now

Quoted 6 lines · Leo Liu

The dpm control for vcn has been moved to firmware, kernel always spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each time when application runs, disable it for now till pg/cg. Also remove clock manual setting when dpm disabled, which was inherited from uvd.

Quoted 40 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -9
index 09190fa..d58ca82 100644
@@ -209,9 +209,9 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
 
        if (fences == 0) {
                if (adev->pm.dpm_enabled) {
+                       /* might be used when with pg/cg
                        amdgpu_dpm_enable_uvd(adev, false);
-               } else {
-                       amdgpu_asic_set_uvd_clocks(adev, 0, 0);
+                       */
                }
        } else {
                schedule_delayed_work(&adev->vcn.idle_work, VCN_IDLE_TIMEOUT);
@@ -223,12 +223,10 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
        struct amdgpu_device *adev = ring->adev;
        bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
 
-       if (set_clocks) {
-               if (adev->pm.dpm_enabled) {
-                       amdgpu_dpm_enable_uvd(adev, true);
-               } else {
-                       amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-               }
+       if (set_clocks && adev->pm.dpm_enabled) {
+               /* might be used when with pg/cg
+               amdgpu_dpm_enable_uvd(adev, true);
+               */
        }
 }
 
--

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_N3CDroYprbXn8PNnwiQPZ3KvF6kgb_bwW1vAQBiVwBWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by
#10 lore raw

Re: [PATCH] drm/amdgpu: disable vcn power control for now

Am 27.07.2017 um 19:04 schrieb Alex Deucher:

Quoted 8 lines · Leo Liu
Quoted 6 lines

The dpm control for vcn has been moved to firmware, kernel always spins "amdgpu: [powerplay] pp_dpm_powergate_uvd was not implemented", each time when application runs, disable it for now till pg/cg. Also remove clock manual setting when dpm disabled, which was inherited from uvd.

Quoted 41 lines
Quoted 41 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 ++++++--------
  1 file changed, 6 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -9
index 09190fa..d58ca82 100644
@@ -209,9 +209,9 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
 
         if (fences == 0) {
                 if (adev->pm.dpm_enabled) {
+                       /* might be used when with pg/cg
                         amdgpu_dpm_enable_uvd(adev, false);
-               } else {
-                       amdgpu_asic_set_uvd_clocks(adev, 0, 0);
+                       */
                 }
         } else {
                 schedule_delayed_work(&adev->vcn.idle_work, VCN_IDLE_TIMEOUT);
@@ -223,12 +223,10 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
         struct amdgpu_device *adev = ring->adev;
         bool set_clocks = !cancel_delayed_work_sync(&adev->vcn.idle_work);
 
-       if (set_clocks) {
-               if (adev->pm.dpm_enabled) {
-                       amdgpu_dpm_enable_uvd(adev, true);
-               } else {
-                       amdgpu_asic_set_uvd_clocks(adev, 53300, 40000);
-               }
+       if (set_clocks && adev->pm.dpm_enabled) {
+               /* might be used when with pg/cg
+               amdgpu_dpm_enable_uvd(adev, true);
+               */
         }
  }
 
--

2.7.4

Quoted 8 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