summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-19 16:52:30 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-20 11:15:37 +0200
commitdf12c6d5ec9b88fc45c672b77dac015327dd8497 (patch)
treeaf9c859549840b8c5fc8b8f9e9a2ca991040212e /drivers/gpu/drm/i915/i915_dma.c
parent55a6662837a5efe48c836bfc3570ace348f3db09 (diff)
downloadlinux-df12c6d5ec9b88fc45c672b77dac015327dd8497.tar.gz
linux-df12c6d5ec9b88fc45c672b77dac015327dd8497.tar.bz2
linux-df12c6d5ec9b88fc45c672b77dac015327dd8497.zip
drm/i915: initialize the context idr unconditionally
It doesn't hurt and it at least prevents us from OOPSing left and right at quite a few places. This also allows us to simplify the code a bit by folding the only line of context_open into the callsite. We obviuosly also need to run the cleanup code unconditionally, too. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 9913a77478a3..9563ab8390e7 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1759,7 +1759,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file)
spin_lock_init(&file_priv->mm.lock);
INIT_LIST_HEAD(&file_priv->mm.request_list);
- i915_gem_context_open(dev, file);
+ idr_init(&file_priv->context_idr);
return 0;
}