[Intel-gfx] [RFC] drm/i915: read current config at init time to avoid flicker

Jesse Barnes jbarnes at virtuousgeek.org
Thu Mar 1 23:51:40 CET 2012

On Thu, 01 Mar 2012 22:41:45 +0000
Chris Wilson <chris at chris-wilson.co.uk> wrote:

> On Thu, 1 Mar 2012 14:18:58 -0800, Jesse Barnes
> <jbarnes at virtuousgeek.org> 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...


More information about the Intel-gfx mailing list