backends/drm: change how EglGbmLayerSurface works

Xaver Hugl requested to merge work/zamundaaa/format-choosing into master
  • made the buffer target constant, there is no use case for having it dynamic
  • methods modify less state, which hopefully makes the code a little bit easier to follow
  • when creating the gbm surface, test if the buffer can be imported to kms before accepting the format. Should help with issues like #121 (closed)
  • which multi gpu import path is used is decided directly when the gbm surface is created
  • instead of choosing a format and then falling back to CPU copy if necessary, test the whole path when choosing a format. 10 or 8 bpc formats with dmabuf are preferred, then 10 or 8 bpc with CPU copy, then any other format
  • don't accept any formats below 8 bpc. We could fall back to them if necessary, but in practice noone wants or relies on 5/6bpc and all drivers need to support XRGB8888 anyways

Merge request reports