From: Jesse Barnes Subject: Re: [PATCH] drm/i915: compute masks of crtcs affected in set_mode Date: Wed, 5 Sep 2012 11:09:41 -0700 Message-ID: <20120905110941.0aa7de35@jbarnes-desktop> References: <1345403595-9678-51-git-send-email-daniel.vetter@ffwll.ch> <1346236444-31640-1-git-send-email-daniel.vetter@ffwll.ch> 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 037A1A0305 for ; Wed, 5 Sep 2012 11:10:00 -0700 (PDT) In-Reply-To: <1346236444-31640-1-git-send-email-daniel.vetter@ffwll.ch> 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 Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, 29 Aug 2012 12:34:04 +0200 Daniel Vetter wrote: > This is definetely a bit more generic than currently required, but > if we keep track of all crtcs that need to be disabled/enable (because > they loose an encoder or something similar), crtcs that get completely > disabled and those that we need to do an actual mode change on nicely > prepares us for global modeset operations on multiple crtcs. > > The only big thing missing here would be a global resource allocation > step (for e.g. pch plls), which would equally frob these bitmasks if > e.g. a crtc only needs a new pll. > > These masks aren't yet put to use in this patch, this will follow in the > next one. > > v2-v5: Fix up the computations for good (hopefully). > > v6: Fixup a confusion reported by Damien Lespiau: I've conserved the > (imo braindead) behaviour of the crtc helper to disable _any_ > disconnected outputs if we do a modeset, even when that newly disabled > connector isn't connected to the crtc being changed by the modeset. > > The effect of that is that we could disable an arbitrary number of > unrelated crtcs, which I haven't taken into account when writing this > code. Fix this up. Might not need to clean it up here though, since the only time that should matter is during the first mode set after a power on or resume when a superfluous CRTC might be enabled. And with the new hw state readout, we can fix that up. You choose though. Reviewed-by: Jesse Barnes -- Jesse Barnes, Intel Open Source Technology Center