From: Sam Ravnborg <sam@ravnborg.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 03/59] drm/prime: Update docs
Date: Mon, 17 Jun 2019 19:01:43 +0200 [thread overview]
Message-ID: <20190617170143.GA26531@ravnborg.org> (raw)
In-Reply-To: <20190617163811.GK12905@phenom.ffwll.local>
Hi Daniel.
> > > +/**
> > > + * DOC: overview and lifetime rules
> > > + *
> > > + * Similar to GEM global names, PRIME file descriptors are also used to share
> > > + * buffer objects across processes. They offer additional security: as file
> > > + * descriptors must be explicitly sent over UNIX domain sockets to be shared
> > > + * between applications, they can't be guessed like the globally unique GEM
> > > + * names.
> > For a newbie like me the above does not really help to understand what
> > PRIME is.
> > Yes, it is file descriptors used to share buffer objects across
> > processes.
> > But the text say "also used ..", so the main usage of PRIME is something
> > else.
>
> No, what's mean here is that prime file descriptors are used like gem
> global names, for buffer sharing. That's what the "also" means here.
> There's no other use for prime fd than sharing buffers.
>
> Not really clear why this is unclear ...
Re-reading it, things makes a bit more sense to me now.
When I wrote my comment I somehow read it:
"PRIME file descriptors are also used to share ..."
(Notice that I missed the first part).
> > > @@ -728,7 +923,11 @@ EXPORT_SYMBOL(drm_gem_prime_import_dev);
> > > * @dma_buf: dma-buf object to import
> > > *
> > > * This is the implementation of the gem_prime_import functions for GEM drivers
> > > - * using the PRIME helpers.
> > > + * using the PRIME helpers. Drivers can use this as their
> > > + * &drm_driver.gem_prime_import implementation.
> > > + *
> > > + * Drivers must arrange to call drm_prime_gem_destroy() from their
> > > + * &drm_gem_object_funcs.free hook when using this function.
> >
> > Could we here document what function we provide as the default
> > &drm_gem_object_funcs.free hook, which do the drm_prime_gem_destroy()
> > call.
> > I read the above that drivers have to provide their own implementation
> > of a .free hook, and I do not think this is right.
>
> There's no default implementation of the free hook at all, so not sure
> what you mean.
I had expected there was a default implementation.
As there is no such thing my comment it irrelevant.
> > > /**
> > > * @gem_free_object_unlocked: deconstructor for drm_gem_objects
> > > *
> > > - * This is for drivers which are not encumbered with &drm_device.struct_mutex
> > > - * legacy locking schemes. Use this hook instead of @gem_free_object.
> > > + * This is deprecated and should not be used by new drivers. Use
> > > + * &drm_gem_object_funcs.free instead.
> > > + * Compared to @gem_free_object this is not encumbered with
> > > + * &drm_device.struct_mutex legacy locking schemes.
> > > */
> > It is confusing why the above comment refer to another callback.
> > Is this the right wording?
> > * Compared to @gem_free_object_unlocked this is not encumbered with
> > * &drm_device.struct_mutex legacy locking schemes.
> >
> > Do gem_free_object() warrant a similar comment?
>
> I'm confused ... @gem_free_object is exactly the callback I want to refer
> to. Because that one _is_ encumbered with the legacy struct_mutex locking
> scheme. Unlike the .free callback, or the gem_free_object_unlocked
> callback.
I see now, OK.
Thanks for the clarifications.
Sam
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-06-17 17:01 UTC|newest]
Thread overview: 155+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 20:35 [PATCH 00/59] prime doc polish and ... a few cleanups Daniel Vetter
2019-06-14 20:35 ` [PATCH 01/59] drm/todo: Improve drm_gem_object funcs todo Daniel Vetter
2019-06-14 20:44 ` Rob Herring
2019-06-14 22:53 ` Eric Anholt
2019-06-17 14:03 ` Daniel Vetter
2019-06-17 6:02 ` Gerd Hoffmann
2019-06-17 15:47 ` Noralf Trønnes
2019-06-17 16:29 ` Daniel Vetter
2019-06-17 16:54 ` Noralf Trønnes
2019-06-17 21:20 ` Daniel Vetter
2019-06-17 22:12 ` Noralf Trønnes
2019-06-18 14:02 ` [PATCH] drm/todo: Update drm_gem_object_funcs todo even more Daniel Vetter
2019-06-18 14:15 ` Noralf Trønnes
2019-06-18 18:25 ` Eric Engestrom
2019-06-20 12:52 ` Daniel Vetter
2019-06-27 12:15 ` [PATCH 01/59] drm/todo: Improve drm_gem_object funcs todo Thomas Zimmermann
2019-06-14 20:35 ` [PATCH 02/59] drm/gem: Unexport drm_gem_(un)pin/v(un)map Daniel Vetter
2019-06-14 20:35 ` [PATCH 03/59] drm/prime: Update docs Daniel Vetter
2019-06-15 11:41 ` Sam Ravnborg
2019-06-17 16:38 ` Daniel Vetter
2019-06-17 17:01 ` Sam Ravnborg [this message]
2019-06-17 17:47 ` Emil Velikov
2019-06-18 9:20 ` [PATCH 1/2] drm/prime: Shuffle functions Daniel Vetter
2019-06-18 9:20 ` [PATCH 2/2] drm/prime: Update docs Daniel Vetter
2019-06-19 9:03 ` Daniel Vetter
2019-06-19 10:21 ` Gerd Hoffmann
2019-06-19 10:50 ` Emil Velikov
2019-06-19 12:43 ` Noralf Trønnes
2019-06-20 12:44 ` Daniel Vetter
2019-06-20 12:46 ` [PATCH] " Daniel Vetter
2019-06-19 10:18 ` [PATCH 1/2] drm/prime: Shuffle functions Gerd Hoffmann
2019-06-19 10:47 ` Emil Velikov
2019-06-19 12:09 ` Noralf Trønnes
2019-06-14 20:35 ` [PATCH 04/59] drm/prime: Unconditionally set up the prime file private Daniel Vetter
2019-06-14 20:35 ` [PATCH 05/59] drm/prime: Make DRIVER_PRIME a no-op Daniel Vetter
2019-06-17 17:53 ` Emil Velikov
2019-06-14 20:35 ` [PATCH 07/59] drm/arm/komeda: Remove DRIVER_HAVE_IRQ Daniel Vetter
2019-06-17 6:26 ` james qian wang (Arm Technology China)
2019-06-17 13:43 ` Daniel Vetter
2019-06-18 4:41 ` james qian wang (Arm Technology China)
2019-06-18 5:04 ` james qian wang (Arm Technology China)
2019-06-17 18:01 ` Emil Velikov
2019-06-19 10:11 ` Liviu Dudau
2019-06-14 20:35 ` [PATCH 08/59] drm/omapdrm: drop fb_debug_enter/leave Daniel Vetter
2019-06-14 20:35 ` [PATCH 10/59] drm/arc: Drop drm_gem_prime_export/import Daniel Vetter
2019-06-14 20:35 ` [PATCH 11/59] drm/arm: " Daniel Vetter
2019-06-17 3:22 ` james qian wang (Arm Technology China)
2019-06-19 10:11 ` Liviu Dudau
2019-06-14 20:35 ` [PATCH 12/59] drm/atmel: " Daniel Vetter
2019-06-14 21:43 ` Sam Ravnborg
2019-06-14 20:35 ` [PATCH 13/59] drm/etnaviv: " Daniel Vetter
2019-06-16 7:02 ` Christian Gmeiner
2019-06-25 16:12 ` Lucas Stach
2019-06-14 20:35 ` [PATCH 14/59] drm/exynos: Drop drm_gem_prime_export Daniel Vetter
2019-06-14 20:35 ` [PATCH 15/59] drm/fsl-dcu: Drop drm_gem_prime_export/import Daniel Vetter
2019-06-17 13:58 ` Stefan Agner
2019-06-14 20:35 ` [PATCH 16/59] drm/hisilicon: " Daniel Vetter
2019-06-14 21:29 ` Sam Ravnborg
2019-06-14 20:35 ` [PATCH 17/59] drm/imx: " Daniel Vetter
2019-06-14 20:35 ` [PATCH 18/59] drm/mcde: " Daniel Vetter
2019-06-15 8:31 ` Linus Walleij
2019-06-14 20:35 ` [PATCH 19/59] drm/mtk: " Daniel Vetter
2019-06-17 1:51 ` CK Hu
2019-06-14 20:35 ` [PATCH 20/59] drm/meson: " Daniel Vetter
2019-06-18 9:48 ` Neil Armstrong
2019-06-14 20:35 ` [PATCH 22/59] drm/mxsfb: " Daniel Vetter
2019-06-17 13:59 ` Stefan Agner
2019-06-14 20:35 ` [PATCH 24/59] drm/pl111: " Daniel Vetter
2019-06-14 20:35 ` [PATCH 25/59] drm/qxl: " Daniel Vetter
2019-06-17 6:03 ` Gerd Hoffmann
2019-06-14 20:35 ` [PATCH 26/59] drm/rcar-du: " Daniel Vetter
2019-06-18 7:35 ` Laurent Pinchart
2019-06-14 20:35 ` [PATCH 27/59] drm/rockchip: " Daniel Vetter
2019-06-15 22:36 ` Heiko Stuebner
2019-06-14 20:35 ` [PATCH 28/59] drm/shmob: " Daniel Vetter
2019-06-18 7:35 ` Laurent Pinchart
2019-06-14 20:35 ` [PATCH 29/59] drm/sti: " Daniel Vetter
2019-06-20 15:08 ` Benjamin Gaignard
2019-06-14 20:35 ` [PATCH 30/59] drm/stm: " Daniel Vetter
2019-06-18 9:55 ` Philippe CORNU
2019-06-14 20:35 ` [PATCH 31/59] drm/tilcdc: " Daniel Vetter
2019-06-14 20:35 ` [PATCH 32/59] drm/tve2000: " Daniel Vetter
2019-06-15 8:34 ` Linus Walleij
2019-06-15 9:14 ` Daniel Vetter
2019-06-14 20:35 ` [PATCH 33/59] drm/vboxvideo: " Daniel Vetter
2019-06-14 20:35 ` [PATCH 34/59] drm/vc3: Drop drm_gem_prime_import Daniel Vetter
2019-06-14 20:35 ` [PATCH 35/59] drm/radeon: " Daniel Vetter
2019-06-14 20:35 ` [PATCH 36/59] drm/vgem: Drop drm_gem_prime_export Daniel Vetter
2019-06-14 20:35 ` [PATCH 37/59] drm/virtio: Drop drm_gem_prime_export/import Daniel Vetter
2019-06-17 6:03 ` Gerd Hoffmann
2019-06-14 20:35 ` [PATCH 38/59] drm/xen: " Daniel Vetter
2019-06-18 5:05 ` [Xen-devel] " Oleksandr Andrushchenko
2019-06-14 20:35 ` [PATCH 39/59] drm/zte: " Daniel Vetter
2019-06-18 13:15 ` Shawn Guo
2019-06-14 20:35 ` [PATCH 40/59] drm/vram-helper: " Daniel Vetter
2019-06-17 6:03 ` Gerd Hoffmann
2019-06-17 8:24 ` Gerd Hoffmann
2019-06-17 13:59 ` Daniel Vetter
2019-06-18 4:49 ` Gerd Hoffmann
2019-06-18 7:59 ` Daniel Vetter
2019-06-19 11:21 ` Gerd Hoffmann
2019-06-19 11:31 ` Daniel Vetter
2019-06-27 8:27 ` Thomas Zimmermann
2019-06-27 9:59 ` Daniel Vetter
2019-06-14 20:35 ` [PATCH 41/59] drm/prime: automatically set gem_obj->resv on import Daniel Vetter
2019-06-14 20:35 ` [PATCH 42/59] drm/etnaviv: Drop resv argument from etnaviv_gem_new_impl Daniel Vetter
2019-06-25 16:10 ` Lucas Stach
2019-06-14 20:35 ` [PATCH 43/59] drm/lima: Drop resv argument from lima_bo_create_struct Daniel Vetter
2019-06-15 10:03 ` Qiang Yu
2019-06-14 20:36 ` [PATCH 44/59] drm/mediatek: Use drm_atomic_helper_wait_for_fences Daniel Vetter
2019-06-17 5:19 ` CK Hu
2019-06-14 20:36 ` [PATCH 46/59] drm/panfrost: don't set gem_obj->resv for prime import anymore Daniel Vetter
2019-06-14 21:05 ` Rob Herring
2019-06-14 20:36 ` [PATCH 47/59] drm/vc4: Don set gem_obj->resv in " Daniel Vetter
2019-06-14 20:36 ` [PATCH 48/59] drm/vgem: Ditch attach trickery in the fence ioctl Daniel Vetter
2019-06-18 12:31 ` Chris Wilson
2019-06-18 13:18 ` Daniel Vetter
2019-06-14 20:36 ` [PATCH 50/59] drm/vc4: Use drm_gem_fb_prepare_fb Daniel Vetter
[not found] ` <20190614203615.12639-1-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-14 20:35 ` [PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere Daniel Vetter
[not found] ` <20190614203615.12639-7-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-14 21:36 ` Sam Ravnborg
2019-06-17 15:39 ` [PATCH] " Daniel Vetter
2019-06-17 17:56 ` [PATCH 06/59] " Emil Velikov
2019-06-14 20:35 ` [PATCH 09/59] drm/prime: Align gem_prime_export with obj_funcs.export Daniel Vetter
[not found] ` <20190614203615.12639-10-daniel.vetter-/w4YWyX8dFk@public.gmane.org>
2019-06-17 9:32 ` Koenig, Christian
2019-06-17 9:53 ` Thierry Reding
2019-06-21 10:37 ` Daniel Vetter
2019-06-14 20:35 ` [PATCH 21/59] drm/msm: Drop drm_gem_prime_export/import Daniel Vetter
2019-06-14 20:35 ` [PATCH 23/59] drm/nouveau: " Daniel Vetter
2019-06-14 20:36 ` [PATCH 45/59] drm/msm: Drop robj from msm_gem_new_impl Daniel Vetter
2019-06-14 20:36 ` [PATCH 49/59] drm/msm: Use drm_gem_fb_prepare_fb Daniel Vetter
2019-06-14 20:36 ` [PATCH 51/59] drm/radeon: Fill out gem_object->resv Daniel Vetter
2019-06-14 20:36 ` [PATCH 52/59] drm/nouveau: " Daniel Vetter
2019-06-14 20:36 ` [PATCH 53/59] drm/amdgpu: " Daniel Vetter
2019-06-14 20:36 ` [PATCH 54/59] drm/prime: Ditch gem_prime_res_obj hook Daniel Vetter
2019-06-14 20:36 ` [PATCH 55/59] drm/todo: remove gem_prime_import/export todo Daniel Vetter
2019-06-14 20:36 ` [PATCH 56/59] drm/todo: Update backlight todo Daniel Vetter
2019-06-14 21:46 ` Sam Ravnborg
2019-06-21 13:11 ` Daniel Thompson
2019-06-14 20:36 ` [PATCH 57/59] drm/todo: Update mmap todo Daniel Vetter
2019-06-14 20:36 ` [PATCH 58/59] drm/todo: Add new debugfs todo Daniel Vetter
2019-06-15 6:23 ` Greg Kroah-Hartman
2019-06-18 15:19 ` drm connectors, tegra, and the web they weave (was Re: [PATCH 58/59] drm/todo: Add new debugfs todo) Greg Kroah-Hartman
2019-06-18 15:25 ` Greg Kroah-Hartman
2019-06-18 17:32 ` Daniel Vetter
2019-06-18 18:01 ` Greg Kroah-Hartman
2019-06-18 21:46 ` Daniel Vetter
2019-06-20 14:50 ` Thierry Reding
2019-06-20 15:11 ` Thierry Reding
2019-06-18 15:37 ` Jon Hunter
2019-06-20 15:16 ` Thierry Reding
2019-06-20 14:57 ` Thierry Reding
2019-06-14 20:36 ` [PATCH 59/59] drm/doc: Document kapi doc expectations Daniel Vetter
2019-06-17 8:52 ` Jani Nikula
2019-06-17 18:21 ` [Intel-gfx] [PATCH 00/59] prime doc polish and ... a few cleanups Emil Velikov
2019-06-18 10:41 ` Emil Velikov
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=20190617170143.GA26531@ravnborg.org \
--to=sam@ravnborg.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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).