From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 3/5] drm/i915: retrieve current fb config into new plane_config structure at init v4 Date: Tue, 26 Nov 2013 08:41:20 -0800 Message-ID: <20131126084120.04ffefb0@jbarnes-desktop> References: <1385423479-3821-1-git-send-email-jbarnes@virtuousgeek.org> <1385423479-3821-3-git-send-email-jbarnes@virtuousgeek.org> <20131126135710.GB16131@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy16-pub.mail.unifiedlayer.com (oproxy16-pub.mail.unifiedlayer.com [69.89.22.201]) by gabe.freedesktop.org (Postfix) with SMTP id E3C97FB7D9 for ; Tue, 26 Nov 2013 08:40:03 -0800 (PST) In-Reply-To: <20131126135710.GB16131@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 26 Nov 2013 13:57:10 +0000 Chris Wilson wrote: > On Mon, Nov 25, 2013 at 03:51:17PM -0800, Jesse Barnes wrote: > > Read out the current plane configuration at init time into a new > > plane_config structure. This allows us to track any existing > > framebuffers attached to the plane and potentially re-use them in our > > fbdev code for a smooth handoff. > > > > v2: update for new pitch_for_width function (Jesse) > > comment how get_plane_config works with shared fbs (Jesse) > > v3: s/ARGB/XRGB (Ville) > > use pipesrc width/height (Ville) > > fix fourcc comment (Bob) > > use drm_format_plane_cpp (Ville) > > v4: use fb for tracking fb data object (Ville) > > > > Signed-off-by: Jesse Barnes > > --- > > > @@ -10879,6 +10992,18 @@ void intel_modeset_init(struct drm_device *dev) > > > > /* Just in case the BIOS is doing something questionable. */ > > intel_disable_fbc(dev); > > + > > + intel_modeset_setup_hw_state(dev, false); > > + > > + list_for_each_entry(crtc, &dev->mode_config.crtc_list, > > + base.head) { > > + if (!crtc->active) > > + continue; > > + > > + if (dev_priv->display.get_plane_config) > > + dev_priv->display.get_plane_config(crtc, > > + &crtc->plane_config); > > The trick is that here if we do not retreive the current config, > including the preallocated fb, we *must* disable the output. In this > case, it would be a step in intel_sanitize_crtc() to disable the CRTC if > it is enabled but we have no preserved fb. Yeah, but I thought since that's been broken for awhile, it should come in as a separate bug fix. I can do a patch on top of this if the rest looks ok. -- Jesse Barnes, Intel Open Source Technology Center