drm_hwcomposer: platformhisi: Conditionalize some of the AFBC support
Unfortunately with the AFBC support patches, I validated with
the hikey960 (which has a gralloc that supports AFBC), but not
with the original hikey board (which does not support AFBC).
Since we use the same importer for both boards, conditionalize
the AFBC logic if those values are not defined.
This patch will also need a tweak to the hikey gralloc to add
support for the handle->internal_format reference (which doesn't
currently exist on hikey's gralloc).
Change-Id: I31aea82b321ff7dd7608c6a3522cbc93bb629319
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/platformhisi.cpp b/platformhisi.cpp
index 9413457..d4002f1 100644
--- a/platformhisi.cpp
+++ b/platformhisi.cpp
@@ -70,6 +70,7 @@
return 0;
}
+#ifdef MALI_GRALLOC_INTFMT_AFBC_BASIC
uint64_t HisiImporter::ConvertGrallocFormatToDrmModifiers(uint64_t flags,
bool is_rgb) {
uint64_t features = 0UL;
@@ -95,6 +96,12 @@
return 0;
}
+#else
+uint64_t HisiImporter::ConvertGrallocFormatToDrmModifiers(uint64_t /* flags */,
+ bool /* is_rgb */) {
+ return 0;
+}
+#endif
bool HisiImporter::IsDrmFormatRgb(uint32_t drm_format) {
switch (drm_format) {