diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index efd3cf50cb0f..e27e7804c0b9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2087,6 +2087,7 @@ void intel_flush_primary_plane(struct drm_i915_private *dev_priv, | |||
2087 | static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, | 2087 | static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, |
2088 | enum plane plane, enum pipe pipe) | 2088 | enum plane plane, enum pipe pipe) |
2089 | { | 2089 | { |
2090 | struct drm_device *dev = dev_priv->dev; | ||
2090 | struct intel_crtc *intel_crtc = | 2091 | struct intel_crtc *intel_crtc = |
2091 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); | 2092 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); |
2092 | int reg; | 2093 | int reg; |
@@ -2106,6 +2107,14 @@ static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, | |||
2106 | 2107 | ||
2107 | I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); | 2108 | I915_WRITE(reg, val | DISPLAY_PLANE_ENABLE); |
2108 | intel_flush_primary_plane(dev_priv, plane); | 2109 | intel_flush_primary_plane(dev_priv, plane); |
2110 | |||
2111 | /* | ||
2112 | * BDW signals flip done immediately if the plane | ||
2113 | * is disabled, even if the plane enable is already | ||
2114 | * armed to occur at the next vblank :( | ||
2115 | */ | ||
2116 | if (IS_BROADWELL(dev)) | ||
2117 | intel_wait_for_vblank(dev, intel_crtc->pipe); | ||
2109 | } | 2118 | } |
2110 | 2119 | ||
2111 | /** | 2120 | /** |
@@ -4564,7 +4573,10 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) | |||
4564 | if (intel_crtc->active) | 4573 | if (intel_crtc->active) |
4565 | return; | 4574 | return; |
4566 | 4575 | ||
4567 | vlv_prepare_pll(intel_crtc); | 4576 | is_dsi = intel_pipe_has_type(crtc, INTEL_OUTPUT_DSI); |
4577 | |||
4578 | if (!is_dsi && !IS_CHERRYVIEW(dev)) | ||
4579 | vlv_prepare_pll(intel_crtc); | ||
4568 | 4580 | ||
4569 | /* Set up the display plane register */ | 4581 | /* Set up the display plane register */ |
4570 | dspcntr = DISPPLANE_GAMMA_ENABLE; | 4582 | dspcntr = DISPPLANE_GAMMA_ENABLE; |
@@ -4598,8 +4610,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) | |||
4598 | if (encoder->pre_pll_enable) | 4610 | if (encoder->pre_pll_enable) |
4599 | encoder->pre_pll_enable(encoder); | 4611 | encoder->pre_pll_enable(encoder); |
4600 | 4612 | ||
4601 | is_dsi = intel_pipe_has_type(crtc, INTEL_OUTPUT_DSI); | ||
4602 | |||
4603 | if (!is_dsi) { | 4613 | if (!is_dsi) { |
4604 | if (IS_CHERRYVIEW(dev)) | 4614 | if (IS_CHERRYVIEW(dev)) |
4605 | chv_enable_pll(intel_crtc); | 4615 | chv_enable_pll(intel_crtc); |
@@ -11087,6 +11097,22 @@ const char *intel_output_name(int output) | |||
11087 | return names[output]; | 11097 | return names[output]; |
11088 | } | 11098 | } |
11089 | 11099 | ||
11100 | static bool intel_crt_present(struct drm_device *dev) | ||
11101 | { | ||
11102 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
11103 | |||
11104 | if (IS_ULT(dev)) | ||
11105 | return false; | ||
11106 | |||
11107 | if (IS_CHERRYVIEW(dev)) | ||
11108 | return false; | ||
11109 | |||
11110 | if (IS_VALLEYVIEW(dev) && !dev_priv->vbt.int_crt_support) | ||
11111 | return false; | ||
11112 | |||
11113 | return true; | ||
11114 | } | ||
11115 | |||
11090 | static void intel_setup_outputs(struct drm_device *dev) | 11116 | static void intel_setup_outputs(struct drm_device *dev) |
11091 | { | 11117 | { |
11092 | struct drm_i915_private *dev_priv = dev->dev_private; | 11118 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -11095,7 +11121,7 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
11095 | 11121 | ||
11096 | intel_lvds_init(dev); | 11122 | intel_lvds_init(dev); |
11097 | 11123 | ||
11098 | if (!IS_ULT(dev) && !IS_CHERRYVIEW(dev) && dev_priv->vbt.int_crt_support) | 11124 | if (intel_crt_present(dev)) |
11099 | intel_crt_init(dev); | 11125 | intel_crt_init(dev); |
11100 | 11126 | ||
11101 | if (HAS_DDI(dev)) { | 11127 | if (HAS_DDI(dev)) { |
@@ -11565,6 +11591,14 @@ static void quirk_invert_brightness(struct drm_device *dev) | |||
11565 | DRM_INFO("applying inverted panel brightness quirk\n"); | 11591 | DRM_INFO("applying inverted panel brightness quirk\n"); |
11566 | } | 11592 | } |
11567 | 11593 | ||
11594 | /* Some VBT's incorrectly indicate no backlight is present */ | ||
11595 | static void quirk_backlight_present(struct drm_device *dev) | ||
11596 | { | ||
11597 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
11598 | dev_priv->quirks |= QUIRK_BACKLIGHT_PRESENT; | ||
11599 | DRM_INFO("applying backlight present quirk\n"); | ||
11600 | } | ||
11601 | |||
11568 | struct intel_quirk { | 11602 | struct intel_quirk { |
11569 | int device; | 11603 | int device; |
11570 | int subsystem_vendor; | 11604 | int subsystem_vendor; |
@@ -11633,6 +11667,12 @@ static struct intel_quirk intel_quirks[] = { | |||
11633 | 11667 | ||
11634 | /* Acer Aspire 5336 */ | 11668 | /* Acer Aspire 5336 */ |
11635 | { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness }, | 11669 | { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness }, |
11670 | |||
11671 | /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */ | ||
11672 | { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present }, | ||
11673 | |||
11674 | /* Toshiba CB35 Chromebook (Celeron 2955U) */ | ||
11675 | { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, | ||
11636 | }; | 11676 | }; |
11637 | 11677 | ||
11638 | static void intel_init_quirks(struct drm_device *dev) | 11678 | static void intel_init_quirks(struct drm_device *dev) |
@@ -12411,8 +12451,8 @@ intel_display_capture_error_state(struct drm_device *dev) | |||
12411 | 12451 | ||
12412 | for_each_pipe(i) { | 12452 | for_each_pipe(i) { |
12413 | error->pipe[i].power_domain_on = | 12453 | error->pipe[i].power_domain_on = |
12414 | intel_display_power_enabled_sw(dev_priv, | 12454 | intel_display_power_enabled_unlocked(dev_priv, |
12415 | POWER_DOMAIN_PIPE(i)); | 12455 | POWER_DOMAIN_PIPE(i)); |
12416 | if (!error->pipe[i].power_domain_on) | 12456 | if (!error->pipe[i].power_domain_on) |
12417 | continue; | 12457 | continue; |
12418 | 12458 | ||
@@ -12447,7 +12487,7 @@ intel_display_capture_error_state(struct drm_device *dev) | |||
12447 | enum transcoder cpu_transcoder = transcoders[i]; | 12487 | enum transcoder cpu_transcoder = transcoders[i]; |
12448 | 12488 | ||
12449 | error->transcoder[i].power_domain_on = | 12489 | error->transcoder[i].power_domain_on = |
12450 | intel_display_power_enabled_sw(dev_priv, | 12490 | intel_display_power_enabled_unlocked(dev_priv, |
12451 | POWER_DOMAIN_TRANSCODER(cpu_transcoder)); | 12491 | POWER_DOMAIN_TRANSCODER(cpu_transcoder)); |
12452 | if (!error->transcoder[i].power_domain_on) | 12492 | if (!error->transcoder[i].power_domain_on) |
12453 | continue; | 12493 | continue; |