diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-07-10 13:33:47 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-07-14 13:20:02 -0700 |
commit | e4cb5823ba3e2668ef5c164898e2aa2c0ad73742 (patch) | |
tree | 36b169e92e9418ed76651f2aa60eedb518d83641 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 76650bcf2ae49106a9164406c90feba4c3135763 (diff) |
drm/xe: Count dwords before allocating
The bb allocation in emit_wa_job() is wrong in 2 ways: first it's
allocating enough space for the 3DSTATE or hardcoding 4k depending on
the engine. In the first case it doesn't account for the WAs and in the
former it may not be sufficient. Secondly it's using the size instead of
number of dwords, causing the buffer to be 4x bigger than needed:
xe_bb_new() receives number of dwords as parameter and its declaration
was also not following its implementation.
Lastly, reword the debug message since it's not only about the LRC WAs
anymore as it also include the 3DSTATE for render.
While it's unlikely this is causing any real issue, let's calculate the
needed space and allocate just enough.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://lore.kernel.org/r/20250710-lrc-refactors-v2-2-a5e2ca03f6bd@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions