diff options
author | Damien Lespiau | 2014-02-07 20:12:47 +0100 |
---|---|---|
committer | Daniel Vetter | 2014-02-12 18:52:50 +0100 |
commit | 3d13ef2e2d8bd88e92da6164a63dccc07e55fc9c (patch) | |
tree | de625e9ebc7d5b6f434c4ab0ce0ed1b48175dc8d /drivers/gpu/drm/i915/i915_gem.c | |
parent | drm/i915: Disable SF pipelined attribute fetch for SNB (diff) | |
download | kernel-qcow2-linux-3d13ef2e2d8bd88e92da6164a63dccc07e55fc9c.tar.gz kernel-qcow2-linux-3d13ef2e2d8bd88e92da6164a63dccc07e55fc9c.tar.xz kernel-qcow2-linux-3d13ef2e2d8bd88e92da6164a63dccc07e55fc9c.zip |
drm/i915: Always use INTEL_INFO() to access the device_info structure
If we make sure that all the dev_priv->info usages are wrapped by
INTEL_INFO(), we can easily modify the ->info field to be structure and
not a pointer while keeping the const protection in the INTEL_INFO()
macro.
v2: Rebased onto latest drm-nightly
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index a8a069f97c56..9b77be074e26 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1014,7 +1014,8 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno, struct timespec *timeout, struct drm_i915_file_private *file_priv) { - drm_i915_private_t *dev_priv = ring->dev->dev_private; + struct drm_device *dev = ring->dev; + drm_i915_private_t *dev_priv = dev->dev_private; const bool irq_test_in_progress = ACCESS_ONCE(dev_priv->gpu_error.test_irq_rings) & intel_ring_flag(ring); struct timespec before, now; @@ -1029,7 +1030,7 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno, timeout_expire = timeout ? jiffies + timespec_to_jiffies_timeout(timeout) : 0; - if (dev_priv->info->gen >= 6 && can_wait_boost(file_priv)) { + if (INTEL_INFO(dev)->gen >= 6 && can_wait_boost(file_priv)) { gen6_rps_boost(dev_priv); if (file_priv) mod_delayed_work(dev_priv->wq, |