diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 88a1ab7c05ce..cc8131ff319f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3653,6 +3653,11 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3653 | pipeconf &= ~PIPEACONF_DOUBLE_WIDE; | 3653 | pipeconf &= ~PIPEACONF_DOUBLE_WIDE; |
3654 | } | 3654 | } |
3655 | 3655 | ||
3656 | dspcntr |= DISPLAY_PLANE_ENABLE; | ||
3657 | pipeconf |= PIPEACONF_ENABLE; | ||
3658 | dpll |= DPLL_VCO_ENABLE; | ||
3659 | |||
3660 | |||
3656 | /* Disable the panel fitter if it was on our pipe */ | 3661 | /* Disable the panel fitter if it was on our pipe */ |
3657 | if (!HAS_PCH_SPLIT(dev) && intel_panel_fitter_pipe(dev) == pipe) | 3662 | if (!HAS_PCH_SPLIT(dev) && intel_panel_fitter_pipe(dev) == pipe) |
3658 | I915_WRITE(PFIT_CONTROL, 0); | 3663 | I915_WRITE(PFIT_CONTROL, 0); |
@@ -3973,6 +3978,13 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
3973 | DRM_ERROR("failed to pin cursor bo\n"); | 3978 | DRM_ERROR("failed to pin cursor bo\n"); |
3974 | goto fail_locked; | 3979 | goto fail_locked; |
3975 | } | 3980 | } |
3981 | |||
3982 | ret = i915_gem_object_set_to_gtt_domain(bo, 0); | ||
3983 | if (ret) { | ||
3984 | DRM_ERROR("failed to move cursor bo into the GTT\n"); | ||
3985 | goto fail_unpin; | ||
3986 | } | ||
3987 | |||
3976 | addr = obj_priv->gtt_offset; | 3988 | addr = obj_priv->gtt_offset; |
3977 | } else { | 3989 | } else { |
3978 | ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1); | 3990 | ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1); |
@@ -4016,6 +4028,8 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
4016 | intel_crtc->cursor_bo = bo; | 4028 | intel_crtc->cursor_bo = bo; |
4017 | 4029 | ||
4018 | return 0; | 4030 | return 0; |
4031 | fail_unpin: | ||
4032 | i915_gem_object_unpin(bo); | ||
4019 | fail_locked: | 4033 | fail_locked: |
4020 | mutex_unlock(&dev->struct_mutex); | 4034 | mutex_unlock(&dev->struct_mutex); |
4021 | fail: | 4035 | fail: |
@@ -5461,7 +5475,6 @@ static void intel_init_display(struct drm_device *dev) | |||
5461 | void intel_modeset_init(struct drm_device *dev) | 5475 | void intel_modeset_init(struct drm_device *dev) |
5462 | { | 5476 | { |
5463 | struct drm_i915_private *dev_priv = dev->dev_private; | 5477 | struct drm_i915_private *dev_priv = dev->dev_private; |
5464 | int num_pipe; | ||
5465 | int i; | 5478 | int i; |
5466 | 5479 | ||
5467 | drm_mode_config_init(dev); | 5480 | drm_mode_config_init(dev); |
@@ -5491,13 +5504,13 @@ void intel_modeset_init(struct drm_device *dev) | |||
5491 | dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0); | 5504 | dev->mode_config.fb_base = pci_resource_start(dev->pdev, 0); |
5492 | 5505 | ||
5493 | if (IS_MOBILE(dev) || IS_I9XX(dev)) | 5506 | if (IS_MOBILE(dev) || IS_I9XX(dev)) |
5494 | num_pipe = 2; | 5507 | dev_priv->num_pipe = 2; |
5495 | else | 5508 | else |
5496 | num_pipe = 1; | 5509 | dev_priv->num_pipe = 1; |
5497 | DRM_DEBUG_KMS("%d display pipe%s available.\n", | 5510 | DRM_DEBUG_KMS("%d display pipe%s available.\n", |
5498 | num_pipe, num_pipe > 1 ? "s" : ""); | 5511 | dev_priv->num_pipe, dev_priv->num_pipe > 1 ? "s" : ""); |
5499 | 5512 | ||
5500 | for (i = 0; i < num_pipe; i++) { | 5513 | for (i = 0; i < dev_priv->num_pipe; i++) { |
5501 | intel_crtc_init(dev, i); | 5514 | intel_crtc_init(dev, i); |
5502 | } | 5515 | } |
5503 | 5516 | ||