From: Thomas Zimmermann <tzimmermann@suse.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com,
krzysztof.kozlowski@canonical.com, airlied@linux.ie,
sw0312.kim@samsung.com, oleksandr_andrushchenko@epam.com,
kyungmin.park@samsung.com, dri-devel@lists.freedesktop.org,
xen-devel@lists.xenproject.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3] drm: Update documentation and TODO of gem_prime_mmap hook
Date: Wed, 10 Nov 2021 13:56:00 +0100 [thread overview]
Message-ID: <91b6dafa-de34-d972-50bc-b401820b5ccb@suse.de> (raw)
In-Reply-To: <YYujGLFf+spiXMil@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 3061 bytes --]
Hi
Am 10.11.21 um 11:46 schrieb Daniel Vetter:
> On Mon, Nov 08, 2021 at 11:28:46AM +0100, Thomas Zimmermann wrote:
>> The hook gem_prime_mmap in struct drm_driver is deprecated. Document
>> the new requirements.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thanks a lot!
With the remaining patches merged, all drivers will implement
gem_prime_mmap via drm_gem_prime_mmap() and use the GEM object's mmap
callback for specific details.
The next step would be to move all custom implementations of
file_operations.mmap into the GEM object's mmap and implement the
file_operations callback with drm_mmap().
Best regards
Thomas
>
>> ---
>> Documentation/gpu/todo.rst | 11 -----------
>> include/drm/drm_drv.h | 11 +++++++----
>> 2 files changed, 7 insertions(+), 15 deletions(-)
>>
>> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
>> index 60d1d7ee0719..6593c4c4006e 100644
>> --- a/Documentation/gpu/todo.rst
>> +++ b/Documentation/gpu/todo.rst
>> @@ -268,17 +268,6 @@ Contact: Daniel Vetter
>>
>> Level: Intermediate
>>
>> -Clean up mmap forwarding
>> -------------------------
>> -
>> -A lot of drivers forward gem mmap calls to dma-buf mmap for imported buffers.
>> -And also a lot of them forward dma-buf mmap to the gem mmap implementations.
>> -There's drm_gem_prime_mmap() for this now, but still needs to be rolled out.
>> -
>> -Contact: Daniel Vetter
>> -
>> -Level: Intermediate
>> -
>> Generic fbdev defio support
>> ---------------------------
>>
>> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
>> index 0cd95953cdf5..a84eb4028e5b 100644
>> --- a/include/drm/drm_drv.h
>> +++ b/include/drm/drm_drv.h
>> @@ -345,11 +345,14 @@ struct drm_driver {
>> * mmap hook for GEM drivers, used to implement dma-buf mmap in the
>> * PRIME helpers.
>> *
>> - * FIXME: There's way too much duplication going on here, and also moved
>> - * to &drm_gem_object_funcs.
>> + * This hook only exists for historical reasons. Drivers must use
>> + * drm_gem_prime_mmap() to implement it.
>> + *
>> + * FIXME: Convert all drivers to implement mmap in struct
>> + * &drm_gem_object_funcs and inline drm_gem_prime_mmap() into
>> + * its callers. This hook should be removed afterwards.
>
> I think at least i915 has different semantics between dma-buf mmap and gem
> mmap in some cases, so this might be tricky to achieve. But I think
> everywhere else this should be solid.
> -Daniel
>
>> */
>> - int (*gem_prime_mmap)(struct drm_gem_object *obj,
>> - struct vm_area_struct *vma);
>> + int (*gem_prime_mmap)(struct drm_gem_object *obj, struct vm_area_struct *vma);
>>
>> /**
>> * @dumb_create:
>> --
>> 2.33.1
>>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
prev parent reply other threads:[~2021-11-10 12:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 10:28 [RESEND PATCH 0/3] drm/{exynos,xen}: Implement gem_prime_mmap with drm_gem_prime_mmap() Thomas Zimmermann
2021-11-08 10:28 ` [PATCH 1/3] drm/exynox: Implement mmap as GEM object function Thomas Zimmermann
2021-11-08 15:29 ` Daniel Vetter
2021-11-09 9:34 ` Inki Dae
2021-11-09 9:44 ` Thomas Zimmermann
2021-11-09 5:08 ` Inki Dae
2021-11-08 10:28 ` [PATCH 2/3] drm/xen: " Thomas Zimmermann
2021-11-08 10:46 ` Oleksandr Andrushchenko
2021-11-08 11:32 ` Thomas Zimmermann
2021-11-08 10:28 ` [PATCH 3/3] drm: Update documentation and TODO of gem_prime_mmap hook Thomas Zimmermann
2021-11-10 10:46 ` Daniel Vetter
2021-11-10 12:56 ` Thomas Zimmermann [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=91b6dafa-de34-d972-50bc-b401820b5ccb@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jy0922.shim@samsung.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=sw0312.kim@samsung.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).