drm/i915: do not set redundant DP dpms mode
Subsystems (2)
PATCH 1/1 drm/i915: do not set redundant DP dpms mode
Add a check to intel_dp_dpms() to skip setting the DP's DPMS mode if the current mode is the same as the new one.
Signed-off-by Simon Que <[email protected]>
--- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +5 -0
@@ -1311,8 +1311,13 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)struct intel_dp *intel_dp =enc_to_intel_dp (encoder);struct drm_device *dev = encoder->dev;struct drm_i915_private *dev_priv = dev->dev_private; +struct drm_connector *connector;uint32_t dp_reg =I915_READ (intel_dp->output_reg); +list_for_each_entry (connector, &dev->mode_config.connector_list, head) +if (connector->encoder == encoder && connector->dpms == mode) +return ; +if (mode !=DRM_MODE_DPMS_ON ) {ironlake_edp_backlight_off (intel_dp);ironlake_edp_panel_off (intel_dp);
Signature · 1 line
1.7.8.6
Quoted 4 lines · Simon Que
Add a check to
intel_dp_dpms()to skip setting the DP's DPMS mode if the current mode is the same as the new one.Signed-off-by Simon Que <[email protected]>
The modeset rework, merged into 3.7 solves this entire disaster rather neatly ... We won't ever touch the hw if it's already in the desired state.
-Daniel
Quoted 29 lines
--- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)drivers/gpu/drm/i915/intel_dp.c +5
-0@@ -1311,8 +1311,13 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)struct intel_dp *intel_dp =enc_to_intel_dp (encoder);struct drm_device *dev = encoder->dev;struct drm_i915_private *dev_priv = dev->dev_private; +struct drm_connector *connector;uint32_t dp_reg =I915_READ (intel_dp->output_reg); +list_for_each_entry (connector, &dev->mode_config.connector_list, head) +if (connector->encoder == encoder && connector->dpms == mode) +return ; +if (mode !=DRM_MODE_DPMS_ON ) {ironlake_edp_backlight_off (intel_dp);ironlake_edp_panel_off (intel_dp);Signature · 6 lines
1.7.8.6 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch