drm: fix issue with contexts running out of RAM
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
f26c473cdf
commit
b5e9fc13dd
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue