summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-11-04 08:05:28 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2013-11-04 08:05:28 +0100
commit9b944add91926d0cb8f21ee30f6393df8452e1c3 (patch)
treeedde584a7495b758a67e4232106a792fae047dcf
parenta11d71a987e4be099d87c21b31e7fa9f24eaa6ca (diff)
downloadkmscon-9b944add91926d0cb8f21ee30f6393df8452e1c3.tar.gz
kmscon-9b944add91926d0cb8f21ee30f6393df8452e1c3.tar.bz2
kmscon-9b944add91926d0cb8f21ee30f6393df8452e1c3.zip
uterm: drm: set VIDEO_HOTPLUG on wakeup
Be more verbose during wake-up and set VIDEO_HOTPLUG so we force the hotplug-check. I don't know why it worked until now, but we definitely need to force it as we have no idea what display-status changed. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/uterm_drm_shared.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uterm_drm_shared.c b/src/uterm_drm_shared.c
index 75830f3..e3b7d8d 100644
--- a/src/uterm_drm_shared.c
+++ b/src/uterm_drm_shared.c
@@ -658,6 +658,8 @@ int uterm_drm_video_hotplug(struct uterm_video *video,
if (!video_is_awake(video) || !video_need_hotplug(video))
return 0;
+ log_debug("testing DRM hotplug status");
+
res = drmModeGetResources(vdrm->fd);
if (!res) {
log_err("cannot retrieve drm resources");
@@ -728,7 +730,7 @@ int uterm_drm_video_wake_up(struct uterm_video *video)
return -EACCES;
}
- video->flags |= VIDEO_AWAKE;
+ video->flags |= VIDEO_AWAKE | VIDEO_HOTPLUG;
ret = uterm_drm_video_hotplug(video, true);
if (ret) {
drmDropMaster(vdrm->fd);