drm/i915: Use the plane state in intel_crtc_info.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 10 Sep 2015 14:07:57 +0000 (16:07 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 10 Sep 2015 15:24:42 +0000 (17:24 +0200)
Legacy state might not be updated any more.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c

index 41629faaf939c0a3a4ae230259d521891c9c27cf..72ae3472ddbec66190fa02002216ac0767d9eb31 100644 (file)
@@ -2817,11 +2817,13 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *intel_crtc)
        struct drm_device *dev = node->minor->dev;
        struct drm_crtc *crtc = &intel_crtc->base;
        struct intel_encoder *intel_encoder;
+       struct drm_plane_state *plane_state = crtc->primary->state;
+       struct drm_framebuffer *fb = plane_state->fb;
 
-       if (crtc->primary->fb)
+       if (fb)
                seq_printf(m, "\tfb: %d, pos: %dx%d, size: %dx%d\n",
-                          crtc->primary->fb->base.id, crtc->x, crtc->y,
-                          crtc->primary->fb->width, crtc->primary->fb->height);
+                          fb->base.id, plane_state->src_x >> 16,
+                          plane_state->src_y >> 16, fb->width, fb->height);
        else
                seq_puts(m, "\tprimary plane disabled\n");
        for_each_encoder_on_crtc(dev, crtc, intel_encoder)