drm-buffer-gbm: Do not call ensure_fb_id from lock_front
When preparing a frame for scanout on a secondary GPU, calling meta_drm_buffer_gbm_ensure_fb_id for the primary GPU device is unnecessary and potentially harmful. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3389 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3674>
This commit is contained in:
parent
8f08e39e00
commit
40950f99b3
2 changed files with 12 additions and 1 deletions
|
@ -186,7 +186,7 @@ lock_front_buffer (MetaDrmBufferGbm *buffer_gbm,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
return meta_drm_buffer_gbm_ensure_fb_id (META_DRM_BUFFER (buffer_gbm), error);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MetaDrmBufferGbm *
|
||||
|
|
|
@ -1372,6 +1372,17 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
#endif
|
||||
}
|
||||
|
||||
if (!meta_drm_buffer_ensure_fb_id (onscreen_native->gbm.next_fb, &error))
|
||||
{
|
||||
g_warning ("Failed to ensure KMS FB ID on %s: %s",
|
||||
meta_device_file_get_path (render_device_file),
|
||||
error->message);
|
||||
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we changed EGL context, cogl will have the wrong idea about what is
|
||||
* current, making it fail to set it when it needs to. Avoid that by making
|
||||
|
|
Loading…
Reference in a new issue