[Intel-gfx] improve handling of the driver's internal default context

Dave Gordon david.s.gordon at intel.com
Mon Dec 21 08:04:39 PST 2015

A collection of patches to simplify the creation, use, and destruction
of the driver's global default context.

    The first two simplify the many places where the code treats the
    global default context differently from any other context:

	[1/6] drm/i915: mark the global default (intel_)context as such
	[2/6] drm/i915: simplify testing for the global default context

    Then we hide the use of the global-default-context from callers who
    don't need to know how non-batch-related requests are implemented

	[3/6] drm/i915: simplify allocation of driver-internal requests

    And get rid of the multiple references to the default context, one
    from each engine (but all pointing to the same structure). This
    allows the refcount and the number of references to match!

	[4/6] drm/i915: abolish separate per-engine default_context

    Finally, fix some incorrect failure paths and tidy up the
    corresponding teardown code:

	[5/6] drm/i915: tidy up initialisation failure paths (legacy)
	[6/6] drm/i915: tidy up initialisation failure paths (GEM &

These should make subsequent reorganisation of other startup/teardown
code easier and safer.

More information about the Intel-gfx mailing list