intel: teach layout about scanout
diff --git a/icd/intel/layout.c b/icd/intel/layout.c
index 7109666..de1f41e 100644
--- a/icd/intel/layout.c
+++ b/icd/intel/layout.c
@@ -45,6 +45,7 @@
 struct intel_layout_params {
    const struct intel_gpu *gpu;
    const XGL_IMAGE_CREATE_INFO *info;
+   bool scanout;
 
    bool compressed;
 
@@ -462,6 +463,15 @@
    const XGL_FORMAT format = layout->format;
    unsigned valid_tilings = LAYOUT_TILING_ALL;
 
+   /*
+    * From the Sandy Bridge PRM, volume 1 part 2, page 32:
+    *
+    *     "Display/Overlay   Y-Major not supported.
+    *                        X-Major required for Async Flips"
+    */
+   if (params->scanout)
+       valid_tilings &= LAYOUT_TILING_X;
+
    if (info->tiling == XGL_LINEAR_TILING)
        valid_tilings &= LAYOUT_TILING_NONE;
 
@@ -1255,13 +1265,15 @@
  */
 void intel_layout_init(struct intel_layout *layout,
                        const struct intel_dev *dev,
-                       const XGL_IMAGE_CREATE_INFO *info)
+                       const XGL_IMAGE_CREATE_INFO *info,
+                       bool scanout)
 {
    struct intel_layout_params params;
 
    memset(&params, 0, sizeof(params));
    params.gpu = dev->gpu;
    params.info = info;
+   params.scanout = scanout;
 
    /* note that there are dependencies between these functions */
    layout_init_aux(layout, &params);