backend-drm: pass device through atomic commit handler

The atomic commit is device specific. If we have multiple kms devices, we need
to know which device was used for the atomic commit.

Pass the device instead of the backend through the atomic commit.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
dev
Michael Tretter 3 years ago committed by Daniel Stone
parent 0d967bd7f4
commit d89fcf10cb
  1. 6
      libweston/backend-drm/kms.c

@ -1184,7 +1184,7 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
goto out; goto out;
} }
ret = drmModeAtomicCommit(device->drm.fd, req, flags, b); ret = drmModeAtomicCommit(device->drm.fd, req, flags, device);
drm_debug(b, "[atomic] drmModeAtomicCommit\n"); drm_debug(b, "[atomic] drmModeAtomicCommit\n");
/* Test commits do not take ownership of the state; return /* Test commits do not take ownership of the state; return
@ -1404,8 +1404,8 @@ static void
atomic_flip_handler(int fd, unsigned int frame, unsigned int sec, atomic_flip_handler(int fd, unsigned int frame, unsigned int sec,
unsigned int usec, unsigned int crtc_id, void *data) unsigned int usec, unsigned int crtc_id, void *data)
{ {
struct drm_backend *b = data; struct drm_device *device = data;
struct drm_device *device = b->drm; struct drm_backend *b = device->backend;
struct drm_crtc *crtc; struct drm_crtc *crtc;
struct drm_output *output; struct drm_output *output;
uint32_t flags = WP_PRESENTATION_FEEDBACK_KIND_VSYNC | uint32_t flags = WP_PRESENTATION_FEEDBACK_KIND_VSYNC |

Loading…
Cancel
Save