linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: David Riley <davidriley@chromium.org>
Cc: dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Gurchetan Singh" <gurchetansingh@chromium.org>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/virtio: Use vmalloc for command buffer allocations.
Date: Fri, 30 Aug 2019 08:08:57 +0200	[thread overview]
Message-ID: <20190830060857.tzrzgoi2hrmchdi5@sirius.home.kraxel.org> (raw)
In-Reply-To: <20190829212417.257397-1-davidriley@chromium.org>

  Hi,

>  {
>  	if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
>  		kfree(vbuf->resp_buf);
> -	kfree(vbuf->data_buf);
> +	kvfree(vbuf->data_buf);

if (is_vmalloc_addr(vbuf->data_buf)) ...

needed here I gues?

> +/* Create sg_table from a vmalloc'd buffer. */
> +static struct sg_table *vmalloc_to_sgt(char *data, uint32_t size)

Hmm, isn't there an existing function for that?
I'd be surprised if virtio-gpu is the first driver needing this ...

And it case there really isn't one this should probably added to the
vmalloc or scatterlist code, not the virtio-gpu driver.

cheers,
  Gerd


  reply	other threads:[~2019-08-30  6:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 21:24 [PATCH] drm/virtio: Use vmalloc for command buffer allocations David Riley
2019-08-30  6:08 ` Gerd Hoffmann [this message]
     [not found]   ` <CAASgrz2v0DYb_5A3MnaWFM4Csx1DKkZe546v7DG7R+UyLOA8og@mail.gmail.com>
2019-08-30 11:16     ` Gerd Hoffmann
2019-08-30 16:24       ` Chia-I Wu
2019-09-02  5:19         ` Gerd Hoffmann
2019-08-30 17:49       ` David Riley
2019-09-02  5:28         ` Gerd Hoffmann
2019-09-03 20:27           ` David Riley
2019-08-30 16:18 ` Chia-I Wu
2019-09-05 22:00 ` [PATCH v2] " David Riley
2019-09-06  5:18   ` Gerd Hoffmann
2019-09-09 17:12     ` David Riley
2019-09-10 20:06 ` [PATCH v3 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version David Riley
2019-09-11  5:12   ` Gerd Hoffmann
2019-09-11 17:35     ` David Riley
2019-09-10 20:06 ` [PATCH v3 2/2] drm/virtio: Use vmalloc for command buffer allocations David Riley
2019-09-11 18:14 ` [PATCH v4 0/2] drm/virtio: Use vmalloc for command buffer alllocations David Riley
2019-09-11 18:14 ` [PATCH v4 1/2] drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer using fenced version David Riley
2019-09-11 18:14 ` [PATCH v4 2/2] drm/virtio: Use vmalloc for command buffer allocations David Riley
2019-09-12  7:51   ` Gerd Hoffmann

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=20190830060857.tzrzgoi2hrmchdi5@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=davidriley@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcheu@chromium.org \
    --cc=virtualization@lists.linux-foundation.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).