aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/atomic.c
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2018-10-08 21:01:30 +0200
committerGitHub <noreply@github.com>2018-10-08 21:01:30 +0200
commit885586a831437c1f9b5bff74fc48e64c2ed9669e (patch)
tree68d4a1d6347d1c872501929df0b6afbf8a87bc1f /backend/drm/atomic.c
parent97049576f7d19534aacc685902b582f9d5ad4e83 (diff)
parentf5a147b739ebd33bc61996a179801775192b19ce (diff)
Merge pull request #1280 from emersion/drm-link-status
backend/drm: add support for the link-status property
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r--backend/drm/atomic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 5c064ac7..ad80f2fd 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -104,7 +104,8 @@ static bool atomic_crtc_pageflip(struct wlr_drm_backend *drm,
drmModeDestroyPropertyBlob(drm->fd, crtc->mode_id);
}
- if (drmModeCreatePropertyBlob(drm->fd, mode, sizeof(*mode), &crtc->mode_id)) {
+ if (drmModeCreatePropertyBlob(drm->fd, mode, sizeof(*mode),
+ &crtc->mode_id)) {
wlr_log_errno(WLR_ERROR, "Unable to create property blob");
return false;
}
@@ -120,6 +121,10 @@ static bool atomic_crtc_pageflip(struct wlr_drm_backend *drm,
struct atomic atom;
atomic_begin(crtc, &atom);
atomic_add(&atom, conn->id, conn->props.crtc_id, crtc->id);
+ if (mode != NULL && conn->props.link_status != 0) {
+ atomic_add(&atom, conn->id, conn->props.link_status,
+ DRM_MODE_LINK_STATUS_GOOD);
+ }
atomic_add(&atom, crtc->id, crtc->props.mode_id, crtc->mode_id);
atomic_add(&atom, crtc->id, crtc->props.active, 1);
set_plane_props(&atom, crtc->primary, crtc->id, fb_id, true);