summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2019-10-10 09:35:57 +0000
committerNeil Armstrong <narmstrong@baylibre.com>2019-10-10 09:41:36 +0000
commit6a1c38d734899641821ebab935a1b15dd0117e5f (patch)
treef1fbee8681468438a585f2f67b4583373a60aa26
parent87769e6e543357460c038c9577fbf7df94f58af6 (diff)
drm_hwcomposer: platformmeson: fix AFBC 32x8 feature support
Since MALI_GRALLOC_INTFMT_AFBC_BASIC is mandatory even to enable 32x8 block size, do not OR 32x8 and 16x16 overwise the final modifier will be invalid. Change-Id: Ifa20a29e9c012b8ce0ec598d76e26514a61b52c8 Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
-rw-r--r--platform/platformmeson.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/platformmeson.cpp b/platform/platformmeson.cpp
index 58ec5c0..7bde5cd 100644
--- a/platform/platformmeson.cpp
+++ b/platform/platformmeson.cpp
@@ -51,15 +51,16 @@ Importer *Importer::CreateInstance(DrmDevice *drm) {
uint64_t MesonImporter::ConvertGrallocFormatToDrmModifiers(uint64_t flags) {
uint64_t features = 0UL;
- if (flags & MALI_GRALLOC_INTFMT_AFBC_BASIC)
- features |= AFBC_FORMAT_MOD_BLOCK_SIZE_16x16;
+ if (flags & MALI_GRALLOC_INTFMT_AFBC_BASIC) {
+ if (flags & MALI_GRALLOC_INTFMT_AFBC_WIDEBLK)
+ features |= AFBC_FORMAT_MOD_BLOCK_SIZE_32x8;
+ else
+ features |= AFBC_FORMAT_MOD_BLOCK_SIZE_16x16;
+ }
if (flags & MALI_GRALLOC_INTFMT_AFBC_SPLITBLK)
features |= (AFBC_FORMAT_MOD_SPLIT | AFBC_FORMAT_MOD_SPARSE);
- if (flags & MALI_GRALLOC_INTFMT_AFBC_WIDEBLK)
- features |= AFBC_FORMAT_MOD_BLOCK_SIZE_32x8;
-
if (flags & MALI_GRALLOC_INTFMT_AFBC_TILED_HEADERS)
features |= AFBC_FORMAT_MOD_TILED;