All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thomas Hellstrom <thellstrom@vmware.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 21/21] drm/vmwgfx: Nuke preclose hook
Date: Sun, 10 Jan 2016 21:52:55 +0100	[thread overview]
Message-ID: <5692C4A7.6010506@shipmail.org> (raw)
In-Reply-To: <CAKMK7uFKPeavAk3KoQ-jX-bgSSXPvd5Qg3KE+os_87nUGCzSTQ@mail.gmail.com>

On 01/09/2016 11:43 AM, Daniel Vetter wrote:
> On Fri, Jan 8, 2016 at 9:53 PM, Thomas Hellstrom <thellstrom@vmware.com> wrote:
>> On 01/08/2016 09:36 PM, Daniel Vetter wrote:
>>> Again since the drm core takes care of event unlinking/disarming this
>>> is now just needless code.
>>>
>>> Cc: Thomas Hellström <thellstrom@vmware.com>
>>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> Hmm,
>>
>> IIRC this is actually a list of events that core drm is not aware of
>> yet. They sit on this list waiting for a fence to pass and are then
>> transferred to core drm....
> Yes I know. Earlier patches in the series extract new core functions
> to setup/tear down such events and send them out, which is what's
> needed to make this trick possible. Exynos similarly uses events
> similarly, and is also converted. Same for nouveau it seems, but there
> the code doesn't use the reserve/send split, so I'm unclear
> how/whether at all it correctly handles this race.
> -Daniel

Ah. Hmm I should've looked more closely at the rest of the series.

In any case, this particular patch leaves, from what I can tell, the
eaction fpriv list intact when it is later freed in postclose, which is
bad. Also each eaction is left with a dangling pointer to a freed
pending event which is also very bad since that pointer will be
dereferenced as soon as the fence's seqno has passed. So as far as i can
tell, this function needs to remain except for the event destruction.

Thinking of it, this must be a problem that is more general problem than
for vmwgfx only, I mean, unless the driver traverses all core pending
event list to find relevant pending events to process, something in the
driver must actually point to the pending event (be it a pointer in the
fence object or, as in the vmwgfx case, a pointer in the fence action
object) and that pointer must somehow be invalidated when the pending
event is freed...

Which also brings up a question, where are the pending events actually
destroyed? I can see they are unlinked in drm_fops.c.

/Thomas





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

  reply	other threads:[~2016-01-10 20:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 20:36 [PATCH 00/21] drm_event cleanup Daniel Vetter
2016-01-08 20:36 ` [PATCH 01/21] drm: kerneldoc for drm_fops.c Daniel Vetter
2016-01-08 20:36 ` [PATCH 02/21] drm: Add functions to setup/tear down drm_events Daniel Vetter
2016-01-08 21:10   ` Alex Deucher
2016-01-09 13:27   ` [PATCH] " Daniel Vetter
2016-01-08 20:36 ` [PATCH 03/21] drm/exynos: Use the new event init/free functions Daniel Vetter
2016-01-08 20:36 ` [PATCH 04/21] drm/vmwgfx: " Daniel Vetter
2016-01-08 20:36 ` [PATCH 05/21] drm: Create drm_send_event helpers Daniel Vetter
2016-01-09 13:28   ` [PATCH] " Daniel Vetter
2016-01-08 20:36 ` [PATCH 06/21] drm/fsl: Remove preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 07/21] drm/armada: Remove NULL open/pre/postclose hooks Daniel Vetter
2016-01-08 20:36 ` [PATCH 08/21] drm/gma500: Remove empty preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 09/21] drm: Clean up pending events in the core Daniel Vetter
2016-01-09 13:28   ` [PATCH] " Daniel Vetter
2016-01-10 23:48     ` Laurent Pinchart
2016-01-11 14:51       ` [Intel-gfx] " Daniel Stone
2016-01-14 18:49         ` Laurent Pinchart
2016-01-08 20:36 ` [PATCH 10/21] drm/i915: Nuke intel_modeset_preclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 11/21] drm/atmel: Nuke preclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 12/21] drm/exynos: Remove event cancelling from postclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 13/21] drm/imx: Unconfuse preclose logic Daniel Vetter
2016-01-08 20:36 ` [PATCH 14/21] drm/msm: Nuke preclose hooks Daniel Vetter
2016-01-08 20:36 ` [PATCH 15/21] drm/omap: Nuke close hooks Daniel Vetter
2016-01-11  0:03   ` Laurent Pinchart
2016-01-11  7:10     ` Daniel Vetter
2016-01-08 20:36 ` [PATCH 16/21] drm/rcar: Nuke preclose hook Daniel Vetter
2016-01-11  0:01   ` Laurent Pinchart
2016-01-08 20:36 ` [PATCH 17/21] drm/shmob: " Daniel Vetter
2016-01-10 22:26   ` [PATCH 1/5] " Daniel Vetter
2016-01-10 22:26     ` [PATCH 2/5] drm/tegra: Stop cancelling page flip events Daniel Vetter
2016-01-10 22:26     ` [PATCH 3/5] drm/tilcdc: Nuke preclose hook Daniel Vetter
2016-01-10 22:26     ` [PATCH 4/5] drm/vc4: " Daniel Vetter
2016-01-10 22:26     ` [PATCH 5/5] drm/vmwgfx: " Daniel Vetter
2016-01-11 10:20       ` Thomas Hellstrom
2016-01-11  0:00     ` [PATCH 1/5] drm/shmob: " Laurent Pinchart
2016-01-08 20:36 ` [PATCH 18/21] drm/tegra: Stop cancelling page flip events Daniel Vetter
2016-01-08 20:36 ` [PATCH 19/21] drm/tilcdc: Nuke preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 20/21] drm/vc4: " Daniel Vetter
2016-01-08 20:36 ` [PATCH 21/21] drm/vmwgfx: " Daniel Vetter
2016-01-08 20:53   ` Thomas Hellstrom
2016-01-09 10:43     ` Daniel Vetter
2016-01-10 20:52       ` Thomas Hellstrom [this message]
2016-01-10 21:59         ` Daniel Vetter
2016-01-10 22:02   ` [PATCH] " Daniel Vetter
2016-01-10 22:17     ` Thomas Hellstrom
2016-01-10 22:22       ` Daniel Vetter
2016-01-08 21:47 ` [PATCH 00/21] drm_event cleanup Alex Deucher
2016-01-09 13:32 ` Daniel Vetter
2016-01-11 11:20 ` ✗ failure: Fi.CI.BAT Patchwork
2016-01-12 16:24   ` Daniel Vetter

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=5692C4A7.6010506@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /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.