Module: Mesa
Branch: staging/22.3
Commit: ba0e805d96baeb5c54376afd195b417392a7fb1f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba0e805d96baeb5c54376afd195b417392a7fb1f

Author: Dave Airlie <[email protected]>
Date:   Thu Feb  9 12:59:53 2023 +1000

crocus: disable Y tiling for render targets properly.

The old code would disallow linear targets as well which would confuse
things with reimporting dma-bufs.

Fixes: 32728dc66e36 ("crocus: introduce main resource configuration helper.")
Acked-by: Faith Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21209>
(cherry picked from commit 6043f66dd3329c92681fc4be5a1e54e522c1cb80)

---

 .pick_status.json                            | 2 +-
 src/gallium/drivers/crocus/crocus_resource.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 86ef6a79cff..8af1e969192 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -337,7 +337,7 @@
         "description": "crocus: disable Y tiling for render targets properly.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "32728dc66e362a9c01d151d8de5799eb76d6e06b"
     },
diff --git a/src/gallium/drivers/crocus/crocus_resource.c 
b/src/gallium/drivers/crocus/crocus_resource.c
index 7b4d50a6648..4f548eb7364 100644
--- a/src/gallium/drivers/crocus/crocus_resource.c
+++ b/src/gallium/drivers/crocus/crocus_resource.c
@@ -190,9 +190,7 @@ crocus_resource_configure_main(const struct crocus_screen 
*screen,
       tiling_flags = 1 << res->mod_info->tiling;
    } else {
       if (templ->bind & PIPE_BIND_RENDER_TARGET && devinfo->ver < 6) {
-         modifier = I915_FORMAT_MOD_X_TILED;
-         res->mod_info = isl_drm_modifier_get_info(modifier);
-         tiling_flags = 1 << res->mod_info->tiling;
+         tiling_flags &= ~ISL_TILING_Y0_BIT;
       }
       /* Use linear for staging buffers */
       if (templ->usage == PIPE_USAGE_STAGING ||

Reply via email to