From 334788d4cc9bb8a0a6b3166e609638687efa0f3f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 13 Feb 2020 10:26:08 -0800 Subject: [PATCH] freedreno: allow INVALID modifier Re-allow INVALID modifier in import path. The legacy import path (createImageFromFds()), which is used by android, uses the INVALID modifier. Previously we would ignore this and just setup the imported buffer as linear. Restore this behavior to unbreak the legacy import path. Fixes: 9891062642a freedreno/a6xx: Implement layout for DRM_FORMAT_MOD_QCOM_COMPRESSED Signed-off-by: Rob Clark Tested-by: Marge Bot Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c index 2018c3afdd9..30a42ea557e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c @@ -199,6 +199,7 @@ fd6_layout_resource_for_modifier(struct fd_resource *rsc, uint64_t modifier) case DRM_FORMAT_MOD_QCOM_COMPRESSED: return fill_ubwc_buffer_sizes(rsc); case DRM_FORMAT_MOD_LINEAR: + case DRM_FORMAT_MOD_INVALID: return 0; default: return -1; -- 2.30.2