Commit 8c95cda3 authored by Vignesh Chander's avatar Vignesh Chander Committed by Alex Deucher

drm/amdgpu/jpeg: skip set pg for sriov

Host handles PG.
Signed-off-by: default avatarVignesh Chander <Vignesh.Chander@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b157df66
...@@ -360,10 +360,8 @@ static int jpeg_v4_0_3_hw_fini(void *handle) ...@@ -360,10 +360,8 @@ static int jpeg_v4_0_3_hw_fini(void *handle)
cancel_delayed_work_sync(&adev->jpeg.idle_work); cancel_delayed_work_sync(&adev->jpeg.idle_work);
if (!amdgpu_sriov_vf(adev)) { if (adev->jpeg.cur_state != AMD_PG_STATE_GATE)
if (adev->jpeg.cur_state != AMD_PG_STATE_GATE) ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
}
return ret; return ret;
} }
...@@ -950,6 +948,11 @@ static int jpeg_v4_0_3_set_powergating_state(void *handle, ...@@ -950,6 +948,11 @@ static int jpeg_v4_0_3_set_powergating_state(void *handle,
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int ret; int ret;
if (amdgpu_sriov_vf(adev)) {
adev->jpeg.cur_state = AMD_PG_STATE_UNGATE;
return 0;
}
if (state == adev->jpeg.cur_state) if (state == adev->jpeg.cur_state)
return 0; return 0;
......
...@@ -35,13 +35,11 @@ ...@@ -35,13 +35,11 @@
#define MMSCH_VF_ENGINE_STATUS__PASS 0x1 #define MMSCH_VF_ENGINE_STATUS__PASS 0x1
#define MMSCH_VF_MAILBOX_RESP__OK 0x1 #define MMSCH_VF_MAILBOX_RESP__OK 0x1
#define MMSCH_VF_MAILBOX_RESP__INCOMPLETE 0x2 #define MMSCH_VF_MAILBOX_RESP__INCOMPLETE 0x2
#define MMSCH_VF_MAILBOX_RESP__FAILED 0x3
#define MMSCH_VF_ENGINE_STATUS__PASS 0x1 #define MMSCH_VF_MAILBOX_RESP__FAILED_SMALL_CTX_SIZE 0x4
#define MMSCH_VF_MAILBOX_RESP__UNKNOWN_CMD 0x5
#define MMSCH_VF_MAILBOX_RESP__OK 0x1
#define MMSCH_VF_MAILBOX_RESP__INCOMPLETE 0x2
#define MMSCH_V4_0_VCN_INSTANCES 0x2 #define MMSCH_V4_0_VCN_INSTANCES 0x2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment