summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2019-11-12 11:57:36 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-11-19 10:12:50 -0500
commit474b6d296f237da1b05d5ef8749c3d7ab9f87682 (patch)
tree63b82be79e737416501dfb3106c901ccacea2084 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parent0db2ab99c9fbbd29ea54505027ce16a91da9efff (diff)
drm/amdgpu: enable JPEG2.0 dpm
By using its own enabling function Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index f205f56e3358..0c7324bc31a7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -2718,6 +2718,18 @@ void amdgpu_pm_print_power_states(struct amdgpu_device *adev)
}
+void amdgpu_dpm_enable_jpeg(struct amdgpu_device *adev, bool enable)
+{
+ int ret = 0;
+
+ if (is_support_sw_smu(adev)) {
+ ret = smu_dpm_set_power_gate(&adev->smu, AMD_IP_BLOCK_TYPE_JPEG, enable);
+ if (ret)
+ DRM_ERROR("[SW SMU]: dpm enable jpeg failed, state = %s, ret = %d. \n",
+ enable ? "true" : "false", ret);
+ }
+}
+
int amdgpu_pm_virt_sysfs_init(struct amdgpu_device *adev)
{
int ret = 0;