[v1] drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN

Teres Alexis, Alan Previn alan.previn.teres.alexis at intel.com
Thu Jun 8 00:12:07 UTC 2023


On Fri, 2023-06-02 at 11:52 -0700, Alan Previn wrote:
> In the ABI header, GUC_CTB_MSG_MIN_LEN is '1' because
> GUC_CTB_HDR_LEN is 1. This aligns with H2G/G2H CTB specification
> where all command formats are defined in units of dwords so that '1'
> is a dword. Accordingly, GUC_CTB_MSG_MAX_LEN is 256-1 (i.e. 255
> dwords). However, h2g_write was incorrectly assuming that
> GUC_CTB_MSG_MAX_LEN was in bytes. Fix this.
> 
> 
alan:snip

> The patch itself make sense but concerned about the value of
> GUC_CTB_MSG_MAX_LEN. Is the max size of CTB really 256 DWs? That seems
> way to large. Also I think some tools are going to complain with the
> stack being this large too.
> 
> Matt

alan: good point - i will go back and find if we have this value internally spec'd before we continue.


More information about the dri-devel mailing list