Module: Mesa
Branch: main
Commit: 3c9d1a6cfac717a0aef39f09505a62a0966f7fc9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c9d1a6cfac717a0aef39f09505a62a0966f7fc9

Author: Karmjit Mahil <[email protected]>
Date:   Thu Jul  6 10:26:04 2023 +0100

pvr: Restructure `rogue_kmd_stream.xml`

Now things are structured in sections, like the other xml files.
And elements within a section are sorted alphabetically.

Signed-off-by: Karmjit Mahil <[email protected]>
Reviewed-by: Frank Binns <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24138>

---

 src/imagination/csbgen/rogue_kmd_stream.xml | 56 ++++++++++++++++-------------
 1 file changed, 32 insertions(+), 24 deletions(-)

diff --git a/src/imagination/csbgen/rogue_kmd_stream.xml 
b/src/imagination/csbgen/rogue_kmd_stream.xml
index 4277c6a4c6c..882ac5c90cb 100644
--- a/src/imagination/csbgen/rogue_kmd_stream.xml
+++ b/src/imagination/csbgen/rogue_kmd_stream.xml
@@ -31,32 +31,54 @@ TODO: Once the kernel driver is merged upstream, check to 
see if this comment
 needs updating.
 -->
 
+<!--
+This file is structured as follows:
+  - defines
+  - enums
+  - structs
+
+Elements in each section are ordered alphabetically.
+-->
+
 <!--
 TODO: Currently the sizes for fields are in bits. Those should be changed to
 bytes. Might want to do this in conjunction with csbgen being changed from
 dword to bytes granular.
 -->
-
 <csbgen name="ROGUE" prefix="KMD_STREAM">
 
-  <struct name="HDR" length="2">
-    <field name="length" start="0" end="31" type="uint"/>
-  </struct>
-
   <define name="EXTHDR_DATA_MASK" value="0xFFFFFFF"/>
 
+  <!--
+    Note: this does not depend on
+    \ref pvr_device_features.has_eight_output_registers .
+    It's always 8 catering for the largest size.
+  -->
+  <!--
+    TODO: Instead of defining this, see if we can use something like anvil's
+    "group" where a field is repeated n times. That would allow us to get the
+    total length of the whole group instead of the driver calculating it by
+    multiplying this with the size of the usc reg.
+  -->
+  <define name="USC_CLEAR_REGISTER_COUNT" value="8"/>
+
   <enum name="EXTHDR_TYPE_COMPUTE">
     <value name="0" value="0"/>
   </enum>
 
-  <enum name="EXTHDR_TYPE_GEOM">
+  <enum name="EXTHDR_TYPE_FRAG">
     <value name="0" value="0"/>
   </enum>
 
-  <enum name="EXTHDR_TYPE_FRAG">
+  <enum name="EXTHDR_TYPE_GEOM">
     <value name="0" value="0"/>
   </enum>
 
+  <enum name="PIXEL_PHANTOM_STATE">
+    <value name="DISABLED" value="0x0"/>
+    <value name="ENABLED"  value="0xF"/>
+  </enum>
+
   <struct name="EXTHDR_COMPUTE0" length="1">
     <field name="type" start="29" end="31" type="EXTHDR_TYPE_COMPUTE" 
default="0"/>
     <field name="continuation" start="28" end="28" type="bool"/>
@@ -76,10 +98,9 @@ dword to bytes granular.
     <field name="has_brn49927" start="0" end="0" type="bool"/>
   </struct>
 
-  <enum name="PIXEL_PHANTOM_STATE">
-    <value name="DISABLED" value="0x0"/>
-    <value name="ENABLED"  value="0xF"/>
-  </enum>
+  <struct name="HDR" length="2">
+    <field name="length" start="0" end="31" type="uint"/>
+  </struct>
 
   <!--
     Note: if there's an attempt to disable all phantoms, they will all be set
@@ -94,17 +115,4 @@ dword to bytes granular.
     <field name="idx" start="0" end="7" type="uint"/>
   </struct>
 
-  <!--
-    Note: this does not depend on
-    \ref pvr_device_features.has_eight_output_registers .
-    It's always 8 catering for the largest size.
-  -->
-  <!--
-    TODO: Instead of defining this, see if we can use something like anvil's
-    "group" where a field is repeated n times. That would allow us to get the
-    total length of the whole group instead of the driver calculating it by
-    multiplying this with the size of the usc reg.
-  -->
-  <define name="USC_CLEAR_REGISTER_COUNT" value="8"/>
-
 </csbgen>

Reply via email to