Commit b5e9fc13 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie

drm: fix issue with contexts running out of RAM

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent f26c473c
......@@ -432,6 +432,10 @@ int drm_addctx(struct inode *inode, struct file *filp,
if (ctx.handle != DRM_KERNEL_CONTEXT) {
if (dev->driver->context_ctor)
if (dev->driver->context_ctor(dev, ctx.handle)) {
DRM_DEBUG("Running out of ctxs or memory.\n");
return -ENOMEM;
}
dev->driver->context_ctor(dev, ctx.handle);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment