All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Sean Paul <sean@poorly.run>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 1/2] drm/shmem: Use cached mappings by default
Date: Mon, 18 May 2020 10:50:15 +0200	[thread overview]
Message-ID: <3bc1a032-2e7a-d7a8-e5e6-8d53a9e9bd3a@suse.de> (raw)
In-Reply-To: <20200518082354.jeuyt7uzek73pjkp@sirius.home.kraxel.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 1552 bytes --]

Hi Gerd

Am 18.05.20 um 10:23 schrieb Gerd Hoffmann:
>>> $ git grep drm_gem_shmem_mmap
>>>
>>> We also need correct access from userspace, otherwise the gpu is going to
>>> be sad.
>>
>> I've been thinking about this, and I think it means that we can never
>> have cached mappings anywhere. Even if shmem supports it internally for
>> most drivers, as soon as the page are exported, the importer could
>> expect uncached memory.
> 
> The importer should not expect anything but call dma-buf ops so the
> exporter has a chance to handle this correctly.

I have the following case in mind: Suppose the exporter maps cached
pages and the importer expects uncached pages for DMA. There is
map_dma_buf/unmap_dma_buf, which can implement a cache flush for the
cached pages. Is it guaranteed that the importer calls this around each
DMA operation? If it doesn't, it could miss later buffer updates from
the exporter. And there's apparently no explicit flush op in dma_buf_ops.

Best regards
Thomas

> 
> (Yes, we don't get this right everywhere, some drivers take the dma-bufs
> list of pages and do their own thing ...).
> 
> take care,
>   Gerd
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-05-18  8:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 15:03 [PATCH 0/2] Default to cachable mappings for GEM SHMEM Thomas Zimmermann
2020-05-13 15:03 ` [PATCH 1/2] drm/shmem: Use cached mappings by default Thomas Zimmermann
2020-05-13 15:06   ` Thomas Zimmermann
2020-05-14 12:40   ` Daniel Vetter
2020-05-14 15:27     ` Thomas Zimmermann
2020-05-14 20:36     ` Rob Herring
2020-05-15  6:58       ` Thomas Zimmermann
2020-05-15 14:10         ` Daniel Vetter
2020-05-18  8:13           ` Thomas Zimmermann
2020-05-18  8:23             ` Gerd Hoffmann
2020-05-18  8:50               ` Thomas Zimmermann [this message]
2020-05-18 10:11                 ` Gerd Hoffmann
2020-05-18 14:40                   ` Daniel Vetter
2020-05-19  6:31                     ` Thomas Zimmermann
2020-05-13 15:03 ` [PATCH 2/2] drm/udl: Use GEM vmap/mmap function from SHMEM helpers Thomas Zimmermann
2020-05-13 15:49   ` Daniel Vetter
2020-05-13 17:19     ` Thomas Zimmermann
2020-05-14 12:44   ` Daniel Vetter
2020-05-19  6:36     ` Thomas Zimmermann

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=3bc1a032-2e7a-d7a8-e5e6-8d53a9e9bd3a@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.