backprots: fix logic in calling intel_enable_gtt()
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 7 Aug 2013 22:53:17 +0000 (00:53 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 13 Aug 2013 01:12:03 +0000 (18:12 -0700)
The old patch changed the or condition to an and condition which is
wrong. This patch fixes the logic again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/collateral-evolutions/drm/07-intel-gtt/drivers_gpu_drm_i915_i915_gem.patch

index 486693b490e7ae6dd635820fda438f4fce84af45..c1e6acc4255e38524bcbf68e98ab630ea6221725 100644 (file)
@@ -1,18 +1,13 @@
 --- a/drivers/gpu/drm/i915/i915_gem.c
 +++ b/drivers/gpu/drm/i915/i915_gem.c
-@@ -4147,9 +4147,14 @@ i915_gem_init_hw(struct drm_device *dev)
+@@ -4147,8 +4147,10 @@ i915_gem_init_hw(struct drm_device *dev)
        drm_i915_private_t *dev_priv = dev->dev_private;
        int ret;
  
--      if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt())
-+      if (INTEL_INFO(dev)->gen < 6)
-               return -EIO;
 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
-+      if (!intel_enable_gtt())
-+              return -EIO;
+       if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt())
+               return -EIO;
 +#endif
-+
        if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1))
                I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000);