Skip to content

Commit

Permalink
drm: fix issue with contexts running out of RAM
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jan 2, 2006
1 parent f26c473 commit b5e9fc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/char/drm/drm_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b5e9fc1

Please sign in to comment.