diff options
author | Dave Airlie <airlied@redhat.com> | 2013-09-19 18:32:59 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-09-19 18:32:59 -0400 |
commit | c21eb21cb50d58e7cbdcb8b9e7ff68b85cfa5095 (patch) | |
tree | 2ac14a2041ca462c51ee25eca1267f545a852e11 /drivers/gpu/drm/drm_fops.c | |
parent | 928c2f0c006bf7f381f58af2b2786d2a858ae311 (diff) |
Revert "drm: mark context support as a legacy subsystem"
This reverts commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1.
Well looks like not enough digging was done, libdrm_nouveau before 2.4.33
used contexts,
292da616fe1f936ca78a3fa8e1b1b19883e343b6 nouveau: pull in major libdrm rewrite
got rid of them,
Reported-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r-- | drivers/gpu/drm/drm_fops.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 4be8e09a32ef..3f84277d7036 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -439,7 +439,26 @@ int drm_release(struct inode *inode, struct file *filp) | |||
439 | if (dev->driver->driver_features & DRIVER_GEM) | 439 | if (dev->driver->driver_features & DRIVER_GEM) |
440 | drm_gem_release(dev, file_priv); | 440 | drm_gem_release(dev, file_priv); |
441 | 441 | ||
442 | drm_legacy_ctxbitmap_release(dev, file_priv); | 442 | mutex_lock(&dev->ctxlist_mutex); |
443 | if (!list_empty(&dev->ctxlist)) { | ||
444 | struct drm_ctx_list *pos, *n; | ||
445 | |||
446 | list_for_each_entry_safe(pos, n, &dev->ctxlist, head) { | ||
447 | if (pos->tag == file_priv && | ||
448 | pos->handle != DRM_KERNEL_CONTEXT) { | ||
449 | if (dev->driver->context_dtor) | ||
450 | dev->driver->context_dtor(dev, | ||
451 | pos->handle); | ||
452 | |||
453 | drm_ctxbitmap_free(dev, pos->handle); | ||
454 | |||
455 | list_del(&pos->head); | ||
456 | kfree(pos); | ||
457 | --dev->ctx_count; | ||
458 | } | ||
459 | } | ||
460 | } | ||
461 | mutex_unlock(&dev->ctxlist_mutex); | ||
443 | 462 | ||
444 | mutex_lock(&dev->struct_mutex); | 463 | mutex_lock(&dev->struct_mutex); |
445 | 464 | ||