summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gralloc4/src/aidl/GrallocAllocator.cpp3
-rw-r--r--gralloc4/src/core/format_info.cpp2
-rw-r--r--gralloc4/src/core/mali_gralloc_formats.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/gralloc4/src/aidl/GrallocAllocator.cpp b/gralloc4/src/aidl/GrallocAllocator.cpp
index 8e82036..2b01b80 100644
--- a/gralloc4/src/aidl/GrallocAllocator.cpp
+++ b/gralloc4/src/aidl/GrallocAllocator.cpp
@@ -154,12 +154,13 @@ ndk::ScopedAStatus GrallocAllocator::allocate2(
return ndk::ScopedAStatus::ok();
}
+// TODO(b/315883761): isSupported should return false for unknown-to-HAL usage
ndk::ScopedAStatus GrallocAllocator::isSupported(
const AidlAllocator::BufferDescriptorInfo& descriptor, bool* result) {
buffer_descriptor_t bufferDescriptor = decodeBufferDescriptorInfo(descriptor);
int isBufferDescriptorSupported = arm::allocator::common::isSupported(&bufferDescriptor);
- *result = isBufferDescriptorSupported;
+ *result = (isBufferDescriptorSupported == 0);
if (isBufferDescriptorSupported) {
MALI_GRALLOC_LOGV("Allocation for the given description will not succeed. error %d",
diff --git a/gralloc4/src/core/format_info.cpp b/gralloc4/src/core/format_info.cpp
index 0b07879..b9ddbf2 100644
--- a/gralloc4/src/core/format_info.cpp
+++ b/gralloc4/src/core/format_info.cpp
@@ -156,7 +156,7 @@ const format_ip_support_t formats_ip_support[] = {
{ .id = MALI_GRALLOC_FORMAT_INTERNAL_Y410, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_LIN, .gpu_wr = F_LIN|F_AFBC, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_NONE, },
/* Other */
{ .id = MALI_GRALLOC_FORMAT_INTERNAL_RAW16, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_LIN, .gpu_wr = F_NONE, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_LIN, },
- { .id = MALI_GRALLOC_FORMAT_INTERNAL_RAW12, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_NONE, .gpu_wr = F_NONE, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_LIN, },
+ { .id = MALI_GRALLOC_FORMAT_INTERNAL_RAW12, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_LIN, .gpu_wr = F_NONE, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_LIN, },
{ .id = MALI_GRALLOC_FORMAT_INTERNAL_RAW10, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_LIN, .gpu_wr = F_NONE, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_LIN, },
{ .id = MALI_GRALLOC_FORMAT_INTERNAL_BLOB, .cpu_rd = F_LIN, .cpu_wr = F_LIN, .gpu_rd = F_LIN, .gpu_wr = F_LIN, .dpu_rd = F_NONE, .dpu_wr = F_NONE, .dpu_aeu_wr = F_NONE, .vpu_rd = F_NONE, .vpu_wr = F_NONE, .cam_wr = F_LIN, },
/* Depth and Stencil */
diff --git a/gralloc4/src/core/mali_gralloc_formats.cpp b/gralloc4/src/core/mali_gralloc_formats.cpp
index 4bcc9ce..e36e27d 100644
--- a/gralloc4/src/core/mali_gralloc_formats.cpp
+++ b/gralloc4/src/core/mali_gralloc_formats.cpp
@@ -1502,7 +1502,7 @@ uint64_t mali_gralloc_select_format(const uint64_t req_format,
/* Reject if usage specified is outside white list of valid usages. */
if (type != MALI_GRALLOC_FORMAT_TYPE_INTERNAL && (usage & (~VALID_USAGE)) != 0)
{
- MALI_GRALLOC_LOGE("Invalid usage specified: %s 0x%" PRIx64, describe_usage(usage).c_str(), usage);
+ MALI_GRALLOC_LOGW("Invalid usage specified: %s 0x%" PRIx64, describe_usage(usage).c_str(), usage);
}
/* TODO: Make a function for finding formats that should be allocated as the request format */