[Intel-gfx] [PATCH 5/5] drm/i915: Use the engine class to get the context size
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 11 12:27:57 UTC 2017
On Tue, Apr 11, 2017 at 12:32:14PM +0100, Tvrtko Ursulin wrote:
>
> On 11/04/2017 11:25, Chris Wilson wrote:
> >On Mon, Apr 10, 2017 at 07:34:33AM -0700, Oscar Mateo wrote:
> >>From: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> >>
> >>Technically speaking, the context size is per engine class, not per
> >>instance.
> >>
> >>---
> >>diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
> >>index e8015e7..bde2b6e 100644
> >>--- a/drivers/gpu/drm/i915/intel_lrc.h
> >>+++ b/drivers/gpu/drm/i915/intel_lrc.h
> >>@@ -78,7 +78,11 @@ enum {
> >> struct drm_i915_private;
> >> struct i915_gem_context;
> >>
> >>-uint32_t intel_lr_context_size(struct intel_engine_cs *engine);
> >>+uint32_t intel_lr_class_context_size(struct drm_i915_private *dev_priv, u8 class);
> >>+static inline uint32_t intel_lr_context_size(struct intel_engine_cs *engine)
> >>+{
> >>+ return intel_lr_class_context_size(engine->i915, engine->class);
> >>+}
> >
> >I'm not understanding why you want to push this to the caller.
> >
> >Patches 1-4 are r-b me, and I'll apply once we have put out the fire.
>
> Just to say you can keep my r-b if you change this detail. I
> wondered the same myself but didn't consider it too critical.
I've pushed the first 4 patches. Patch 5 is good to go once we have
clarification why you want to expose the per-class lookup to
context_size (or restore the interface back to hiding the class lookup).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list