Returns the vce clock table for the user mode driver.
The user mode driver can fill this data into vce clock
data packet for optimal VCE DPM.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 1ecfe9a..07493b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -524,6 +524,14 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void 
*data, struct drm_file
                return copy_to_user(out, &dev_info,
                                    min((size_t)size, sizeof(dev_info))) ? 
-EFAULT : 0;
        }
+       case AMDGPU_INFO_VCE_CLOCK_TABLE: {
+               struct drm_amdgpu_info_vce_clock_table vce_clk_table = {};
+
+               vce_clk_table = amdgpu_dpm_get_vce_clock_table(adev);
+
+               return copy_to_user(out, &vce_clk_table,
+                                   min((size_t)size, sizeof(vce_clk_table))) ? 
-EFAULT : 0;
+       }
        default:
                DRM_DEBUG_KMS("Invalid request %d\n", info->query);
                return -EINVAL;
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to