Re: [PATCH libdrm] drm/amdgpu: add new low overhead command submission API. (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

On 18 July 2017 at 04:52, Dave Airlie <airlied@xxxxxxxxx> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux