Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269812
b: refs/heads/master
c: 99eb6a0
h: refs/heads/master
v: v3
  • Loading branch information
Keith Packard committed Sep 28, 2011
1 parent 6ec2ca0 commit 2e2a40d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 199e5d79f1c988a8039fa75b736a3adcdda56abc
refs/heads/master: 99eb6a01e5ac6cf28aadc64e6ff346939874dfd2
26 changes: 21 additions & 5 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5119,6 +5119,8 @@ static void ironlake_update_pch_refclk(struct drm_device *dev)
bool has_cpu_edp = false;
bool has_pch_edp = false;
bool has_panel = false;
bool has_ck505 = false;
bool can_ssc = false;

/* We need to take the global config into account */
list_for_each_entry(encoder, &mode_config->encoder_list,
Expand All @@ -5137,8 +5139,18 @@ static void ironlake_update_pch_refclk(struct drm_device *dev)
break;
}
}
DRM_DEBUG_KMS("has_panel %d has_lvds %d has_pch_edp %d has_cpu_edp %d\n",
has_panel, has_lvds, has_pch_edp, has_cpu_edp);

if (HAS_PCH_IBX(dev)) {
has_ck505 = dev_priv->display_clock_mode;
can_ssc = has_ck505;
} else {
has_ck505 = false;
can_ssc = true;
}

DRM_DEBUG_KMS("has_panel %d has_lvds %d has_pch_edp %d has_cpu_edp %d has_ck505 %d\n",
has_panel, has_lvds, has_pch_edp, has_cpu_edp,
has_ck505);

/* Ironlake: try to setup display ref clock before DPLL
* enabling. This is only under driver's control after
Expand All @@ -5148,14 +5160,18 @@ static void ironlake_update_pch_refclk(struct drm_device *dev)
temp = I915_READ(PCH_DREF_CONTROL);
/* Always enable nonspread source */
temp &= ~DREF_NONSPREAD_SOURCE_MASK;
temp |= DREF_NONSPREAD_SOURCE_ENABLE;

if (has_ck505)
temp |= DREF_NONSPREAD_CK505_ENABLE;
else
temp |= DREF_NONSPREAD_SOURCE_ENABLE;

if (has_panel) {
temp &= ~DREF_SSC_SOURCE_MASK;
temp |= DREF_SSC_SOURCE_ENABLE;

/* SSC must be turned on before enabling the CPU output */
if (intel_panel_use_ssc(dev_priv)) {
if (intel_panel_use_ssc(dev_priv) && can_ssc) {
DRM_DEBUG_KMS("Using SSC on panel\n");
temp |= DREF_SSC1_ENABLE;
}
Expand All @@ -5169,7 +5185,7 @@ static void ironlake_update_pch_refclk(struct drm_device *dev)

/* Enable CPU source on CPU attached eDP */
if (has_cpu_edp) {
if (intel_panel_use_ssc(dev_priv)) {
if (intel_panel_use_ssc(dev_priv) && can_ssc) {
DRM_DEBUG_KMS("Using SSC on eDP\n");
temp |= DREF_CPU_SOURCE_OUTPUT_DOWNSPREAD;
}
Expand Down

0 comments on commit 2e2a40d

Please sign in to comment.