1. 21 1月, 2016 2 次提交
    • D
      drm/i915: abolish separate per-ring default_context pointers · ed54c1a1
      Dave Gordon 提交于
      Now that we've eliminated a lot of uses of ring->default_context,
      we can eliminate the pointer itself.
      
      All the engines share the same default intel_context, so we can just
      keep a single reference to it in the dev_priv structure rather than one
      in each of the engine[] elements. This make refcounting more sensible
      too, as we now have a refcount of one for the one pointer, rather than
      a refcount of one but multiple pointers.
      
      From an idea by Chris Wilson.
      
      v2:	transform an extra instance of ring->default_context introduced by
          42f1cae8 drm/i915: Restore inhibiting the load of the default context
          That patch's commentary includes:
      	v2: Mark the global default context as uninitialized on GPU reset so
      	    that the context-local workarounds are reloaded upon re-enabling
          The code implementing that now also benefits from the replacement of
          the multiple (per-ring) pointers to the default context with a single
          pointer to the unique kernel context.
      
      v4:	Rebased, remove underused local (Nick Hoath)
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NNick Hoath <nicholas.hoath@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453230175-19330-3-git-send-email-david.s.gordon@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed54c1a1
    • D
      drm/i915: simplify allocation of driver-internal requests · 26827088
      Dave Gordon 提交于
      There are a number of places where the driver needs a request, but isn't
      working on behalf of any specific user or in a specific context. At
      present, we associate them with the per-engine default context. A future
      patch will abolish those per-engine context pointers; but we can already
      eliminate a lot of the references to them, just by making the allocator
      allow NULL as a shorthand for "an appropriate context for this ring",
      which will mean that the callers don't need to know anything about how
      the "appropriate context" is found (e.g. per-ring vs per-device, etc).
      
      So this patch renames the existing i915_gem_request_alloc(), and makes
      it local (static inline), and replaces it with a wrapper that provides
      a default if the context is NULL, and also has a nicer calling
      convention (doesn't require a pointer to an output parameter). Then we
      change all callers to use the new convention:
      OLD:
      	err = i915_gem_request_alloc(ring, user_ctx, &req);
      	if (err) ...
      NEW:
      	req = i915_gem_request_alloc(ring, user_ctx);
      	if (IS_ERR(req)) ...
      OLD:
      	err = i915_gem_request_alloc(ring, ring->default_context, &req);
      	if (err) ...
      NEW:
      	req = i915_gem_request_alloc(ring, NULL);
      	if (IS_ERR(req)) ...
      
      v4:	Rebased
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NNick Hoath <nicholas.hoath@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453230175-19330-2-git-send-email-david.s.gordon@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      26827088
  2. 20 1月, 2016 7 次提交
  3. 19 1月, 2016 2 次提交
  4. 18 1月, 2016 10 次提交
  5. 16 1月, 2016 3 次提交
  6. 15 1月, 2016 6 次提交
  7. 14 1月, 2016 10 次提交