winsys/amdgpu: remove initial buffer list allocation
It's really not necessary. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
cc53dfda9f
commit
3cdeb2a177
|
@ -575,26 +575,6 @@ static bool amdgpu_init_cs_context(struct amdgpu_cs_context *cs,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cs->max_num_buffers = 512;
|
|
||||||
cs->buffers = (struct amdgpu_cs_buffer*)
|
|
||||||
CALLOC(1, cs->max_num_buffers * sizeof(struct amdgpu_cs_buffer));
|
|
||||||
if (!cs->buffers) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cs->handles = CALLOC(1, cs->max_num_buffers * sizeof(amdgpu_bo_handle));
|
|
||||||
if (!cs->handles) {
|
|
||||||
FREE(cs->buffers);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cs->flags = CALLOC(1, cs->max_num_buffers);
|
|
||||||
if (!cs->flags) {
|
|
||||||
FREE(cs->handles);
|
|
||||||
FREE(cs->buffers);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(cs->buffer_indices_hashlist); i++) {
|
for (i = 0; i < ARRAY_SIZE(cs->buffer_indices_hashlist); i++) {
|
||||||
cs->buffer_indices_hashlist[i] = -1;
|
cs->buffer_indices_hashlist[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue