create_pinned_context(struct intel_engine_cs *engine,
		      unsigned int hwsp,
		      struct lock_class_key *key,
		      const char *name)
{
	struct intel_context *ce;
	int err;

	ce = intel_context_create(engine);
	if (IS_ERR(ce))
		return ce;

	__set_bit(CONTEXT_BARRIER_BIT, &ce->flags);
	ce->timeline = page_pack_bits(NULL, hwsp);

	err = intel_context_pin(ce); /* perma-pin so it is always available */
	if (err) {
		intel_context_put(ce);
		return ERR_PTR(err);
	}

	/*
	 * Give our perma-pinned kernel timelines a separate lockdep class,
	 * so that we can use them from within the normal user timelines
	 * should we need to inject GPU operations during their request
	 * construction.
	 */
	lockdep_set_class_and_name(&ce->timeline->mutex, key, name);

	return ce;
}
create_pinned_context(struct intel_engine_cs *engine,
		      unsigned int hwsp,
		      struct lock_class_key *key,
		      const char *name)
{
	struct intel_context *ce;
	int err;

	ce = intel_context_create(engine);
	if (IS_ERR(ce))
		return ce;

	__set_bit(CONTEXT_BARRIER_BIT, &ce->flags);
	ce->timeline = page_pack_bits(NULL, hwsp);

	err = intel_context_pin(ce);  
	if (err) {
		intel_context_put(ce);
		return ERR_PTR(err);
	}

	 
	lockdep_set_class_and_name(&ce->timeline->mutex, key, name);

	return ce;
}