[Intel-gfx] [PATCH 2/8] drm/i915: Rename ctx->obj to ctx->rcs_state
Chris Wilson
chris at chris-wilson.co.uk
Thu Jul 3 11:46:48 CEST 2014
On Thu, Jun 26, 2014 at 02:24:13PM +0100, oscar.mateo at intel.com wrote:
> From: Oscar Mateo <oscar.mateo at intel.com>
>
> This is Execlists preparatory work.
>
> We have already advanced that Logical Ring Contexts have their own kind
> ob backing objects, but everything will be better explained in the Execlists
> series. For now, suffice it to say that this backing object is only
> ever used with the render ring, so we're making this fact more explicit
> (which is a good reason on its own).
>
> Done with the following Coccinelle patch (plus manual renaming of the
> struct field):
>
> @@
> struct intel_context c;
> @@
> - (c).obj
> + c.rcs_state
>
> @@
> *c;
> @@
> - (c)->obj
> + c->rcs_state
>
> No functional changes.
>
> v2: Go with rcs_state instead of render_obj, as suggested by Chris Wilson.
Another little change here is ctx->is_initialised if you create
struct {
struct drm_i915_gem_object *rcs_state;
bool initialised;
} legacy_hw_ctx;
that should also address Daniel's confusion.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list