Nothing depends on this outside initial hw readout, so keep this
struct on the stack instead.

Signed-off-by: Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 25 +++++++++++++++----------
 drivers/gpu/drm/i915/intel_drv.h     |  1 -
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 037a85f1b127..e4d8acc63823 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15204,7 +15204,9 @@ void intel_modeset_init(struct drm_device *dev)
        drm_modeset_unlock_all(dev);
 
        for_each_intel_crtc(dev, crtc) {
-               if (!crtc->active)
+               struct intel_initial_plane_config plane_config;
+
+               if (!crtc->base.state->active)
                        continue;
 
                /*
@@ -15214,15 +15216,16 @@ void intel_modeset_init(struct drm_device *dev)
                 * can even allow for smooth boot transitions if the BIOS
                 * fb is large enough for the active pipe configuration.
                 */
-               if (dev_priv->display.get_initial_plane_config) {
-                       dev_priv->display.get_initial_plane_config(crtc,
-                                                          &crtc->plane_config);
-                       /*
-                        * If the fb is shared between multiple heads, we'll
-                        * just get the first one.
-                        */
-                       intel_find_initial_plane_obj(crtc, &crtc->plane_config);
-               }
+
+               plane_config.fb = NULL;
+               dev_priv->display.get_initial_plane_config(crtc,
+                                                          &plane_config);
+
+               /*
+                * If the fb is shared between multiple heads, we'll
+                * just get the first one.
+                */
+               intel_find_initial_plane_obj(crtc, &plane_config);
        }
 }
 
@@ -15713,6 +15716,8 @@ void intel_modeset_gem_init(struct drm_device *dev)
                if (ret) {
                        DRM_ERROR("failed to pin boot fb on pipe %d\n",
                                  to_intel_crtc(c)->pipe);
+                       obj->frontbuffer_bits &=
+                               ~to_intel_plane(c->primary)->frontbuffer_bit;
                        drm_framebuffer_unreference(c->primary->fb);
                        c->primary->fb = NULL;
                        c->primary->crtc = c->primary->state->crtc = NULL;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 09a0a9222a3a..09e3581c8441 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -550,7 +550,6 @@ struct intel_crtc {
        uint32_t cursor_size;
        uint32_t cursor_base;
 
-       struct intel_initial_plane_config plane_config;
        struct intel_crtc_state *config;
        bool new_enabled;
 
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to