From: Jesse Barnes Subject: Re: [PATCH 10/12] drm/i915: Update link training automated test function for Displayport compliance Date: Tue, 22 Jul 2014 14:03:20 -0700 Message-ID: <20140722140320.6a0414b1@jbarnes-desktop> References: <1405365047-6866-1-git-send-email-tprevite@gmail.com> <1405365047-6866-11-git-send-email-tprevite@gmail.com> <20140722061530.GD15237@phenom.ffwll.local> <20140722134059.3dbef8a7@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 510F56E381 for ; Tue, 22 Jul 2014 14:02:06 -0700 (PDT) Received: by mail-pd0-f180.google.com with SMTP id y13so255557pdi.25 for ; Tue, 22 Jul 2014 14:02:06 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Tue, 22 Jul 2014 22:44:54 +0200 Daniel Vetter wrote: > On Tue, Jul 22, 2014 at 10:40 PM, Jesse Barnes wrote: > >> > + /* Set link rate directly */ > >> > + intel_dp->link_bw = rxdata[0]; > >> > + /* Preserve 7:5 when setting lane count */ > >> > + intel_dp->lane_count &= 0xE0; > >> > + intel_dp->lane_count |= rxdata[1]; > >> > >> This won't work - if you change the link config you need to do a full > >> recomputation of the modeset config and a full modeset. No, we dont (yet) > >> have the infrastructure for this, which is why dp is such a pain since we > >> can change the link config once we've decided on something :( > > > > I think that depends on how we're going to structure the code. For > > simply calling the link train functions, it looks like messing with the > > intel_dp->foo fields will roughly do what Todd wants, which is to > > simply try a re-train with a different set of params, ignoring the > > actual fb and pipe configuration. > > > > Or is that what you had in mind? You'd like to see valid data and mode > > timings to drive a given lane count and bw instead? I'm not sure the > > testing spec cares about that; Todd? > > If you change the link_bw then you need to do a full modeset sequence > since that's the only way to convince our hw to switch to the new > clock. The current code in this patch falls short and only retrains > the link. > > But even if we'd do the full modeset the compute_config stage would > overwrite the link parameters again. So the correct way to do this is > to pimp the compute config code to have limits (we might as well > expose them as connector properties while at it for debugging) and > then do a full modeset sequence here. Then we could finally implement > (with a bit more code) the transparent fallback to a different config > if the first one doesn't work. Right, yeah going through the full sequence sounds like it's required for most of the tests based on what Todd tells me, since the test sink will look at the active mode transmitted etc. So the simple re-train and send misc isn't sufficient, even if the training succeeds. -- Jesse Barnes, Intel Open Source Technology Center