On Thu, Feb 16, 2017 at 06:15:05AM -0800, Oscar Mateo wrote: > static void guc_ctx_desc_init(struct intel_guc *guc, > struct i915_guc_client *client) > { > struct drm_i915_private *dev_priv = guc_to_i915(guc); > struct intel_engine_cs *engine; > struct i915_gem_context *ctx = client->owner; > - struct guc_context_desc desc; > - struct sg_table *sg; > + struct guc_context_desc *desc; > unsigned int tmp; > u32 gfx_addr; > > - memset(&desc, 0, sizeof(desc)); > + desc = __get_context_desc(client); Do you want to make the assumption that these are zeroed-on-create objects? We could switch to using non-swappable (internal) objects that are not cleared on create. i.e. diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 4a752f2b6e24..4128e8937b45 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -650,7 +650,7 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size) struct i915_vma *vma; int ret; - obj = i915_gem_object_create(dev_priv, size); + obj = i915_gem_object_create_internal(dev_priv, size); if (IS_ERR(obj)) return ERR_CAST(obj); Or do we write the entire desc? It doesn't look like we do, but do we do enough? Other than that potential booby trap for later, Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx