All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: set bypass mode when uvd is idle.
@ 2016-11-03  8:14 Rex Zhu
       [not found] ` <1478160844-19257-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Rex Zhu @ 2016-11-03  8:14 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu

Change-Id: If44f8e91d14f5ec7d4067691684866ef8d77724a
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index 95303e2..0a6a0e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -745,7 +745,8 @@ static int uvd_v5_0_set_clockgating_state(void *handle,
 	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
 	static int curstate = -1;
 
-	uvd_v5_0_set_bypass_mode(adev, enable);
+	if (!(adev->pg_flags & AMD_PG_SUPPORT_UVD))
+		uvd_v5_0_set_bypass_mode(adev, !enable);
 
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG))
 		return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index a339b5c..b64829fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -955,7 +955,8 @@ static int uvd_v6_0_set_clockgating_state(void *handle,
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
 
-	uvd_v6_0_set_bypass_mode(adev, enable);
+	if (!(adev->pg_flags & AMD_PG_SUPPORT_UVD))
+		uvd_v6_0_set_bypass_mode(adev, !enable);
 
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG))
 		return 0;
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-07 22:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-03  8:14 [PATCH] drm/amdgpu: set bypass mode when uvd is idle Rex Zhu
     [not found] ` <1478160844-19257-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2016-11-03  8:33   ` Christian König
2016-11-03 14:20   ` Deucher, Alexander
     [not found]     ` <MWHPR12MB1694C107EE49E6ED48556689F7A30-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-11-04  3:18       ` Zhu, Rex
     [not found]         ` <CY4PR12MB1687482B47589EC01F8755E4FBA20-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-11-04 13:42           ` Deucher, Alexander
     [not found]             ` <MWHPR12MB1694811842A3A840321A56F2F7A20-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-11-07  9:36               ` Zhu, Rex
     [not found]                 ` <DM5PR12MB16898D3A7FAC908E2503E506FBA70-2J9CzHegvk+uLOQbDLhC/wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-11-07 16:40                   ` Deucher, Alexander
2016-11-06 20:30           ` Andy Furniss
     [not found]             ` <581F9303.80403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-07 15:51               ` Deucher, Alexander
     [not found]                 ` <MWHPR12MB16940014C3AFE7AEA9B2924AF7A70-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-11-07 22:29                   ` Andy Furniss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.