Alex Villacís Lasso c3590cea72 renderer/native: Fallback to non-planar API if gbm_bo_get_handle_for_plane fails
Commit c0d9b08ef9bf2be865aad9bf1bc74ba24c655d9f replaced the old GBM API calls
with the multi-plane GBM API. However, the call to gbm_bo_get_handle_for_plane
fails for some DRI drivers (in particular i915). Due to missing error checks,
the subsequent call to drmModeAddFB[2] fails and the screen output locks up.

This commit adds the missing error checks and falls back to the old GBM API
(non-planar) if necessary.

v5: test success of gbm_bo_get_handle_for_plane instead of errno

This commit adopts solution proposed by Daniel van Vugt to check the return
value of gbm_bo_get_handle_for_plane on plane 0 and fall back to old
non-planar method if the call fails. This removes the errno check (for
ENOSYS) that could abort if mesa ever sets a different value.

Related to: https://gitlab.gnome.org/GNOME/mutter/issues/127

(cherry picked from commit f7af32a3eaefabbea3ebbda3a93eff98dd105ab9)
2019-02-11 13:40:10 -05:00
2015-07-06 00:52:18 -07:00
2018-04-10 17:58:12 +02:00
2017-05-11 13:45:44 +02:00
2016-04-27 20:37:47 +02:00
2018-07-18 23:12:51 +02:00
Description
91 MiB
Languages
C 98.9%
Meson 0.7%
Python 0.3%