Quoting Matthew Auld (2020-11-27 12:06:19) > Based on a patch from Michel Thierry. > > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > Cc: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx> > --- > .../drm/i915/gt/intel_execlists_submission.c | 31 ++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > index 582a9044727e..c640b90711fd 100644 > --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c > @@ -108,6 +108,8 @@ > */ > #include <linux/interrupt.h> > > +#include "gem/i915_gem_lmem.h" > + > #include "i915_drv.h" > #include "i915_perf.h" > #include "i915_trace.h" > @@ -4660,6 +4662,21 @@ static struct intel_timeline *pinned_timeline(struct intel_context *ce) > page_unmask_bits(tl)); > } > > +static int context_clear_lmem(struct drm_i915_gem_object *ctx_obj) > +{ > + void *vaddr; > + > + vaddr = i915_gem_object_pin_map(ctx_obj, I915_MAP_WC); > + if (IS_ERR(vaddr)) > + return PTR_ERR(vaddr); > + > + memset64(vaddr, 0, ctx_obj->base.size / sizeof(u64)); > + > + i915_gem_object_unpin_map(ctx_obj); What? We copy over the entire object with the default state. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx