[PATCH 12/24] drm/i915: Merge pre/postclose hooks

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 8 15:07:48 UTC 2017


On Wed, Mar 08, 2017 at 03:12:45PM +0100, Daniel Vetter wrote:
> There's really not a reason afaics that we can't just clean up
> everything at the end, in the terminal postclose hook: Since this is
> closing a file descriptor we know no one else can have a reference or
> a thread doing something with that drm_file except the close code.
> Ordering shouldn't matter, as long as we don't kfree before we clean
> stuff up.

My gut feeling was that preclose is the one we want to keep, as that is
closer to the onion unwind - during open, we do the core drm ops first
(e.g. drm_gem_open) before the backend, so during close we should do the
driver before the core.

Maybe completely wrong ofc.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list