Draft: gbm,v3d: Force linear usage/modifiers for old APIs
Old buffer management APIs had no ways to share the information
about modifiers. And I assume only LINEAR was supported that days.
(otherwise collisions would appear).
After modifier sharing APIs was implemented, some of drivers
started to use "select the best modifier for specified use"
approach. But old applications started to fail.
Some of drivers implemented workaround for such cases, e.g (lima) to allow
old APPs work as before but in a cost of removing select best modifier
approach.
Another drivers e.g. v3d do not have such workarounds, making those
apps display artifacts on the screen (tiled instead of linear or vise versa).
After this change gbm_bo_create() will always allocate LINEAR buffer,
and drivers should be modified to select LINEAR when DRM_FORMAT_MOD_INVALID
is imported.
For "select best modifier" approach APPs should use new
gbm_{bo,surface}_create_with_modifiers2, with the proper USE flag
and NULL modifiers list.
Edited by Roman Stratiienko