radv: initialize the trace BO to 0
To avoid random initial values. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -32,12 +32,15 @@
|
|||||||
#include "radv_debug.h"
|
#include "radv_debug.h"
|
||||||
#include "radv_shader.h"
|
#include "radv_shader.h"
|
||||||
|
|
||||||
|
#define TRACE_BO_SIZE 4096
|
||||||
|
|
||||||
bool
|
bool
|
||||||
radv_init_trace(struct radv_device *device)
|
radv_init_trace(struct radv_device *device)
|
||||||
{
|
{
|
||||||
struct radeon_winsys *ws = device->ws;
|
struct radeon_winsys *ws = device->ws;
|
||||||
|
|
||||||
device->trace_bo = ws->buffer_create(ws, 4096, 8, RADEON_DOMAIN_VRAM,
|
device->trace_bo = ws->buffer_create(ws, TRACE_BO_SIZE, 8,
|
||||||
|
RADEON_DOMAIN_VRAM,
|
||||||
RADEON_FLAG_CPU_ACCESS);
|
RADEON_FLAG_CPU_ACCESS);
|
||||||
if (!device->trace_bo)
|
if (!device->trace_bo)
|
||||||
return false;
|
return false;
|
||||||
@@ -46,6 +49,8 @@ radv_init_trace(struct radv_device *device)
|
|||||||
if (!device->trace_id_ptr)
|
if (!device->trace_id_ptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
memset(device->trace_id_ptr, 0, TRACE_BO_SIZE);
|
||||||
|
|
||||||
ac_vm_fault_occured(device->physical_device->rad_info.chip_class,
|
ac_vm_fault_occured(device->physical_device->rad_info.chip_class,
|
||||||
&device->dmesg_timestamp, NULL);
|
&device->dmesg_timestamp, NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user