diff mbox

uxa: Do not change DPMS mode on unconnected outputs

Message ID 1379674600-23138-1-git-send-email-rodrigo.vivi@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Vivi Sept. 20, 2013, 10:56 a.m. UTC
"The operation is in theory redundant, and in the case of Haswell where
we have multiple outputs aliasing to the same encoder, actually harmful."

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030
Credits-to: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
 src/uxa/intel_display.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Daniel Vetter Sept. 23, 2013, 9:37 a.m. UTC | #1
On Fri, Sep 20, 2013 at 07:56:40AM -0300, Rodrigo Vivi wrote:
> "The operation is in theory redundant, and in the case of Haswell where
> we have multiple outputs aliasing to the same encoder, actually harmful."
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030
> Credits-to: Chris Wilson <chris@chris-wilson.co.uk>
> Tested-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

Can we have a testcase for this since this very much looks like a kernel
bug, specifically in intel_connector_dpms?

I think doing a dpms off on all connectors but the one we've just enabled
in kms_flip and then trying to do a few flips to check whether the pipe is
still on should be good enough.

Thanks, Daniel
diff mbox

Patch

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index 7dc0f68..0cb63b3 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -1123,10 +1123,11 @@  intel_output_dpms(xf86OutputPtr output, int dpms)
 				intel_output_dpms_backlight(output,
 							    intel_output->dpms_mode,
 							    dpms);
-			drmModeConnectorSetProperty(mode->fd,
-						    intel_output->output_id,
-						    props->prop_id,
-						    dpms);
+			if (output->crtc)
+				drmModeConnectorSetProperty(mode->fd,
+							    intel_output->output_id,
+							    props->prop_id,
+							    dpms);
 			if (dpms != DPMSModeOff)
 				intel_output_dpms_backlight(output,
 							    intel_output->dpms_mode,