Hi Dave,

On 18 July 2017 at 04:52, Dave Airlie <airl...@gmail.com> wrote:

> +int amdgpu_cs_submit_raw(amdgpu_device_handle dev,
> +                        amdgpu_context_handle context,
> +                        amdgpu_bo_list_handle bo_list_handle,
> +                        int num_chunks,
> +                        struct drm_amdgpu_cs_chunk *chunks,
> +                        uint64_t *seq_no)
> +{
> +       union drm_amdgpu_cs cs = {0};
> +       uint64_t *chunk_array;
> +       int i, r;
> +       if (num_chunks == 0)
> +               return -EINVAL;
> +
> +       chunk_array = alloca(sizeof(uint64_t) * num_chunks);
Out of curiosity:
Does malloc/free produce noticeable overhead that lead you you alloca?

num_chunks is signed - should we bail on negative values, can we make
it unsigned?

Thanks
Emil
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to