xf86-video-intel: 2 commits - src/sna/sna_display.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Sep 13 12:08:33 PDT 2015
src/sna/sna_display.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 23986f0a31dbdec2e2086ca898bee43842ab73d4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Sep 13 20:07:35 2015 +0100
sna: Update the last known status timestamp on modeset
If the modeset is successful we know the connector is still alive, so
update its timestamp.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 9a04419..589e2e2 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -953,6 +953,8 @@ static void
sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ /* All attached outputs are valid, so update our timestamps */
+ unsigned now = GetTimeInMillis();
int i;
assert(to_sna_crtc(crtc));
@@ -972,6 +974,7 @@ sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
continue;
__sna_output_dpms(output, DPMSModeOn, false);
+ to_sna_output(output)->last_detect = now;
}
#if XF86_CRTC_VERSION >= 3
commit 717b6208d0d7bdcdacaf30b871216e6084c7205c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Sep 13 20:06:21 2015 +0100
sna: Only update the CRTC mode serial number on success
If the kernel doesn't accept the update, then the CRTC remains in its
previous mode i.e. we should not also touch the modesetting serial
stamp.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 30582f0..9a04419 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1213,9 +1213,10 @@ sna_crtc_apply(xf86CrtcPtr crtc)
output_count, output_count ? output_ids[0] : 0));
ret = drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC, &arg) == 0;
-
- sna_crtc->mode_serial++;
- sna_crtc_force_outputs_on(crtc);
+ if (ret) {
+ sna_crtc->mode_serial++;
+ sna_crtc_force_outputs_on(crtc);
+ }
unblock:
sigio_unblock(sigio);
return ret;
More information about the xorg-commit
mailing list