Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_fbdev.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c 
b/drivers/gpu/drm/i915/intel_fbdev.c
index 4e7e7da2e03b..cc180bfe4c1b 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -468,7 +468,7 @@ retry:
                        DRM_DEBUG_KMS("looking for current mode on connector 
%s\n",
                                      connector->name);
                        intel_mode_from_pipe_config(&encoder->crtc->hwmode,
-                                                   
to_intel_crtc(encoder->crtc)->config);
+                               to_intel_crtc_state(encoder->crtc->state));
                        modes[i] = &encoder->crtc->hwmode;
                }
                crtcs[i] = new_crtc;
@@ -566,7 +566,8 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
        for_each_crtc(dev, crtc) {
                intel_crtc = to_intel_crtc(crtc);
 
-               if (!intel_crtc->active || !crtc->primary->fb) {
+               if (!crtc->state->active ||
+                   !crtc->primary->fb) {
                        DRM_DEBUG_KMS("pipe %c not active or no fb, skipping\n",
                                      pipe_name(intel_crtc->pipe));
                        continue;
@@ -589,10 +590,12 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
        /* Now make sure all the pipes will fit into it */
        for_each_crtc(dev, crtc) {
                unsigned int cur_size;
+               struct intel_crtc_state *pipe_config =
+                       to_intel_crtc_state(crtc->state);
 
                intel_crtc = to_intel_crtc(crtc);
 
-               if (!intel_crtc->active) {
+               if (!pipe_config->base.active) {
                        DRM_DEBUG_KMS("pipe %c not active, skipping\n",
                                      pipe_name(intel_crtc->pipe));
                        continue;
@@ -606,7 +609,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
                 * pipe.  Note we need to use the selected fb's pitch and bpp
                 * rather than the current pipe's, since they differ.
                 */
-               cur_size = intel_crtc->config->base.adjusted_mode.crtc_hdisplay;
+               cur_size = pipe_config->base.adjusted_mode.crtc_hdisplay;
                cur_size = cur_size * fb->base.bits_per_pixel / 8;
                if (fb->base.pitches[0] < cur_size) {
                        DRM_DEBUG_KMS("fb not wide enough for plane %c (%d vs 
%d)\n",
@@ -617,15 +620,15 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
                        break;
                }
 
-               cur_size = intel_crtc->config->base.adjusted_mode.crtc_vdisplay;
+               cur_size = pipe_config->base.adjusted_mode.crtc_vdisplay;
                cur_size = intel_fb_align_height(dev, cur_size,
                                                 fb->base.pixel_format,
                                                 fb->base.modifier[0]);
                cur_size *= fb->base.pitches[0];
                DRM_DEBUG_KMS("pipe %c area: %dx%d, bpp: %d, size: %d\n",
                              pipe_name(intel_crtc->pipe),
-                             
intel_crtc->config->base.adjusted_mode.crtc_hdisplay,
-                             
intel_crtc->config->base.adjusted_mode.crtc_vdisplay,
+                             pipe_config->base.adjusted_mode.crtc_hdisplay,
+                             pipe_config->base.adjusted_mode.crtc_vdisplay,
                              fb->base.bits_per_pixel,
                              cur_size);
 
@@ -657,7 +660,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
        for_each_crtc(dev, crtc) {
                intel_crtc = to_intel_crtc(crtc);
 
-               if (!intel_crtc->active)
+               if (!crtc->state->active)
                        continue;
 
                WARN(!crtc->primary->fb,
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to