panvk/csf: fix uninitialized read in utrace_clone_init_builder
Previous code assumed that the caller of utrace_clone_init_builder would
fill some parameters of the builder config, but we were not. Instead,
initialize these from the csif props the same as all the other builder
instances.
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 3096cf2a5d ("panvk/csf: flush and process trace events for all cmdbufs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34270>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "panvk_utrace.h"
|
||||
|
||||
#include "drm-uapi/panthor_drm.h"
|
||||
|
||||
#include "genxml/cs_builder.h"
|
||||
#include "panvk_cmd_buffer.h"
|
||||
#include "panvk_device.h"
|
||||
@@ -148,9 +150,11 @@ void
|
||||
panvk_per_arch(utrace_clone_init_builder)(struct cs_builder *b,
|
||||
struct panvk_pool *pool)
|
||||
{
|
||||
const struct drm_panthor_csif_info *csif_info =
|
||||
panthor_kmod_get_csif_props(pool->dev->kmod.dev);
|
||||
const struct cs_builder_conf builder_conf = {
|
||||
.nr_registers = b->conf.nr_registers,
|
||||
.nr_kernel_registers = b->conf.nr_kernel_registers,
|
||||
.nr_registers = csif_info->cs_reg_count,
|
||||
.nr_kernel_registers = MAX2(csif_info->unpreserved_cs_reg_count, 4),
|
||||
.alloc_buffer = alloc_clone_buffer,
|
||||
.cookie = pool,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user