backend/drm: remove drm_fb_acquire

Instead, import the buffer into GBM and KMS in drm_fb_import. Also move
the multi-GPU copy there if necessary.
This commit is contained in:
Simon Ser 2020-12-15 12:21:40 +01:00
parent 5ee8b12dc3
commit d3bcd63a40
5 changed files with 144 additions and 146 deletions

View file

@ -135,8 +135,8 @@ static void set_plane_props(struct atomic *atom, struct wlr_drm_backend *drm,
uint32_t id = plane->id;
const union wlr_drm_plane_props *props = &plane->props;
struct wlr_drm_fb *fb = plane_get_next_fb(plane);
uint32_t fb_id = drm_fb_acquire(fb, drm, &plane->mgpu_surf);
if (!fb_id) {
if (!fb->id) {
wlr_log(WLR_ERROR, "Failed to acquire FB");
goto error;
}
@ -147,7 +147,7 @@ static void set_plane_props(struct atomic *atom, struct wlr_drm_backend *drm,
atomic_add(atom, id, props->src_h, (uint64_t)plane->surf.height << 16);
atomic_add(atom, id, props->crtc_w, plane->surf.width);
atomic_add(atom, id, props->crtc_h, plane->surf.height);
atomic_add(atom, id, props->fb_id, fb_id);
atomic_add(atom, id, props->fb_id, fb->id);
atomic_add(atom, id, props->crtc_id, crtc_id);
atomic_add(atom, id, props->crtc_x, (uint64_t)x);
atomic_add(atom, id, props->crtc_y, (uint64_t)y);