Depending on the gpu driver, gbm_bo_get_format_modifier
may return DRM_FORMAT_MOD_INVALID, which resulted in
empty |modifiers| container passed to WaylandBufferManager.
The empty container resulted in the gpu process being terminated
as long as data validation expects all the three containers
with offsets, strides and modifiers be of the same size.
Thus, in order to fix the issue, store DRM_FORMAT_MOD_INVALID and
check for it on the WaylandBufferManager side. If that value
exists, pass 0 modifier_lo and modifier_hi to zwp dmabuf params
and DCHECK that the size of planes is 1. Otherwise, multiplanar
formats require modifiers.
…_INVALID
Depending on the gpu driver, gbm_bo_get_format_modifier may return DRM_FORMAT_MOD_INVALID, which resulted in empty |modifiers| container passed to WaylandBufferManager.
The empty container resulted in the gpu process being terminated as long as data validation expects all the three containers with offsets, strides and modifiers be of the same size.
Thus, in order to fix the issue, store DRM_FORMAT_MOD_INVALID and check for it on the WaylandBufferManager side. If that value exists, pass 0 modifier_lo and modifier_hi to zwp dmabuf params and DCHECK that the size of planes is 1. Otherwise, multiplanar formats require modifiers.
Bug: 928261 Change-Id: I1e57dc604a616ae77dc88e08e3f65693d6e58818