diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-06-24 12:19:28 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-07 13:20:57 -0700 |
commit | 89c6143263ef8e14e42e17324a234418d8030b10 (patch) | |
tree | 6e3e4098880232c73920704b5c2ff9b0738c89f7 /drivers/gpu/drm/i915/intel_dp.c | |
parent | b5626747eca6d02124544d1d69049220f1c01fb1 (diff) | |
download | lwn-89c6143263ef8e14e42e17324a234418d8030b10.tar.gz lwn-89c6143263ef8e14e42e17324a234418d8030b10.zip |
drm/i915: use pipe bpp in DP link bandwidth calculation
Now that we track bpp on a per-pipe basis, we can use the actual value
rather than assuming 24bpp.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 26ce8c0af9b8..e17de2b3d415 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -179,12 +179,14 @@ intel_dp_link_clock(uint8_t link_bw) static int intel_dp_link_required(struct drm_device *dev, struct intel_dp *intel_dp, int pixel_clock) { - struct drm_i915_private *dev_priv = dev->dev_private; + struct drm_crtc *crtc = intel_dp->base.base.crtc; + struct intel_crtc *intel_crtc = to_intel_crtc(crtc); + int bpp = 24; - if (is_edp(intel_dp)) - return (pixel_clock * dev_priv->edp.bpp + 7) / 8; - else - return pixel_clock * 3; + if (intel_crtc) + bpp = intel_crtc->bpp; + + return (pixel_clock * bpp + 7) / 8; } static int |