Igalia / chromium

Old repo. See https://crbug.com/578890 instead.
https://chromium.googlesource.com/chromium/src.git
BSD 3-Clause "New" or "Revised" License
115 stars 16 forks source link

[DoNotCarryForward] [ozone/wayland] Pass 0 modifier on DRM_FORMAT_MOD… #528

Closed msisov closed 5 years ago

msisov commented 5 years ago

…_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