Re: [Intel-gfx] [RFC PATCH 2/7] drm/i915: Read hw state into an atomic state struct, try 2.

2015-06-23 Thread Daniel Vetter
On Tue, Jun 23, 2015 at 12:49:00PM +0200, Maarten Lankhorst wrote: > Op 22-06-15 om 17:31 schreef Daniel Vetter: > > On Fri, Jun 19, 2015 at 10:02:25AM +0200, Maarten Lankhorst wrote: > >> /* Scan out the current hw modeset state, sanitizes it and maps it into > >> the drm > >> @@ -15491,37 +1556

Re: [Intel-gfx] [RFC PATCH 2/7] drm/i915: Read hw state into an atomic state struct, try 2.

2015-06-23 Thread Maarten Lankhorst
Op 22-06-15 om 17:31 schreef Daniel Vetter: > On Fri, Jun 19, 2015 at 10:02:25AM +0200, Maarten Lankhorst wrote: >> /* Scan out the current hw modeset state, sanitizes it and maps it into the >> drm >> @@ -15491,37 +15569,61 @@ void intel_modeset_setup_hw_state(struct >> drm_device *dev, >>

Re: [Intel-gfx] [RFC PATCH 2/7] drm/i915: Read hw state into an atomic state struct, try 2.

2015-06-22 Thread Daniel Vetter
On Fri, Jun 19, 2015 at 10:02:25AM +0200, Maarten Lankhorst wrote: > /* Scan out the current hw modeset state, sanitizes it and maps it into the > drm > @@ -15491,37 +15569,61 @@ void intel_modeset_setup_hw_state(struct drm_device > *dev, > bool force_restore) >

Re: [Intel-gfx] [RFC PATCH 2/7] drm/i915: Read hw state into an atomic state struct, try 2.

2015-06-19 Thread Daniel Stone
Hi, On 19 June 2015 at 09:02, Maarten Lankhorst wrote: > + if (crtc->state->enable) { > + intel_mode_from_pipe_config(&crtc->mode, > + to_intel_crtc_state(crtc->state)); > + > intel_mode_from_pipe_config(&crt

[Intel-gfx] [RFC PATCH 2/7] drm/i915: Read hw state into an atomic state struct, try 2.

2015-06-19 Thread Maarten Lankhorst
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, c