]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: read out hw state earlier v2
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 11 Feb 2014 23:28:56 +0000 (15:28 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Feb 2014 17:53:15 +0000 (18:53 +0100)
We want to do this early on before we try to fetch the plane config,
which depends on some of the pipe config state.

Note that the important part is that we do this before we initialize
gem, since otherwise we can't properly pre-reserve the stolen memory
for framebuffers inherited from the bios.

v2: split back out from get_plane_config change (Daniel)
    update for recent locking & reset changes (Jesse)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: Explain a bit more why we need to move this.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 43b4281daf252efc66df72b09f55ffb3a1a101c5..76a7e0bf4020476e08e10be76665657f2bf7046b 100644 (file)
@@ -11072,6 +11072,8 @@ 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);
 }
 
 static void
@@ -11439,10 +11441,6 @@ void intel_modeset_gem_init(struct drm_device *dev)
        intel_modeset_init_hw(dev);
 
        intel_setup_overlay(dev);
-
-       mutex_lock(&dev->mode_config.mutex);
-       intel_modeset_setup_hw_state(dev, false);
-       mutex_unlock(&dev->mode_config.mutex);
 }
 
 void intel_modeset_cleanup(struct drm_device *dev)