From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Sanitize prepare_pipes after valleyview_modeset_global_pipes() Date: Wed, 6 Nov 2013 08:33:08 +0100 Message-ID: <20131106073308.GG1775@phenom.ffwll.local> References: <1383683652-32693-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FB6CFA542 for ; Tue, 5 Nov 2013 23:32:42 -0800 (PST) Received: by mail-ea0-f172.google.com with SMTP id r16so4726458ead.17 for ; Tue, 05 Nov 2013 23:32:39 -0800 (PST) Content-Disposition: inline In-Reply-To: <1383683652-32693-1-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Nov 05, 2013 at 10:34:12PM +0200, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > valleyview_modeset_global_pipes() may add pipes that are getting fully > disabled to prepare_pipes bitmask. The rest of the code doesn't expect > this, so clear out any such pipes from the prepare_pipes bitmask. > = > Signed-off-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/intel_display.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index f97e895..ddbef9c 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -9514,10 +9514,14 @@ static int __intel_set_mode(struct drm_crtc *crtc, > * mode set on this crtc. For other crtcs we need to use the > * adjusted_mode bits in the crtc directly. > */ > - if (IS_VALLEYVIEW(dev)) > + if (IS_VALLEYVIEW(dev)) { > valleyview_modeset_global_pipes(dev, &prepare_pipes, > modeset_pipes, pipe_config); > = > + /* may have added more to prepare_pipes than we should */ > + prepare_pipes &=3D ~disable_pipes; > + } I'd have move the full "take disable_pipes out" block from affected_pipes. Afacs there's no need to do it twice. -Daniel > + > for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc) > intel_crtc_disable(&intel_crtc->base); > = > -- = > 1.8.1.5 > = > _______________________________________________ > 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