i965: When the kernel lacks the LLC check, assume it's present on gen >= 6.
authorEric Anholt <eric@anholt.net>
Wed, 21 Mar 2012 21:35:14 +0000 (14:35 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 12 Apr 2012 01:12:12 +0000 (18:12 -0700)
The param wasn't added until drm-intel-next for 3.4, so we were
missing our various LLC fast-paths.

src/mesa/drivers/dri/intel/intel_screen.c

index 6344d98a31997b112cc432c26940870d694c5f9d..e823792ff93252ede67ab2071c3781fdfc5a2b57 100644 (file)
@@ -770,9 +770,13 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
    intelScreen->hw_must_use_separate_stencil = intelScreen->gen >= 7;
    intelScreen->dri2_has_hiz = INTEL_DRI2_HAS_HIZ_UNKNOWN;
 
-   intelScreen->hw_has_llc =
-      intel_get_boolean(intelScreen->driScrnPriv,
-              I915_PARAM_HAS_LLC);
+   int has_llc = 0;
+   bool success = intel_get_param(intelScreen->driScrnPriv, I915_PARAM_HAS_LLC,
+                                 &has_llc);
+   if (success && has_llc)
+      intelScreen->hw_has_llc = true;
+   else if (!success && intelScreen->gen >= 6)
+      intelScreen->hw_has_llc = true;
 
    intel_override_separate_stencil(intelScreen);