minigbm: msm: Allow for build-time method to disable DRM_FORMAT_MOD_QCOM_COMPRESSED on NV12

Currently when we allocate a NV12 buffer, it ends up being
created with the DRM_FORMAT_MOD_QCOM_COMPRESSED modifier.

Unfortunately the upstream venus driver doesn't actually
understand drm buffer modifiers. So video decoder output
buffers are written to in uncompressed NV12.

Then when the buffer is set to the GPU or display, we end up
treating the uncompressed NV12 data like compressed data.
Which produces garbage output.

This patch adds a build option which disables UBWC compression
on just NV12 buffers.

A follow up patch to the Android.bp (only in the AOSP tree) will
be made to enable this.

Signed-off-by: John Stultz <>
Change-Id: Ib064ff9f3978bd8847355c5fd1cc9346b551efd8
Reviewed-by: Rob Clark <>
1 file changed