ソースを参照

drm/amdgpu: remove static integer for uvd pp state

At two gpu core condition, static integer will cause that second gpu
core uvd state setting will be directly skipped due to the first one
setting

Signed-off-by: Yintian Tao <yttao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Yintian Tao 9 年 前
コミット
d6df71e125
1 ファイル変更0 行追加5 行削除
  1. 0 5
      drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c

+ 0 - 5
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c

@@ -791,15 +791,10 @@ static int uvd_v5_0_set_clockgating_state(void *handle,
 {
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
 	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
-	static int curstate = -1;
 
 
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG))
 	if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG))
 		return 0;
 		return 0;
 
 
-	if (curstate == state)
-		return 0;
-
-	curstate = state;
 	if (enable) {
 	if (enable) {
 		/* wait for STATUS to clear */
 		/* wait for STATUS to clear */
 		if (uvd_v5_0_wait_for_idle(handle))
 		if (uvd_v5_0_wait_for_idle(handle))