Merge tag 'drm-intel-next-2022-10-28' of git://anongit.freedesktop.org/drm/drm-intel...
[linux-block.git] / drivers / gpu / drm / i915 / display / intel_fb.c
index eefa33c555acad61a958f2b6ee3e0fc327690510..63137ae5ab21779c862b8ec1c527b605da3925fc 100644 (file)
@@ -300,6 +300,19 @@ static bool plane_caps_contain_all(u8 caps, u8 mask)
        return (caps & mask) == mask;
 }
 
+/**
+ * intel_fb_is_tiled_modifier: Check if a modifier is a tiled modifier type
+ * @modifier: Modifier to check
+ *
+ * Returns:
+ * Returns %true if @modifier is a tiled modifier.
+ */
+bool intel_fb_is_tiled_modifier(u64 modifier)
+{
+       return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps,
+                                     INTEL_PLANE_CAP_TILING_MASK);
+}
+
 /**
  * intel_fb_is_ccs_modifier: Check if a modifier is a CCS modifier type
  * @modifier: Modifier to check