From: Jesse Barnes Subject: Re: [RFC] drm/i915: read current config at init time to avoid flicker Date: Thu, 1 Mar 2012 14:51:40 -0800 Message-ID: <20120301145140.6ea0adb5@jbarnes-x220> References: <20120301123747.1e89da33@jbarnes-desktop> <20120301141858.28862e98@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8]) by gabe.freedesktop.org (Postfix) with SMTP id F20EAA0921 for ; Thu, 1 Mar 2012 14:51:44 -0800 (PST) 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 01 Mar 2012 22:41:45 +0000 Chris Wilson wrote: > On Thu, 1 Mar 2012 14:18:58 -0800, Jesse Barnes > wrote: > > @@ -2427,6 +2448,8 @@ intel_dp_init(struct drm_device *dev, int > > output_reg) intel_connector_attach_encoder(intel_connector, > > intel_encoder); drm_sysfs_connector_add(connector); > > > > + intel_encoder->base.crtc = > > intel_dp_get_crtc(&intel_encoder->base); > intel_encoder->base.crtc = > dev_priv->pipe_to_crtc_mapping[intel_dp_get_pipe(intel_dp)] > > As the pipe-to-crtc mapping is already established by this point, and > indeed used in the LVDS chunk, you may as well use it here. Ah yeah good point, that saves a bit of code. Unfortunately, the dp code will still shut off the panel in ->prepare. To avoid that at boot time, we need a valid fb... An easy approach might be to allocate a bo of the appropriate size at CRTC init time, and create an fb for it like we do in the intel_fb.c code. We can simply memcpy from the current base into the new bo, flip to it, and have a valid crtc->fb from very early on... Jesse