Module: Mesa
Branch: main
Commit: 33de58154f801eea84e5a9cdbda9cb6010e5ed47
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=33de58154f801eea84e5a9cdbda9cb6010e5ed47

Author: Rob Clark <robdcl...@chromium.org>
Date:   Wed Nov  1 10:04:16 2023 -0700

freedreno: Handle DRM_FORMAT_MOD_QCOM_TILED3 import

This is something that we could allocate and export.  So we must import
them as well.

Fixes import failures in 
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers

Signed-off-by: Rob Clark <robdcl...@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25995>

---

 src/gallium/drivers/freedreno/a6xx/fd6_resource.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc 
b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc
index b8f96bee616..dcb412033cd 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc
@@ -322,12 +322,14 @@ fd6_layout_resource_for_modifier(struct fd_resource *rsc, 
uint64_t modifier)
                     PRSC_ARGS(&rsc->b.b));
       }
       return 0;
+   case DRM_FORMAT_MOD_QCOM_TILED3:
    case DRM_FORMAT_MOD_INVALID:
       if (can_do_ubwc(&rsc->b.b)) {
          perf_debug("%" PRSC_FMT
                     ": not UBWC: imported with DRM_FORMAT_MOD_INVALID!",
                     PRSC_ARGS(&rsc->b.b));
       }
+      rsc->layout.tile_mode = fd6_tile_mode(&rsc->b.b);
       return 0;
    default:
       return -1;

Reply via email to