From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 8/9] drm/i915: treat no fb -> fb as simple flip instead of full mode set Date: Wed, 27 Mar 2013 13:40:56 +0000 Message-ID: <20130327134056.GF4336@cantiga.alporthouse.com> References: <4i0ofvu9ver8x0cwnv44mhxo.1364350143482@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 274BFE60F7 for ; Wed, 27 Mar 2013 06:41:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Mar 27, 2013 at 01:49:47PM +0100, Daniel Vetter wrote: > On Wed, Mar 27, 2013 at 3:09 AM, Jesse Barnes wrote: > > If for example the BIOS fb is too small for the dual pipe config we detect, > > we may have valid timings and such, but no fb. The pfit case also hits this > > path (though currently only fastboots if you hack your mode clock to match). > > But even when the BIOS fb is to small and the BIOS config uses the > pfit, we /should/ have an fb around. Looking a bit closer I think the > confusion stems from you reading out the adjusted mode, but treating > it like the requested mode. I think it'd be much more solid if we > store the read-out mode in the adjusted_mode (won't work otherwise > with hw state cross-checking anyway), and then do two comparisons > here: > > - Does the request mode (plus everything else) match? If so, just do > an fb_set_base call. > - Does the adjusted mode match (plus the entire output routing ofc)? > That means there's either the vga plane or a pfit in-between which we > don't like. If possible we can then play some tricks to avoid the full > modeset. > > The reason that I'm a bit freaked about about your change here is that > in a lot of places we treat crtc->fb == NULL as "no mode set". So I > fear we're breaking a few too many assumptions here with that hack, > and it simply needs more thought about what we should actually check. The check here is why we were so enthusiastic about moving to a pipe_config framework that could match up a configured pipe with an invalid fb and then just exchange the fb. -Chris -- Chris Wilson, Intel Open Source Technology Centre