return ERR_PTR(ret);
}
+ ppgtt->ctx = ctx;
return ppgtt;
}
BUG_ON(file && to == NULL);
- /* We have the fake context, but don't supports switching. */
- if (!HAS_HW_CONTEXTS(ring->dev))
+ /* We have the fake context */
+ if (!HAS_HW_CONTEXTS(ring->dev)) {
+ ring->last_context = to;
return 0;
+ }
return do_switch(ring, to);
}