Commit 6b1c087b authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915: document why dvo/sdvo/crt need a special dpms function

In the cloned case, changing just one output but keeping the other, the
pipe state won't change and intel_crtc_update_dpms will be a nop, but we
still need to update the dpms state of the output being changed.

Only dvo, sdvo and crt are cloneable, so only those three have special
dpms functions.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent eccb140b
...@@ -149,7 +149,7 @@ static void intel_enable_crt(struct intel_encoder *encoder) ...@@ -149,7 +149,7 @@ static void intel_enable_crt(struct intel_encoder *encoder)
intel_crt_set_dpms(encoder, crt->connector->base.dpms); intel_crt_set_dpms(encoder, crt->connector->base.dpms);
} }
/* Special dpms function to support cloning between dvo/sdvo/crt. */
static void intel_crt_dpms(struct drm_connector *connector, int mode) static void intel_crt_dpms(struct drm_connector *connector, int mode)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
...@@ -180,6 +180,8 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) ...@@ -180,6 +180,8 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode)
else else
encoder->connectors_active = true; encoder->connectors_active = true;
/* We call connector dpms manually below in case pipe dpms doesn't
* change due to cloning. */
if (mode < old_dpms) { if (mode < old_dpms) {
/* From off to on, enable the pipe first. */ /* From off to on, enable the pipe first. */
intel_crtc_update_dpms(crtc); intel_crtc_update_dpms(crtc);
......
...@@ -180,6 +180,7 @@ static void intel_enable_dvo(struct intel_encoder *encoder) ...@@ -180,6 +180,7 @@ static void intel_enable_dvo(struct intel_encoder *encoder)
intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true); intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
} }
/* Special dpms function to support cloning between dvo/sdvo/crt. */
static void intel_dvo_dpms(struct drm_connector *connector, int mode) static void intel_dvo_dpms(struct drm_connector *connector, int mode)
{ {
struct intel_dvo *intel_dvo = intel_attached_dvo(connector); struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
...@@ -201,6 +202,8 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode) ...@@ -201,6 +202,8 @@ static void intel_dvo_dpms(struct drm_connector *connector, int mode)
return; return;
} }
/* We call connector dpms manually below in case pipe dpms doesn't
* change due to cloning. */
if (mode == DRM_MODE_DPMS_ON) { if (mode == DRM_MODE_DPMS_ON) {
intel_dvo->base.connectors_active = true; intel_dvo->base.connectors_active = true;
......
...@@ -1416,6 +1416,7 @@ static void intel_enable_sdvo(struct intel_encoder *encoder) ...@@ -1416,6 +1416,7 @@ static void intel_enable_sdvo(struct intel_encoder *encoder)
intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo->attached_output); intel_sdvo_set_active_outputs(intel_sdvo, intel_sdvo->attached_output);
} }
/* Special dpms function to support cloning between dvo/sdvo/crt. */
static void intel_sdvo_dpms(struct drm_connector *connector, int mode) static void intel_sdvo_dpms(struct drm_connector *connector, int mode)
{ {
struct drm_crtc *crtc; struct drm_crtc *crtc;
...@@ -1437,6 +1438,8 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode) ...@@ -1437,6 +1438,8 @@ static void intel_sdvo_dpms(struct drm_connector *connector, int mode)
return; return;
} }
/* We set active outputs manually below in case pipe dpms doesn't change
* due to cloning. */
if (mode != DRM_MODE_DPMS_ON) { if (mode != DRM_MODE_DPMS_ON) {
intel_sdvo_set_active_outputs(intel_sdvo, 0); intel_sdvo_set_active_outputs(intel_sdvo, 0);
if (0) if (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment