From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm/i915: Replicate BIOS eDP bpp clamping hack for hsw Date: Tue, 19 Nov 2013 17:01:27 +0100 Message-ID: <20131119160127.GC5794@phenom.ffwll.local> References: <1384756696-10249-1-git-send-email-daniel.vetter@ffwll.ch> <20131119155153.GS7819@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20131119155153.GS7819@intel.com> Sender: stable-owner@vger.kernel.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Daniel Vetter , Intel Graphics Development , stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Nov 19, 2013 at 05:51:54PM +0200, Ville Syrj=E4l=E4 wrote: > On Mon, Nov 18, 2013 at 07:38:16AM +0100, Daniel Vetter wrote: > > Haswell's DDI encoders have their own ->get_config callback and in > >=20 > > commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf > > Author: Jani Nikula > > Date: Mon Oct 21 10:52:07 2013 +0300 > >=20 > > drm/i915/dp: workaround BIOS eDP bpp clamping issue > >=20 > > we've forgotten to replicate this hack. So let's do it that. > >=20 > > Note for backporters: The above commit and all it's depencies need = to > > be backported first. > >=20 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D71049 > > Cc: stable@vger.kernel.org > > Tested-by: G=F6k=E7en Eraslan > > Signed-off-by: Daniel Vetter >=20 > Reviewed-by: Ville Syrj=E4l=E4 Thanks for the review, merged to -fixes. >=20 > Although I might suggest moving the hack into a small function of its > own and calling it from both ddi and dp code. I've considered this, but then 90% of the code is the comment explainin= g what's going on, so I've figured it's better to duplicate this. If we g= row more edp vbt hacks in ->get_config we can reconsider. But I hope not, since atm we have no chance to light up the panel if the bios didn't do= so already :( -Daniel >=20 > > --- > > drivers/gpu/drm/i915/intel_ddi.c | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i91= 5/intel_ddi.c > > index 1591576a6101..330077bcd0bd 100644 > > --- a/drivers/gpu/drm/i915/intel_ddi.c > > +++ b/drivers/gpu/drm/i915/intel_ddi.c > > @@ -1406,6 +1406,26 @@ void intel_ddi_get_config(struct intel_encod= er *encoder, > > default: > > break; > > } > > + > > + if (encoder->type =3D=3D INTEL_OUTPUT_EDP && dev_priv->vbt.edp_bp= p && > > + pipe_config->pipe_bpp > dev_priv->vbt.edp_bpp) { > > + /* > > + * This is a big fat ugly hack. > > + * > > + * Some machines in UEFI boot mode provide us a VBT that has 18 > > + * bpp and 1.62 GHz link bandwidth for eDP, which for reasons > > + * unknown we fail to light up. Yet the same BIOS boots up with > > + * 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as > > + * max, not what it tells us to use. > > + * > > + * Note: This will still be broken if the eDP panel is not lit > > + * up by the BIOS, and thus we can't get the mode at module > > + * load. > > + */ > > + DRM_DEBUG_KMS("pipe has %d bpp for eDP panel, overriding BIOS-pr= ovided max %d bpp\n", > > + pipe_config->pipe_bpp, dev_priv->vbt.edp_bpp); > > + dev_priv->vbt.edp_bpp =3D pipe_config->pipe_bpp; > > + } > > } > > =20 > > static void intel_ddi_destroy(struct drm_encoder *encoder) > > --=20 > > 1.8.4.3 > >=20 > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >=20 > --=20 > Ville Syrj=E4l=E4 > Intel OTC --=20 Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch