On Thu, Feb 09, 2017 at 02:23:39AM -0800, Oscar Mateo wrote: > @@ -116,15 +114,8 @@ static int guc_update_doorbell_id(struct intel_guc *guc, > } > > /* Update the GuC's idea of the doorbell ID */ > - len = sg_pcopy_to_buffer(sg->sgl, sg->nents, &desc, sizeof(desc), > - sizeof(desc) * client->ctx_index); > - if (len != sizeof(desc)) > - return -EFAULT; > - desc.db_id = new_id; > - len = sg_pcopy_from_buffer(sg->sgl, sg->nents, &desc, sizeof(desc), > - sizeof(desc) * client->ctx_index); > - if (len != sizeof(desc)) > - return -EFAULT; > + desc = guc->ctx_pool_vaddr + sizeof(*desc) * client->ctx_index; Repeated quite a few times. static inline struct guc_context_desc * guc_context_desc(struct intel_guc *guc, struct i915_guc_client *client) { return (guc->ctx_pool_vaddr + sizeof(struct guc_context_desc) * client->ctx_index); Or your preference } Lots of little nitpicks I could make. *summons Joonas. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx