aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_display.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2de362be885a..6d22128d97b1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6613,6 +6613,10 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
6613 struct drm_framebuffer *fb; 6613 struct drm_framebuffer *fb;
6614 struct intel_framebuffer *intel_fb; 6614 struct intel_framebuffer *intel_fb;
6615 6615
6616 val = I915_READ(DSPCNTR(plane));
6617 if (!(val & DISPLAY_PLANE_ENABLE))
6618 return;
6619
6616 intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); 6620 intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
6617 if (!intel_fb) { 6621 if (!intel_fb) {
6618 DRM_DEBUG_KMS("failed to alloc fb\n"); 6622 DRM_DEBUG_KMS("failed to alloc fb\n");
@@ -6621,8 +6625,6 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
6621 6625
6622 fb = &intel_fb->base; 6626 fb = &intel_fb->base;
6623 6627
6624 val = I915_READ(DSPCNTR(plane));
6625
6626 if (INTEL_INFO(dev)->gen >= 4) 6628 if (INTEL_INFO(dev)->gen >= 4)
6627 if (val & DISPPLANE_TILED) 6629 if (val & DISPPLANE_TILED)
6628 plane_config->tiling = I915_TILING_X; 6630 plane_config->tiling = I915_TILING_X;
@@ -7655,6 +7657,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
7655 fb = &intel_fb->base; 7657 fb = &intel_fb->base;
7656 7658
7657 val = I915_READ(PLANE_CTL(pipe, 0)); 7659 val = I915_READ(PLANE_CTL(pipe, 0));
7660 if (!(val & PLANE_CTL_ENABLE))
7661 goto error;
7662
7658 if (val & PLANE_CTL_TILED_MASK) 7663 if (val & PLANE_CTL_TILED_MASK)
7659 plane_config->tiling = I915_TILING_X; 7664 plane_config->tiling = I915_TILING_X;
7660 7665
@@ -7743,6 +7748,10 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc,
7743 struct drm_framebuffer *fb; 7748 struct drm_framebuffer *fb;
7744 struct intel_framebuffer *intel_fb; 7749 struct intel_framebuffer *intel_fb;
7745 7750
7751 val = I915_READ(DSPCNTR(pipe));
7752 if (!(val & DISPLAY_PLANE_ENABLE))
7753 return;
7754
7746 intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); 7755 intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
7747 if (!intel_fb) { 7756 if (!intel_fb) {
7748 DRM_DEBUG_KMS("failed to alloc fb\n"); 7757 DRM_DEBUG_KMS("failed to alloc fb\n");
@@ -7751,8 +7760,6 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc,
7751 7760
7752 fb = &intel_fb->base; 7761 fb = &intel_fb->base;
7753 7762
7754 val = I915_READ(DSPCNTR(pipe));
7755
7756 if (INTEL_INFO(dev)->gen >= 4) 7763 if (INTEL_INFO(dev)->gen >= 4)
7757 if (val & DISPPLANE_TILED) 7764 if (val & DISPPLANE_TILED)
7758 plane_config->tiling = I915_TILING_X; 7765 plane_config->tiling = I915_TILING_X;