From: Daniel Vetter Subject: Re: [PATCH] drm/i915: do not set redundant DP dpms mode Date: Tue, 23 Oct 2012 22:35:17 +0200 Message-ID: <20121023203517.GU24005@phenom.ffwll.local> References: <1351023526-28825-1-git-send-email-sque@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 205D49F7A1 for ; Tue, 23 Oct 2012 13:34:15 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj13so3104627wib.12 for ; Tue, 23 Oct 2012 13:34:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1351023526-28825-1-git-send-email-sque@chromium.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Simon Que Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Oct 23, 2012 at 01:18:46PM -0700, Simon Que wrote: > 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 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 > --- > drivers/gpu/drm/i915/intel_dp.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index c71e0f0..ba86b4f 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -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); > -- > 1.7.8.6 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch