[Intel-gfx] [PATCH v3 15/22] drm/i915: Read hw state into an atomic state struct

Daniel Vetter daniel at ffwll.ch
Wed May 27 04:26:37 PDT 2015


On Wed, May 27, 2015 at 07:30:01AM +0200, Maarten Lankhorst wrote:
> Hey,
> 
> Op 20-05-15 om 18:04 schreef maarten.lankhorst at linux.intel.com:
> > From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> >
> > To make this work we load the new hardware state into the
> > atomic_state, then swap it with the sw state.
> >
> > This lets us change the force restore path in setup_hw_state()
> > to use a single call to intel_mode_set() to restore all the
> > previous state.
> >
> > As a nice bonus this kills off encoder->new_encoder,
> > connector->new_enabled and crtc->new_enabled. They were used only
> > to restore the state after a modeset.
> >
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_atomic.c  |   2 +-
> >  drivers/gpu/drm/i915/intel_display.c | 377 ++++++++++++++++++++++-------------
> >  drivers/gpu/drm/i915/intel_drv.h     |  14 +-
> >  3 files changed, 241 insertions(+), 152 deletions(-)
> >
> Small fix up. This patch may force the modeset code to no longer do a modeset on boot, causing a black screen
> on Daniel Stone's machine. Fixup below disables all crtc's for the !i915.fastboot case.

Why does this happen? It could be that we're throwing a state difference
under the rug, which wouldn't be great.
-Daniel

> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 13b09efeb2a0..b70e3890e2bf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14138,7 +14138,7 @@ void intel_modeset_init(struct drm_device *dev)
>  	intel_fbc_disable(dev);
>  
>  	drm_modeset_lock_all(dev);
> -	intel_modeset_setup_hw_state(dev, false);
> +	intel_modeset_setup_hw_state(dev, !i915.fastboot);
>  	drm_modeset_unlock_all(dev);
>  
>  	for_each_intel_crtc(dev, crtc) {
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list