diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-05-22 04:28:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-05-22 04:28:56 -0400 |
commit | 65c2ce70046c779974af8b5dfc25a0df489089b5 (patch) | |
tree | b16f152eb62b71cf5a1edc51da865b357c989922 /drivers/gpu/drm/i915/intel_display.c | |
parent | 842514849a616e9b61acad65771c7afe01e651f9 (diff) | |
parent | 4b660a7f5c8099d88d1a43d8ae138965112592c7 (diff) |
Merge tag 'v3.15-rc6' into sched/core, to pick up the latest fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index dae976f51d83..48aa516a1ac0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -9654,11 +9654,22 @@ intel_pipe_config_compare(struct drm_device *dev, | |||
9654 | PIPE_CONF_CHECK_I(pipe_src_w); | 9654 | PIPE_CONF_CHECK_I(pipe_src_w); |
9655 | PIPE_CONF_CHECK_I(pipe_src_h); | 9655 | PIPE_CONF_CHECK_I(pipe_src_h); |
9656 | 9656 | ||
9657 | PIPE_CONF_CHECK_I(gmch_pfit.control); | 9657 | /* |
9658 | /* pfit ratios are autocomputed by the hw on gen4+ */ | 9658 | * FIXME: BIOS likes to set up a cloned config with lvds+external |
9659 | if (INTEL_INFO(dev)->gen < 4) | 9659 | * screen. Since we don't yet re-compute the pipe config when moving |
9660 | PIPE_CONF_CHECK_I(gmch_pfit.pgm_ratios); | 9660 | * just the lvds port away to another pipe the sw tracking won't match. |
9661 | PIPE_CONF_CHECK_I(gmch_pfit.lvds_border_bits); | 9661 | * |
9662 | * Proper atomic modesets with recomputed global state will fix this. | ||
9663 | * Until then just don't check gmch state for inherited modes. | ||
9664 | */ | ||
9665 | if (!PIPE_CONF_QUIRK(PIPE_CONFIG_QUIRK_INHERITED_MODE)) { | ||
9666 | PIPE_CONF_CHECK_I(gmch_pfit.control); | ||
9667 | /* pfit ratios are autocomputed by the hw on gen4+ */ | ||
9668 | if (INTEL_INFO(dev)->gen < 4) | ||
9669 | PIPE_CONF_CHECK_I(gmch_pfit.pgm_ratios); | ||
9670 | PIPE_CONF_CHECK_I(gmch_pfit.lvds_border_bits); | ||
9671 | } | ||
9672 | |||
9662 | PIPE_CONF_CHECK_I(pch_pfit.enabled); | 9673 | PIPE_CONF_CHECK_I(pch_pfit.enabled); |
9663 | if (current_config->pch_pfit.enabled) { | 9674 | if (current_config->pch_pfit.enabled) { |
9664 | PIPE_CONF_CHECK_I(pch_pfit.pos); | 9675 | PIPE_CONF_CHECK_I(pch_pfit.pos); |
@@ -11384,15 +11395,6 @@ void intel_modeset_init(struct drm_device *dev) | |||
11384 | } | 11395 | } |
11385 | } | 11396 | } |
11386 | 11397 | ||
11387 | static void | ||
11388 | intel_connector_break_all_links(struct intel_connector *connector) | ||
11389 | { | ||
11390 | connector->base.dpms = DRM_MODE_DPMS_OFF; | ||
11391 | connector->base.encoder = NULL; | ||
11392 | connector->encoder->connectors_active = false; | ||
11393 | connector->encoder->base.crtc = NULL; | ||
11394 | } | ||
11395 | |||
11396 | static void intel_enable_pipe_a(struct drm_device *dev) | 11398 | static void intel_enable_pipe_a(struct drm_device *dev) |
11397 | { | 11399 | { |
11398 | struct intel_connector *connector; | 11400 | struct intel_connector *connector; |
@@ -11474,8 +11476,17 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc) | |||
11474 | if (connector->encoder->base.crtc != &crtc->base) | 11476 | if (connector->encoder->base.crtc != &crtc->base) |
11475 | continue; | 11477 | continue; |
11476 | 11478 | ||
11477 | intel_connector_break_all_links(connector); | 11479 | connector->base.dpms = DRM_MODE_DPMS_OFF; |
11480 | connector->base.encoder = NULL; | ||
11478 | } | 11481 | } |
11482 | /* multiple connectors may have the same encoder: | ||
11483 | * handle them and break crtc link separately */ | ||
11484 | list_for_each_entry(connector, &dev->mode_config.connector_list, | ||
11485 | base.head) | ||
11486 | if (connector->encoder->base.crtc == &crtc->base) { | ||
11487 | connector->encoder->base.crtc = NULL; | ||
11488 | connector->encoder->connectors_active = false; | ||
11489 | } | ||
11479 | 11490 | ||
11480 | WARN_ON(crtc->active); | 11491 | WARN_ON(crtc->active); |
11481 | crtc->base.enabled = false; | 11492 | crtc->base.enabled = false; |
@@ -11557,6 +11568,8 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) | |||
11557 | drm_get_encoder_name(&encoder->base)); | 11568 | drm_get_encoder_name(&encoder->base)); |
11558 | encoder->disable(encoder); | 11569 | encoder->disable(encoder); |
11559 | } | 11570 | } |
11571 | encoder->base.crtc = NULL; | ||
11572 | encoder->connectors_active = false; | ||
11560 | 11573 | ||
11561 | /* Inconsistent output/port/pipe state happens presumably due to | 11574 | /* Inconsistent output/port/pipe state happens presumably due to |
11562 | * a bug in one of the get_hw_state functions. Or someplace else | 11575 | * a bug in one of the get_hw_state functions. Or someplace else |
@@ -11567,8 +11580,8 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) | |||
11567 | base.head) { | 11580 | base.head) { |
11568 | if (connector->encoder != encoder) | 11581 | if (connector->encoder != encoder) |
11569 | continue; | 11582 | continue; |
11570 | 11583 | connector->base.dpms = DRM_MODE_DPMS_OFF; | |
11571 | intel_connector_break_all_links(connector); | 11584 | connector->base.encoder = NULL; |
11572 | } | 11585 | } |
11573 | } | 11586 | } |
11574 | /* Enabled encoders without active connectors will be fixed in | 11587 | /* Enabled encoders without active connectors will be fixed in |
@@ -11616,6 +11629,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) | |||
11616 | base.head) { | 11629 | base.head) { |
11617 | memset(&crtc->config, 0, sizeof(crtc->config)); | 11630 | memset(&crtc->config, 0, sizeof(crtc->config)); |
11618 | 11631 | ||
11632 | crtc->config.quirks |= PIPE_CONFIG_QUIRK_INHERITED_MODE; | ||
11633 | |||
11619 | crtc->active = dev_priv->display.get_pipe_config(crtc, | 11634 | crtc->active = dev_priv->display.get_pipe_config(crtc, |
11620 | &crtc->config); | 11635 | &crtc->config); |
11621 | 11636 | ||