From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither Date: Wed, 26 Sep 2012 17:25:33 +0200 Message-ID: <20120926152533.GO1980@bremse> References: <1348673271-23891-1-git-send-email-jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by gabe.freedesktop.org (Postfix) with ESMTP id D43CE9F577 for ; Wed, 26 Sep 2012 08:25:40 -0700 (PDT) Received: by lbbgi11 with SMTP id gi11so1158616lbb.36 for ; Wed, 26 Sep 2012 08:25:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1348673271-23891-1-git-send-email-jani.nikula@intel.com> 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: Jani Nikula Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Sep 26, 2012 at 06:27:51PM +0300, Jani Nikula wrote: > The dithering introduced in > > commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf > Author: Adam Jackson > Date: Tue Dec 13 15:41:00 2011 -0800 > > drm/i915/dp: Dither down to 6bpc if it makes the mode fit > > stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the > adjusted mode, while intel_choose_pipe_bpp_dither() determining the color > depth was passed the original mode, without the flag, so it would never > have any effect. However, the BPC was clamped by VBT settings, making > things work by coincidence, until that part was removed in > > commit 4344b813f105a19f793f1fd93ad775b784648b95 > Author: Daniel Vetter > Date: Fri Aug 10 11:10:20 2012 +0200 > > Pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither() to > make INTEL_MODE_DP_FORCE_6BPC have effect. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621 > CC: stable@vger.kernel.org > Signed-off-by: Jani Nikula Awesome piece of debugging here. But can I point you to i9xx_crtc_mode_set, where the same bug exists an ask for v2? Cheers, Daniel > --- > drivers/gpu/drm/i915/intel_display.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 08c3f69..0a9802a 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -4936,7 +4936,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, > intel_crtc_update_cursor(crtc, true); > > /* determine panel color depth */ > - dither = intel_choose_pipe_bpp_dither(crtc, fb, &intel_crtc->bpp, mode); > + dither = intel_choose_pipe_bpp_dither(crtc, fb, &intel_crtc->bpp, > + adjusted_mode); > if (is_lvds && dev_priv->lvds_dither) > dither = true; > > -- > 1.7.9.5 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch