From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 4/9] drm/i915: Retrieve the current mode upon KMS takeover v2 Date: Wed, 27 Mar 2013 08:52:22 -0700 Message-ID: <20130327085222.31d9ecfd@jbarnes-desktop> References: <1364340792-7278-1-git-send-email-jbarnes@virtuousgeek.org> <1364340792-7278-5-git-send-email-jbarnes@virtuousgeek.org> <20130327001347.GG9021@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy6-pub.bluehost.com (oproxy6-pub.bluehost.com [67.222.54.6]) by gabe.freedesktop.org (Postfix) with SMTP id 3EBBCE6377 for ; Wed, 27 Mar 2013 08:52:12 -0700 (PDT) In-Reply-To: <20130327001347.GG9021@phenom.ffwll.local> 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, 27 Mar 2013 01:13:48 +0100 Daniel Vetter wrote: > On Tue, Mar 26, 2013 at 04:33:07PM -0700, Jesse Barnes wrote: > > Read the current hardware state to retrieve the active mode and populate > > our CRTC config if that mode matches our presumptions. > > > > v2: check that get_hw_state gave us a valid pipe (Imre) > > add clock_get for ILK+ (Jesse) > > > > Signed-off-by: Chris Wilson > > Please preheat your wrath-dispenser ... > > Atm the mode retrieval logic is smashed into setup_hw_state. Imo this > needs to be part of the general hw state readout, and for paranoia needs > to be of the usual cross-checking after each modeset. I was thinking about this last night too; I don't like reading the state in the fb layer either, it really belongs in intel_display somewhere. > Some later patches from my pipe_config series (after the pieces just > resend) add some basic infrastructure for this, including lax matching > ruels (e.g. for the clock cross-checking after a modeset, since we don't > yet put the _real_ hw dotclock into adjusted_mode->clock). I'll check it out. Thanks, -- Jesse Barnes, Intel Open Source Technology Center