diff options
Diffstat (limited to 'drivers/gpu/drm')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 15 |
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 074f204fdc35..3fe95982be93 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; |
| @@ -7654,6 +7656,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc, | |||
| 7654 | fb = &intel_fb->base; | 7656 | fb = &intel_fb->base; |
| 7655 | 7657 | ||
| 7656 | val = I915_READ(PLANE_CTL(pipe, 0)); | 7658 | val = I915_READ(PLANE_CTL(pipe, 0)); |
| 7659 | if (!(val & PLANE_CTL_ENABLE)) | ||
| 7660 | goto error; | ||
| 7661 | |||
| 7657 | if (val & PLANE_CTL_TILED_MASK) | 7662 | if (val & PLANE_CTL_TILED_MASK) |
| 7658 | plane_config->tiling = I915_TILING_X; | 7663 | plane_config->tiling = I915_TILING_X; |
| 7659 | 7664 | ||
| @@ -7741,6 +7746,10 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc, | |||
| 7741 | struct drm_framebuffer *fb; | 7746 | struct drm_framebuffer *fb; |
| 7742 | struct intel_framebuffer *intel_fb; | 7747 | struct intel_framebuffer *intel_fb; |
| 7743 | 7748 | ||
| 7749 | val = I915_READ(DSPCNTR(pipe)); | ||
| 7750 | if (!(val & DISPLAY_PLANE_ENABLE)) | ||
| 7751 | return; | ||
| 7752 | |||
| 7744 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); | 7753 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); |
| 7745 | if (!intel_fb) { | 7754 | if (!intel_fb) { |
| 7746 | DRM_DEBUG_KMS("failed to alloc fb\n"); | 7755 | DRM_DEBUG_KMS("failed to alloc fb\n"); |
| @@ -7749,8 +7758,6 @@ ironlake_get_initial_plane_config(struct intel_crtc *crtc, | |||
| 7749 | 7758 | ||
| 7750 | fb = &intel_fb->base; | 7759 | fb = &intel_fb->base; |
| 7751 | 7760 | ||
| 7752 | val = I915_READ(DSPCNTR(pipe)); | ||
| 7753 | |||
| 7754 | if (INTEL_INFO(dev)->gen >= 4) | 7761 | if (INTEL_INFO(dev)->gen >= 4) |
| 7755 | if (val & DISPPLANE_TILED) | 7762 | if (val & DISPPLANE_TILED) |
| 7756 | plane_config->tiling = I915_TILING_X; | 7763 | plane_config->tiling = I915_TILING_X; |
