Am 03.11.2016 um 09:14 schrieb Rex Zhu:
Change-Id: If44f8e91d14f5ec7d4067691684866ef8d77724a
Signed-off-by: Rex Zhu <rex....@amd.com>
Reviewed-by: Christian König <christian.koe...@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;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx