[Mesa-dev] [PATCH v02 06/37] genxml: Add alias for MOCS.

Kenneth Graunke kenneth at whitecape.org
Mon Apr 24 22:59:07 UTC 2017


On Monday, April 24, 2017 3:19:01 PM PDT Rafael Antognolli wrote:
> Use an alias, so we can set the same value as the #define's.
> 
> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> ---
>  src/intel/genxml/gen8.xml | 1 +
>  src/intel/genxml/gen9.xml | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml
> index 408d241..2908082 100644
> --- a/src/intel/genxml/gen8.xml
> +++ b/src/intel/genxml/gen8.xml
> @@ -2064,6 +2064,7 @@
>      <field name="SO Buffer Enable" start="63" end="63" type="bool"/>
>      <field name="SO Buffer Index" start="61" end="62" type="uint"/>
>      <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/>
> +    <field name="MOCS" start="54" end="60" type="uint"/>
>      <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/>
>      <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/>
>      <field name="Surface Base Address" start="66" end="111" type="address"/>
> diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml
> index 59daa31..09b9464 100644
> --- a/src/intel/genxml/gen9.xml
> +++ b/src/intel/genxml/gen9.xml
> @@ -2246,6 +2246,7 @@
>      <field name="SO Buffer Enable" start="63" end="63" type="bool"/>
>      <field name="SO Buffer Index" start="61" end="62" type="uint"/>
>      <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/>
> +    <field name="MOCS" start="54" end="60" type="uint"/>
>      <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/>
>      <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/>
>      <field name="Surface Base Address" start="66" end="111" type="address"/>
> 

This seems a bit strange...we're only changing this in the stream out
packets, and only on Gen8-9?

I've wondered whether we should just use a uint everywhere.  On Gen9+
it's just an index into the kernel tables, with no hardware-mandated
meaning.  On earlier platforms, it changed for every piece of hardware.

I feel like a macro to construct MOCS values on earlier platforms
would work as well as genxml.  *shrug*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170424/dde2ca97/attachment.sig>


More information about the mesa-dev mailing list