<div dir="ltr"><div>No, you can just check if it fails or not (i.e., the ioctl will return -EINVAL if the query is not supported).<br><br></div>Alex<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 2:33 PM, StDenis, Tom <span dir="ltr"><<a href="mailto:Tom.StDenis@amd.com" target="_blank">Tom.StDenis@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_8418366582461279974divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Shouldn't there be a version bump if you're adding a new command to the ioctl?</p>
<p><br>
</p>
<p>Tom</p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<div>
<hr style="display:inline-block;width:98%">
<div id="m_8418366582461279974x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org" target="_blank">amd-gfx-bounces@lists.<wbr>freedesktop.org</a>> on behalf of Alex Deucher <<a href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>><br>
<b>Sent:</b> Friday, October 7, 2016 14:28<br>
<b>To:</b> <a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a>; Fang, Peter; Zhang, Boyuan<br>
<b>Cc:</b> Deucher, Alexander<br>
<b>Subject:</b> [PATCH 2/6] drm/amdgpu: add info ioctl query for vce clock info</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="m_8418366582461279974PlainText"><div><div class="h5">This is needed to set up the vce clock table in userspace<br>
for proper VCE DPM.<br>
<br>
Signed-off-by: Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>><br>
---<br>
 include/uapi/drm/amdgpu_drm.h | 18 ++++++++++++++++++<br>
 1 file changed, 18 insertions(+)<br>
<br>
diff --git a/include/uapi/drm/amdgpu_drm.<wbr>h b/include/uapi/drm/amdgpu_drm.<wbr>h<br>
index b6a04d4..7cb71f8 100644<br>
--- a/include/uapi/drm/amdgpu_drm.<wbr>h<br>
+++ b/include/uapi/drm/amdgpu_drm.<wbr>h<br>
@@ -491,6 +491,8 @@ struct drm_amdgpu_cs_chunk_data {<br>
 #define AMDGPU_INFO_NUM_EVICTIONS     <wbr>          0x18<br>
 /* Query memory about VRAM and GTT domains */<br>
 #define AMDGPU_INFO_MEMORY            <wbr>          0x19<br>
+/* Query memory about VRAM and GTT domains */<br>
+#define AMDGPU_INFO_VCE_CLOCK_TABLE   <wbr>         0x1A<br>
 <br>
 #define AMDGPU_INFO_MMR_SE_INDEX_<wbr>SHIFT  0<br>
 #define AMDGPU_INFO_MMR_SE_INDEX_MASK <wbr>  0xff<br>
@@ -677,6 +679,22 @@ struct drm_amdgpu_info_hw_ip {<br>
         __u32  _pad;<br>
 };<br>
 <br>
+#define AMDGPU_VCE_CLOCK_TABLE_<wbr>ENTRIES         6<br>
+<br>
+struct drm_amdgpu_info_vce_clock_<wbr>table_entry {<br>
+       /** System clock */<br>
+       __u32 sclk;<br>
+       /** Memory clock */<br>
+       __u32 mclk;<br>
+       /** VCE clock */<br>
+       __u32 eclk;<br>
+       __u32 pad;<br>
+};<br>
+<br>
+struct drm_amdgpu_info_vce_clock_<wbr>table {<br>
+       struct drm_amdgpu_info_vce_clock_<wbr>table_entry entries[AMDGPU_VCE_CLOCK_<wbr>TABLE_ENTRIES];<br>
+};<br>
+<br>
 /*<br>
  * Supported GPU families<br>
  */<br>
-- <br>
2.5.5<br>
<br></div></div>
______________________________<wbr>_________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="m_8418366582461279974LPlnk721057" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/amd-gfx</a>
<div id="m_8418366582461279974LPBorder_GT_14758651863140.18769845284713105" style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table id="m_8418366582461279974LPContainer_14758651863120.5943237317888346" style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)" cellspacing="0">
<tbody>
<tr style="border-spacing:0px" valign="top">
<td id="m_8418366582461279974TextCell_14758651863130.019189628010207516" colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div id="m_8418366582461279974LPRemovePreviewContainer_14758651863130.3705829285253708"></div>
<div id="m_8418366582461279974LPTitle_14758651863130.3572217220295699" style="color:rgb(59,87,119);font-weight:normal;font-size:21px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;line-height:21px">
<a id="m_8418366582461279974LPUrlAnchor_14758651863130.4017346381452327" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" style="text-decoration:none" target="_blank">amd-gfx Info Page - lists.freedesktop.org</a></div>
<div id="m_8418366582461279974LPMetadata_14758651863130.055356739019825074" style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:normal;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://lists.freedesktop.org" target="_blank">lists.freedesktop.org</a></div>
<div id="m_8418366582461279974LPDescription_14758651863140.976017929360546" style="display:block;color:rgb(102,102,102);font-weight:normal;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
To see the collection of prior postings to the list, visit the amd-gfx Archives. Using amd-gfx: To post a message to all the list members, send email ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>

</blockquote></div><br></div></div></div></div>