Archived
14
0
Fork 0

drm: fix issue with contexts running out of RAM

Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Dave Airlie 2006-01-02 19:23:44 +11:00 committed by Dave Airlie
parent f26c473cdf
commit b5e9fc13dd

View file

@ -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);
}