summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915/intel_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/i915/intel_display.c')
-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);
}