From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:37509 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755471AbcKOKPE (ORCPT ); Tue, 15 Nov 2016 05:15:04 -0500 Subject: Re: [PATCH v2 1/3] drm/i915: Fix cdclk vs. dev_cdclk mess when not recomputing things To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org References: <1479141311-11904-1-git-send-email-ville.syrjala@linux.intel.com> <1479141311-11904-2-git-send-email-ville.syrjala@linux.intel.com> Cc: Mika Kahola , bruno.pagani@ens-lyon.org, Daniel J Blueman , Paul Bolle , Joseph Yasi , stable@vger.kernel.org From: Maarten Lankhorst Message-ID: <293695f2-4c59-81ef-cb17-80017973e0d0@linux.intel.com> Date: Tue, 15 Nov 2016 11:15:00 +0100 MIME-Version: 1.0 In-Reply-To: <1479141311-11904-2-git-send-email-ville.syrjala@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: Op 14-11-16 om 17:35 schreef ville.syrjala@linux.intel.com: > From: Ville Syrjälä > > When we end up not recomputing the cdclk, we need to populate > intel_state->cdclk with the "atomic_cdclk_freq" instead of the > current cdclk_freq. When no pipes are active, the actual cdclk_freq > may be lower than what the configuration of the planes and > pipes would require from the point of view of the software state. > > This fixes bogus WARNS from skl_max_scale() which is trying to check > the plane software state against the cdclk frequency. So any time > it got called during DPMS off for instance, we might have tripped > the warn if the current mode would have required a higher than > minimum cdclk. > > v2: Drop the dev_cdclk stuff (Maarten) > > Cc: Maarten Lankhorst > Cc: Mika Kahola > Cc: bruno.pagani@ens-lyon.org > Cc: Daniel J Blueman > Cc: Paul Bolle > Cc: Joseph Yasi > Tested-by: Paul Bolle (v1) > Tested-by: Joseph Yasi (v1) > Cc: stable@vger.kernel.org > Fixes: 1a617b77658e ("drm/i915: Keep track of the cdclk as if all crtc's were active.") > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98214 > Signed-off-by: Ville Syrjälä > Reviewed-by: Maarten Lankhorst > --- > drivers/gpu/drm/i915/intel_display.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index e48d9571c99d..70f3f0b70263 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -14027,8 +14027,9 @@ static int intel_modeset_checks(struct drm_atomic_state *state) > > DRM_DEBUG_KMS("New cdclk calculated to be atomic %u, actual %u\n", > intel_state->cdclk, intel_state->dev_cdclk); > - } else > + } else { > to_intel_atomic_state(state)->cdclk = dev_priv->atomic_cdclk_freq; > + } > > intel_modeset_clear_plls(state); > > @@ -14129,8 +14130,9 @@ static int intel_atomic_check(struct drm_device *dev, > > if (ret) > return ret; > - } else > - intel_state->cdclk = dev_priv->cdclk_freq; > + } else { > + intel_state->cdclk = dev_priv->atomic_cdclk_freq; > + } > > ret = drm_atomic_helper_check_planes(dev, state); > if (ret) Reviewed-by: Maarten Lankhorst