summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-01-24 06:11:03 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-01-24 06:11:03 +0000
commit73fc589d8b333c8d892a61f7dac8b5c279790fe2 (patch)
tree2c8e21f16421b2f33a50e1b92012be46a5bcfc90 /sys/dev/pci/drm
parentc51bf53529725fc79ccbcfe5faf6b427237c2883 (diff)
drm/i915: Only apply DPMS to the encoder if enabled
From Chris Wilson aee8722c71db885fd3a617a9866f63b7165d93e0 in ubuntu 3.8 c9976dcf55c8aaa7037427b239f15e5acfc01a3a in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915/intel_display.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/i915/intel_display.c b/sys/dev/pci/drm/i915/intel_display.c
index 7b014a9f474..019ce41cb5f 100644
--- a/sys/dev/pci/drm/i915/intel_display.c
+++ b/sys/dev/pci/drm/i915/intel_display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_display.c,v 1.25 2014/01/24 04:05:06 jsg Exp $ */
+/* $OpenBSD: intel_display.c,v 1.26 2014/01/24 06:11:02 jsg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
@@ -4008,8 +4008,6 @@ static void intel_connector_check_state(struct intel_connector *connector)
* consider. */
void intel_connector_dpms(struct drm_connector *connector, int mode)
{
- struct intel_encoder *encoder = intel_attached_encoder(connector);
-
/* All the simple cases only support two dpms states. */
if (mode != DRM_MODE_DPMS_ON)
mode = DRM_MODE_DPMS_OFF;
@@ -4020,10 +4018,8 @@ void intel_connector_dpms(struct drm_connector *connector, int mode)
connector->dpms = mode;
/* Only need to change hw state when actually enabled */
- if (encoder->base.crtc)
- intel_encoder_dpms(encoder, mode);
- else
- WARN_ON(encoder->connectors_active != false);
+ if (connector->encoder)
+ intel_encoder_dpms(to_intel_encoder(connector->encoder), mode);
intel_modeset_check_state(connector->dev);
}