Skip to content

Commit

Permalink
drm/i915: allow userspace forcewake references also on gen7
Browse files Browse the repository at this point in the history
We need this to correctly access registers in the gt power well from
userspace.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
Daniel Vetter authored and Keith Packard committed Jan 24, 2012
1 parent 04115a9 commit 075edca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ static int i915_forcewake_open(struct inode *inode, struct file *file)
struct drm_i915_private *dev_priv = dev->dev_private;
int ret;

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

ret = mutex_lock_interruptible(&dev->struct_mutex);
Expand All @@ -1686,7 +1686,7 @@ 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;

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

/*
Expand Down

0 comments on commit 075edca

Please sign in to comment.