aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-03-02 13:07:16 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-17 17:30:09 -0400
commit6cca31950a5df57d89d9cb4f846c96dab902adf9 (patch)
tree88d15fd74bb21ef3c637d1b16bdcd28670371396 /drivers/gpu/drm/i915/intel_display.c
parentde31facda53b595bc42ac87341a9200f1f4eb414 (diff)
drm/i915: Allow pixel clock up to 95% of cdclk on CHV
Supposedly CHV can sustain a pixel clock of up to 95% of cdclk, as opposed to the 90% limit that was used old older platforms. Update the cdclk selection code to allow for this. This will allow eg. HDMI 4k modes with their 297MHz pixel clock while still respecting the 320 MHz cdclk limit on CHV. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 31eaa7caf127..c6cbf3ba6bb5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5038,6 +5038,7 @@ static int valleyview_calc_cdclk(struct drm_i915_private *dev_priv,
5038 int max_pixclk) 5038 int max_pixclk)
5039{ 5039{
5040 int freq_320 = (dev_priv->hpll_freq << 1) % 320000 != 0 ? 333333 : 320000; 5040 int freq_320 = (dev_priv->hpll_freq << 1) % 320000 != 0 ? 333333 : 320000;
5041 int limit = IS_CHERRYVIEW(dev_priv) ? 95 : 90;
5041 5042
5042 /* FIXME: Punit isn't quite ready yet */ 5043 /* FIXME: Punit isn't quite ready yet */
5043 if (IS_CHERRYVIEW(dev_priv->dev)) 5044 if (IS_CHERRYVIEW(dev_priv->dev))
@@ -5048,17 +5049,18 @@ static int valleyview_calc_cdclk(struct drm_i915_private *dev_priv,
5048 * 200MHz 5049 * 200MHz
5049 * 267MHz 5050 * 267MHz
5050 * 320/333MHz (depends on HPLL freq) 5051 * 320/333MHz (depends on HPLL freq)
5051 * 400MHz 5052 * 400MHz (VLV only)
5052 * So we check to see whether we're above 90% of the lower bin and 5053 * So we check to see whether we're above 90% (VLV) or 95% (CHV)
5053 * adjust if needed. 5054 * of the lower bin and adjust if needed.
5054 * 5055 *
5055 * We seem to get an unstable or solid color picture at 200MHz. 5056 * We seem to get an unstable or solid color picture at 200MHz.
5056 * Not sure what's wrong. For now use 200MHz only when all pipes 5057 * Not sure what's wrong. For now use 200MHz only when all pipes
5057 * are off. 5058 * are off.
5058 */ 5059 */
5059 if (max_pixclk > freq_320*9/10) 5060 if (!IS_CHERRYVIEW(dev_priv) &&
5061 max_pixclk > freq_320*limit/100)
5060 return 400000; 5062 return 400000;
5061 else if (max_pixclk > 266667*9/10) 5063 else if (max_pixclk > 266667*limit/100)
5062 return freq_320; 5064 return freq_320;
5063 else if (max_pixclk > 0) 5065 else if (max_pixclk > 0)
5064 return 266667; 5066 return 266667;