Handle secondary GPU reset

On a multi-gpu setup, a reset of the secondary GPU was detected
but not properly handled. This fixes that by recreating the mgpu renderer.
This commit is contained in:
Abilio Costa 2024-06-08 18:47:10 +01:00 committed by Abílio Costa
parent 213bd88b4c
commit 6aca7f9151
6 changed files with 26 additions and 6 deletions

View file

@ -666,7 +666,7 @@ static bool drm_connector_state_update_primary_fb(struct wlr_drm_connector *conn
return false;
}
local_buf = drm_surface_blit(&plane->mgpu_surf, source_buf);
local_buf = drm_surface_blit(drm, &plane->mgpu_surf, source_buf);
if (local_buf == NULL) {
return false;
}
@ -1048,7 +1048,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
return false;
}
local_buf = drm_surface_blit(&plane->mgpu_surf, buffer);
local_buf = drm_surface_blit(drm, &plane->mgpu_surf, buffer);
if (local_buf == NULL) {
return false;
}