All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Hellstrom <thomas@shipmail.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	David Lechner <david@lechnology.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 0/2] drm: Add shmem GEM library
Date: Fri, 14 Sep 2018 18:13:41 +0200	[thread overview]
Message-ID: <CAKMK7uGxdvc1QUwfFu3z2wzbgydHf=igWDYOkRkaO2wBFA4KQg@mail.gmail.com> (raw)
In-Reply-To: <80d3f716-58c6-8943-9a71-76197faad9ba@shipmail.org>

On Fri, Sep 14, 2018 at 5:48 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
> Hi, Noralf,
>
> On 09/11/2018 02:43 PM, Noralf Trønnes wrote:
>>
>> This patchset adds a library for shmem backed GEM objects and makes use
>> of it in tinydrm.
>>
>> When I made tinydrm I used the CMA helper because it was very easy to
>> use. July last year I learned that this limits which drivers to PRIME
>> import from, since CMA requires continuous memory. tinydrm drivers don't
>> require that. So I set out to change that looking first at shmem, but
>> that wasn't working since shmem didn't work with fbdev deferred I/O.
>> Then I did a vmalloc buffer attempt which worked with deferred I/O, but
>> maybe wouldn't be of so much use as a library for other drivers to use.
>> As my work to split out stuff from the CMA helper for shared use came to
>> an end, I had a generic fbdev emulation that uses a shadow buffer for
>> deferred I/O.
>> This means that I can now use shmem buffers after all.
>>
>> I have looked at the other drivers that use drm_gem_get_pages() and
>> several supports different cache modes so I've done that even though
>> tinydrm only uses the cached one.
>
> Out if interest, how can you use writecombine and uncached with shared
> memory?
> as typically the linear kernel map of the affected pages also needs
> changing?

I think on x86 at least the core code takes care of that. On arm, I'm
not sure this just works, since you can't change the mode of the
linear map. Instead you need specially allocated memory which is _not_
in the linear map. I guess arm boxes with pcie slots aren't that
common yet :-)
-Daniel

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



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-09-14 16:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 12:43 [PATCH v3 0/2] drm: Add shmem GEM library Noralf Trønnes
2018-09-11 12:43 ` [PATCH v3 1/2] drm: Add library for shmem backed GEM objects Noralf Trønnes
2018-09-13  1:33   ` David Lechner
2018-09-14 10:10     ` Eric Engestrom
2018-09-14 16:37       ` Noralf Trønnes
2018-09-11 12:44 ` [PATCH v3 2/2] drm/tinydrm: Switch from CMA to shmem buffers Noralf Trønnes
2018-09-13  1:35   ` David Lechner
2018-09-14 15:48 ` [PATCH v3 0/2] drm: Add shmem GEM library Thomas Hellstrom
2018-09-14 16:13   ` Daniel Vetter [this message]
2018-09-14 16:51     ` Noralf Trønnes
2018-09-14 17:11       ` Thomas Hellstrom
2018-09-14 18:09         ` Noralf Trønnes
2018-09-14 20:13           ` Thomas Hellstrom

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='CAKMK7uGxdvc1QUwfFu3z2wzbgydHf=igWDYOkRkaO2wBFA4KQg@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=david@lechnology.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sam@ravnborg.org \
    --cc=thomas@shipmail.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 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.