summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gbm/backends/dri/gbm_dri.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 99396f658f2..8d7e4babc3a 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -681,6 +681,12 @@ gbm_dri_bo_get_handle_for_plane(struct gbm_bo *_bo, int plane)
ret.s32 = -1;
if (!dri->image || dri->image->base.version < 13 || !dri->image->fromPlanar) {
+ /* Preserve legacy behavior if plane is 0 */
+ if (plane == 0) {
+ /* NOTE: return _bo->handle, *NOT* bo->handle which is invalid at this point */
+ return _bo->handle;
+ }
+
errno = ENOSYS;
return ret;
}