OSDN Git Service

drm/i915: Consolidate max_cdclk_freq check in intel_crtc_compute_min_cdclk()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 10 Jul 2017 19:33:47 +0000 (22:33 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 31 Aug 2017 18:17:16 +0000 (21:17 +0300)
commit9c61de4c69a2acc7352969921405c67e88ca862b
treebeeb03f8885780fe5d3237d88a3f44adca58656d
parentd305e0614601aefc6011ec60fd28b8184db09409
drm/i915: Consolidate max_cdclk_freq check in intel_crtc_compute_min_cdclk()

Currently the .modeset_calc_cdclk() hooks check the final cdclk value
against the max allowed. That's not really sufficient since the low
level calc_cdclk() functions effectively clamp the minimum required
cdclk to the max supported by the platform. Hence if the minimum
required exceeds the platforms capabilities we'd keep going anyway
using the max cdclk frequency.

To fix that let's move the check earlier into
intel_crtc_compute_min_cdclk() and we'll check the minimum required
cdclk of the pipe against the maximum supported by the platform.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170710193347.8734-2-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
drivers/gpu/drm/i915/intel_cdclk.c
drivers/gpu/drm/i915/intel_display.c