Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329288
b: refs/heads/master
c: 20d5a54
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Aug 12, 2012
1 parent f1c2e51 commit 6ec179f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 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: 126e9be816e7c0322f5dac994f94d65a8fabcc56
refs/heads/master: 20d5a540e55a29daeef12706f9ee73baf5641c16
18 changes: 0 additions & 18 deletions trunk/drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1956,16 +1956,11 @@ static int i915_forcewake_open(struct inode *inode, struct file *file)
{
struct drm_device *dev = inode->i_private;
struct drm_i915_private *dev_priv = dev->dev_private;
int ret;

if (INTEL_INFO(dev)->gen < 6)
return 0;

ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
return ret;
gen6_gt_force_wake_get(dev_priv);
mutex_unlock(&dev->struct_mutex);

return 0;
}
Expand All @@ -1974,24 +1969,11 @@ static int i915_forcewake_release(struct inode *inode, struct file *file)
{
struct drm_device *dev = inode->i_private;
struct drm_i915_private *dev_priv = dev->dev_private;
int ret;

if (INTEL_INFO(dev)->gen < 6)
return 0;

/*
* It's bad that we can potentially hang userspace if struct_mutex gets
* forever stuck. However, if we cannot acquire this lock it means that
* almost certainly the driver has hung, is not unload-able. Therefore
* hanging here is probably a minor inconvenience not to be seen my
* almost every user.
*/
ret = mutex_lock_interruptible(&dev->struct_mutex);
if (ret)
return ret;

gen6_gt_force_wake_put(dev_priv);
mutex_unlock(&dev->struct_mutex);

return 0;
}
Expand Down

0 comments on commit 6ec179f

Please sign in to comment.