isl: properly filter supported display modifiers on Gen9+
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 15 Oct 2019 11:37:45 +0000 (14:37 +0300)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Mar 2020 19:17:10 +0000 (19:17 +0000)
Y tiling is supported for display on Gen9+ so don't filter it from the
possible flags.

v2: Drop Yf from display supported tilings on Gen12+ (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4243>

src/intel/isl/isl_gen7.c

index e1feae9b37563c9c68f37ad8d58218492f081b2f..fa2456679684c4f9bd7d3ce3b9bf4086c0c64cfb 100644 (file)
@@ -251,9 +251,19 @@ isl_gen6_filter_tiling(const struct isl_device *dev,
    }
 
    if (info->usage & ISL_SURF_USAGE_DISPLAY_BIT) {
-      /* Before Skylake, the display engine does not accept Y */
-      /* FINISHME[SKL]: Y tiling for display surfaces */
-      *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT);
+      if (ISL_DEV_GEN(dev) >= 12) {
+         *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT |
+                    ISL_TILING_Y0_BIT);
+      } else if (ISL_DEV_GEN(dev) >= 9) {
+         /* Note we let Yf even though it was cleared above. This is just for
+          * completeness.
+          */
+         *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT |
+                    ISL_TILING_Y0_BIT | ISL_TILING_Yf_BIT);
+      } else {
+         /* Before Skylake, the display engine does not accept Y */
+         *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT);
+      }
    }
 
    if (info->samples > 1) {