[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4cd9ada-aaf1-3bd8-a138-f61308baf70c@arm.com>
Date: Wed, 22 May 2019 13:39:03 +0100
From: Steven Price <steven.price@....com>
To: Chris Wilson <chris@...is-wilson.co.uk>,
Rob Herring <robh@...nel.org>
Cc: Tomeu Vizoso <tomeu.vizoso@...labora.com>,
David Airlie <airlied@...ux.ie>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Sean Paul <sean@...rly.run>,
Alyssa Rosenzweig <alyssa@...enzweig.io>
Subject: Re: [PATCH v3 2/2] drm/panfrost: Use drm_gem_shmem_map_offset()
On 21/05/2019 19:23, Chris Wilson wrote:
> Quoting Rob Herring (2019-05-21 16:24:27)
>> On Mon, May 20, 2019 at 4:23 AM Steven Price <steven.price@....com> wrote:
>>>
>>
>> You forgot to update the subject. I can fixup when applying, but I'd
>> like an ack from Chris on patch 1.
Sorry about that - I'll try to be more careful in the future.
> I still think it is incorrect as the limitation is purely an issue with
> the shmem backend and not a generic GEM limitation. It matters if you
Do you prefer the previous version of this series[1] with the shmem helper?
[1]
https://lore.kernel.org/lkml/20190516141447.46839-1-steven.price@arm.com/
Although this isn't a generic GEM limitation it's currently the same
limitation that applies to the 'dumb' drivers as well as shmem backend,
so I'd prefer not implementing two identical functions purely because
this limitation could be removed in the future.
> have a history of passing names and want a consistent api across objects
> when the apps themselves no longer can tell the difference, and
> certainly do not have access to the dmabuf fd. i915 provides an indirect
> mmap interface that uses the dma mapping regardless of source.
I don't understand the i915 driver, but from a quick look at the source
of i915_gem_mmap_ioctl():
/* prime objects have no backing filp to GEM mmap
* pages from.
*/
if (!obj->base.filp) {
addr = -ENXIO;
goto err;
}
it looks to me that an attempt to map an imported dmabuf from user space
using the ioctl will fail. Am I missing something?
exynos_drm_gem_mmap() is the only (mainline[2]) instance I can see where
a transparent mapping of a dma_buf is supported.
[2] mali_kbase does this too - but I'm not convinced it was a good idea.
I could instead add support in shmem/panfrost for transparently passing
the request to the exporter (i.e. call dma_buf_mmap()) - but I'm not
sure we want to implement this if there isn't going to be a user of the
support.
Steve
Powered by blists - more mailing lists