diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2015-08-05 06:37:06 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-08-14 11:50:33 -0400 |
commit | 4d688a2a15a52225289754627fc3a35f68c125ec (patch) | |
tree | d682a3437db2b9881d5661feab15cda46bca820a /drivers/gpu/drm/i915/intel_sdvo.c | |
parent | 4d20cd860bbe908ef62aa4673eeac8f8f2c43735 (diff) |
drm/i915: Get rid of dpms handling.
This is now done completely atomically.
Keep connectors_active for now, but make it mirror crtc_state->active.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 8911e0e417ee..c98098e884cc 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -1508,51 +1508,6 @@ static void intel_enable_sdvo(struct intel_encoder *encoder) | |||
1508 | intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo->attached_output); | 1508 | intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo->attached_output); |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | /* Special dpms function to support cloning between dvo/sdvo/crt. */ | ||
1512 | static int intel_sdvo_dpms(struct drm_connector *connector, int mode) | ||
1513 | { | ||
1514 | struct drm_crtc *crtc; | ||
1515 | struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); | ||
1516 | |||
1517 | /* dvo supports only 2 dpms states. */ | ||
1518 | if (mode != DRM_MODE_DPMS_ON) | ||
1519 | mode = DRM_MODE_DPMS_OFF; | ||
1520 | |||
1521 | if (mode == connector->dpms) | ||
1522 | return 0; | ||
1523 | |||
1524 | connector->dpms = mode; | ||
1525 | |||
1526 | /* Only need to change hw state when actually enabled */ | ||
1527 | crtc = intel_sdvo->base.base.crtc; | ||
1528 | if (!crtc) { | ||
1529 | intel_sdvo->base.connectors_active = false; | ||
1530 | return 0; | ||
1531 | } | ||
1532 | |||
1533 | /* We set active outputs manually below in case pipe dpms doesn't change | ||
1534 | * due to cloning. */ | ||
1535 | if (mode != DRM_MODE_DPMS_ON) { | ||
1536 | intel_sdvo_set_active_outputs(intel_sdvo, 0); | ||
1537 | if (0) | ||
1538 | intel_sdvo_set_encoder_power_state(intel_sdvo, mode); | ||
1539 | |||
1540 | intel_sdvo->base.connectors_active = false; | ||
1541 | |||
1542 | intel_crtc_update_dpms(crtc); | ||
1543 | } else { | ||
1544 | intel_sdvo->base.connectors_active = true; | ||
1545 | |||
1546 | intel_crtc_update_dpms(crtc); | ||
1547 | |||
1548 | if (0) | ||
1549 | intel_sdvo_set_encoder_power_state(intel_sdvo, mode); | ||
1550 | intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo->attached_output); | ||
1551 | } | ||
1552 | |||
1553 | return 0; | ||
1554 | } | ||
1555 | |||
1556 | static enum drm_mode_status | 1511 | static enum drm_mode_status |
1557 | intel_sdvo_mode_valid(struct drm_connector *connector, | 1512 | intel_sdvo_mode_valid(struct drm_connector *connector, |
1558 | struct drm_display_mode *mode) | 1513 | struct drm_display_mode *mode) |
@@ -2190,7 +2145,7 @@ done: | |||
2190 | } | 2145 | } |
2191 | 2146 | ||
2192 | static const struct drm_connector_funcs intel_sdvo_connector_funcs = { | 2147 | static const struct drm_connector_funcs intel_sdvo_connector_funcs = { |
2193 | .dpms = intel_sdvo_dpms, | 2148 | .dpms = drm_atomic_helper_connector_dpms, |
2194 | .detect = intel_sdvo_detect, | 2149 | .detect = intel_sdvo_detect, |
2195 | .fill_modes = drm_helper_probe_single_connector_modes, | 2150 | .fill_modes = drm_helper_probe_single_connector_modes, |
2196 | .set_property = intel_sdvo_set_property, | 2151 | .set_property = intel_sdvo_set_property, |