chiark / gitweb /
terminal/drm: clear 'applied' flag when changing state
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 2 Oct 2014 16:51:29 +0000 (18:51 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 3 Oct 2014 13:57:00 +0000 (15:57 +0200)
If a pipe is enabled/disabled, we have to clear crtc->applied of the
linked CRTC. Otherwise, we will not run a deep modeset, but leave the crtc
in the pre-configured state.

src/libsystemd-terminal/grdev-drm.c

index f01df1dae269102da0965fac2eef3285b6b3dbb9..232321c0e25b2792a46d6c4c862af67848aefee8 100644 (file)
@@ -1549,9 +1549,23 @@ static grdev_fb *grdrm_pipe_target(grdev_pipe *basepipe) {
         return basepipe->back;
 }
 
+static void grdrm_pipe_enable(grdev_pipe *basepipe) {
+        grdrm_pipe *pipe = grdrm_pipe_from_base(basepipe);
+
+        pipe->crtc->applied = false;
+}
+
+static void grdrm_pipe_disable(grdev_pipe *basepipe) {
+        grdrm_pipe *pipe = grdrm_pipe_from_base(basepipe);
+
+        pipe->crtc->applied = false;
+}
+
 static const grdev_pipe_vtable grdrm_pipe_vtable = {
         .free                   = grdrm_pipe_free,
         .target                 = grdrm_pipe_target,
+        .enable                 = grdrm_pipe_enable,
+        .disable                = grdrm_pipe_disable,
 };
 
 /*