From: Chris Wilson Subject: Re: [PATCH] drm/i915: fix lane bandwidth capping for DP 1.2 sinks Date: Tue, 9 Jul 2013 14:45:03 +0100 Message-ID: <20130709134503.GE8571@cantiga.alporthouse.com> References: <1373366437-15517-1-git-send-email-imre.deak@intel.com> <1373374062.7984.17.camel@intelbox> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (unknown [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 937D7E5C4F for ; Tue, 9 Jul 2013 06:45:10 -0700 (PDT) Received: from fireflyinternet.com (unverified [87.106.93.118]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 129483622-1500050 for ; Tue, 09 Jul 2013 14:45:05 +0100 Content-Disposition: inline In-Reply-To: <1373374062.7984.17.camel@intelbox> 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: Imre Deak Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Tue, Jul 09, 2013 at 03:47:42PM +0300, Imre Deak wrote: > On Tue, 2013-07-09 at 14:35 +0200, Daniel Vetter wrote: > > On Tue, Jul 9, 2013 at 12:40 PM, Imre Deak wrote: > > > DP 1.2 compatible displays may report a 5.4Gbps maximum bandwidth which > > > the driver will treat as an invalid value and use 1.62Gbps instead. Fix > > > this by capping to 2.7Gbps anything beyond the DP 1.1 bandwidth range. > > > > > > Signed-off-by: Imre Deak > > > --- > > > drivers/gpu/drm/i915/intel_dp.c | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > > > index 11eb697..c6dd61f 100644 > > > --- a/drivers/gpu/drm/i915/intel_dp.c > > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > > @@ -71,11 +71,16 @@ intel_dp_max_link_bw(struct intel_dp *intel_dp) > > > { > > > int max_link_bw = intel_dp->dpcd[DP_MAX_LINK_RATE]; > > > > > > + if (max_link_bw > DP_LINK_BW_2_7) > > > + return DP_LINK_BW_2_7; > > > + > > > switch (max_link_bw) { > > > case DP_LINK_BW_1_62: > > > case DP_LINK_BW_2_7: > > > > Shouldn't we just add a new case for 5.4 GHz and cap it appropriately. > > As is we'll eat any bogus value > BW_2_7 ... > > I thought that this is more future proof. We would add proper 5.4 > support as part of a bigger 1.2 enabling work, having there a similar > capping to BW_5_4 for post DP 1.2 sinks. Presuming of course that they don't introduce a new low power low frequency update using a randomly high dpcd value of, for example, 0xf. Hence warning and going with the lowest supported value. -Chris -- Chris Wilson, Intel Open Source Technology Centre