Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318605
b: refs/heads/master
c: df12c6d
h: refs/heads/master
i:
  318603: e3d52b6
v: v3
  • Loading branch information
Daniel Vetter committed Jun 20, 2012
1 parent 1d691ae commit d793687
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55a6662837a5efe48c836bfc3570ace348f3db09
refs/heads/master: df12c6d5ec9b88fc45c672b77dac015327dd8497
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,6 @@ struct dma_buf *i915_gem_prime_export(struct drm_device *dev,
/* i915_gem_context.c */
void i915_gem_context_init(struct drm_device *dev);
void i915_gem_context_fini(struct drm_device *dev);
void i915_gem_context_open(struct drm_device *dev, struct drm_file *file);
void i915_gem_context_close(struct drm_device *dev, struct drm_file *file);
int i915_switch_context(struct intel_ring_buffer *ring,
struct drm_file *file, int to_id);
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/gpu/drm/i915/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,6 @@ void i915_gem_context_fini(struct drm_device *dev)
do_destroy(dev_priv->ring[RCS].default_context);
}

void i915_gem_context_open(struct drm_device *dev, struct drm_file *file)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_file_private *file_priv = file->driver_priv;

if (dev_priv->hw_contexts_disabled)
return;

idr_init(&file_priv->context_idr);
}

static int context_idr_cleanup(int id, void *p, void *data)
{
struct drm_file *file = (struct drm_file *)data;
Expand All @@ -316,12 +305,8 @@ static int context_idr_cleanup(int id, void *p, void *data)

void i915_gem_context_close(struct drm_device *dev, struct drm_file *file)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_file_private *file_priv = file->driver_priv;

if (dev_priv->hw_contexts_disabled)
return;

mutex_lock(&dev->struct_mutex);
idr_for_each(&file_priv->context_idr, context_idr_cleanup, file);
idr_destroy(&file_priv->context_idr);
Expand Down

0 comments on commit d793687

Please sign in to comment.