]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: skip VCN2.5 power gating and clock gating for sriov Arcturus
authorJane Jian <Jane.Jian@amd.com>
Mon, 16 Dec 2019 08:24:13 +0000 (16:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2019 21:33:26 +0000 (16:33 -0500)
v1: skip gating in serveral called functions by power gating and clock gating
v2: from suggestion, skip setting gate in both set function, which is where
it being called.

Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c

index 8a9fad5e15e0f65d95862eef71cdad88c79a8a4c..1379cfadfb32c38cab0d65e242c72db3c64b9386 100644 (file)
@@ -1248,6 +1248,9 @@ static int vcn_v2_5_set_clockgating_state(void *handle,
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        if (enable) {
                if (vcn_v2_5_is_idle(handle))
                        return -EBUSY;
@@ -1265,6 +1268,9 @@ static int vcn_v2_5_set_powergating_state(void *handle,
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        int ret;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        if(state == adev->vcn.cur_state)
                return 0;