linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Christoph Hellwig <hch@infradead.org>, Daniel Vetter <daniel@ffwll.ch>
Cc: Juergen Gross <jgross@suse.com>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH] drm/xen-front: Make shmem backed display buffer coherent
Date: Fri, 21 Dec 2018 11:16:44 +0200	[thread overview]
Message-ID: <83a4be07-a06f-5585-66f6-4973f80dbfba@gmail.com> (raw)
In-Reply-To: <20181220183851.GA27025@infradead.org>

On 12/20/18 8:38 PM, Christoph Hellwig wrote:
> On Thu, Dec 20, 2018 at 07:35:15PM +0100, Daniel Vetter wrote:
>>> Err, with streaming DMA buffer sharing is trivial.  The coherent DMA
>>> allocator is what causes all kinds of horrible hacks that can't actually
>>> work on various platforms.
>> Hm, I thought the streaming dma api is the one that causes bounce
>> buffers and all that fun. If you're unlucky at least.
> Yes it may.  But even if that happens everything will actually work,
> just slower.  While the dma coherent API is simply broken.
>
> But if you don't want bounce buffering you need to use the dma
> noncoherent allocator as proposed here:
>
> 	https://lists.linuxfoundation.org/pipermail/iommu/2018-December/031982.html
>
> which combines allocating memory that doesn't need to be bounce
> buffered with a sharing scheme that can actually work.
So, the bottom line will be: I can use DMA API for what I need, but:
1. I need to remove GFP_USER
2. No need for DMA32 (so no chance for bouncing to step in)
3. I may need to check if mapping and unmapping of the buffer
at once will also help, e.g. no need to have the buffer mapped until
it is destroyed
Did I get it all right?

Thank you,
Oleksandr

      reply	other threads:[~2018-12-21  9:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 10:32 [PATCH] drm/xen-front: Make shmem backed display buffer coherent Oleksandr Andrushchenko
2018-12-13 10:17 ` Oleksandr Andrushchenko
2018-12-13 15:48   ` Daniel Vetter
2018-12-14  7:09     ` Oleksandr Andrushchenko
2018-12-14  8:35       ` Daniel Vetter
2018-12-17  8:03         ` Oleksandr Andrushchenko
2018-12-18 19:20 ` Noralf Trønnes
2018-12-19  8:18   ` Oleksandr Andrushchenko
2018-12-19 13:14     ` Gerd Hoffmann
2018-12-19 13:21       ` Oleksandr Andrushchenko
2018-12-19 14:10         ` Gerd Hoffmann
2018-12-20 11:19           ` Oleksandr Andrushchenko
2018-12-20 15:37       ` Christoph Hellwig
2018-12-19 16:14     ` Noralf Trønnes
2018-12-20 11:24       ` Oleksandr Andrushchenko
2018-12-20 15:36   ` Christoph Hellwig
2018-12-20 15:49     ` Oleksandr Andrushchenko
2018-12-20 17:39       ` Christoph Hellwig
2018-12-20 18:29         ` Daniel Vetter
2018-12-20 18:33           ` Christoph Hellwig
2018-12-20 18:35             ` Daniel Vetter
2018-12-20 18:38               ` Christoph Hellwig
2018-12-21  9:16                 ` Oleksandr Andrushchenko [this message]

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=83a4be07-a06f-5585-66f6-4973f80dbfba@gmail.com \
    --to=andr2000@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=xen-devel@lists.xenproject.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).