diff options
author | Leo Liu <leo.liu@amd.com> | 2019-11-12 11:57:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-11-19 10:12:50 -0500 |
commit | 474b6d296f237da1b05d5ef8749c3d7ab9f87682 (patch) | |
tree | 63b82be79e737416501dfb3106c901ccacea2084 /drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | |
parent | 0db2ab99c9fbbd29ea54505027ce16a91da9efff (diff) | |
download | linux-474b6d296f237da1b05d5ef8749c3d7ab9f87682.tar.bz2 |
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/jpeg_v2_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c index 3869730b2331..a78292d84854 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c @@ -333,6 +333,9 @@ static int jpeg_v2_0_start(struct amdgpu_device *adev) struct amdgpu_ring *ring = &adev->jpeg.inst->ring_dec; int r; + if (adev->pm.dpm_enabled) + amdgpu_dpm_enable_jpeg(adev, true); + /* disable power gating */ r = jpeg_v2_0_disable_power_gating(adev); if (r) @@ -388,8 +391,13 @@ static int jpeg_v2_0_stop(struct amdgpu_device *adev) /* enable power gating */ r = jpeg_v2_0_enable_power_gating(adev); + if (r) + return r; - return r; + if (adev->pm.dpm_enabled) + amdgpu_dpm_enable_jpeg(adev, false); + + return 0; } /** |