freedreno: Handle DRM_FORMAT_MOD_INVALID in shared code
authorKristian H. Kristensen <hoegsberg@google.com>
Tue, 23 Jun 2020 17:39:14 +0000 (10:39 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 23 Jun 2020 19:10:40 +0000 (19:10 +0000)
commitbf92f041fe58e494e2bc04d4ebf3e3b8bf8487ed
treec7815b51e4f29343879389ef652c04ba7fb66918
parent561aaeeb48e06fa3185638eaee04e2fc665b64a2
freedreno: Handle DRM_FORMAT_MOD_INVALID in shared code

layout_resource_for_modifier() needs to handle DRM_FORMAT_MOD_INVALID
as well, since src/gallium/frontends/dri/dri2.c uses this to indicate
"no modifier" when it's called through the older non-modifier entry
points.

This is similar to 334788d4 ("freedreno: allow INVALID modifier") but
for the generic implementation.

Fixes: 98910626 ("freedreno/a6xx: Implement layout for DRM_FORMAT_MOD_QCOM_COMPRESSED")
Closes: #3154
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5611>
src/gallium/drivers/freedreno/freedreno_resource.c