Some layers have pixel format that aren't supported by a hardware. In
such case it is better to reject plane that doesn't supports such
format, so we could handle it in future, rather than accepting it,
passing to the kernel side and failing whole composition.
Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
ALOGE("Expected a valid blend mode on plane %d", plane->id());
}
+ uint32_t format = layer->buffer->format;
+ if (!plane->IsFormatSupported(format)) {
+ ALOGE("Plane %d does not supports %c%c%c%c format", plane->id(), format,
+ format >> 8, format >> 16, format >> 24);
+ return -EINVAL;
+ }
+
return ret;
}