dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Dave Airlie <airlied@gmail.com>
Cc: amd-gfx mailing list <amd-gfx@lists.freedesktop.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm] drm/amdgpu: add new low overhead command submission API. (v2)
Date: Thu, 10 Aug 2017 14:56:41 +0100	[thread overview]
Message-ID: <CACvgo50nHR-L_ExwdvT48t9dHXrs50CGOmcR4j1SzFBVP6XHiA@mail.gmail.com> (raw)
In-Reply-To: <20170718035243.25126-1-airlied@gmail.com>

Hi Dave,

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

  parent reply	other threads:[~2017-08-10 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  3:52 [PATCH libdrm] drm/amdgpu: add new low overhead command submission API. (v2) Dave Airlie
2017-07-18 13:59 ` Christian König
2017-08-10 13:56 ` Emil Velikov [this message]
     [not found]   ` <CACvgo50nHR-L_ExwdvT48t9dHXrs50CGOmcR4j1SzFBVP6XHiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-10 19:43     ` Dave Airlie
     [not found]       ` <CAPM=9tx0HMQ8oqzm4o1g0JLBjyCmWX4jyaHWYAPnS0fJzM9u6g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-11  7:41         ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACvgo50nHR-L_ExwdvT48t9dHXrs50CGOmcR4j1SzFBVP6XHiA@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).