aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-01-13 06:00:22 -0500
committerThierry Reding <treding@nvidia.com>2014-01-14 08:35:27 -0500
commit14509916c35225d00e294cb161bdfd1108dda38c (patch)
tree4df26a814f0301bfe9d66f78b24959d525524e34
parent3d887368701ef78fe17fc998fe5a74ac8f7c6d4c (diff)
drm/i915: Use drm_encoder_crtc_ok()
The intel_encoder_crtc_ok() is a duplicate of the drm_encoder_crtc_ok() function that used to be only available in the DRM CRTC helpers. It has recently been moved to the core, so the duplicate can now be dropped. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 080f6fd4e839..1b20b4644979 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8493,28 +8493,6 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
8493 .load_lut = intel_crtc_load_lut, 8493 .load_lut = intel_crtc_load_lut,
8494}; 8494};
8495 8495
8496static bool intel_encoder_crtc_ok(struct drm_encoder *encoder,
8497 struct drm_crtc *crtc)
8498{
8499 struct drm_device *dev;
8500 struct drm_crtc *tmp;
8501 int crtc_mask = 1;
8502
8503 WARN(!crtc, "checking null crtc?\n");
8504
8505 dev = crtc->dev;
8506
8507 list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
8508 if (tmp == crtc)
8509 break;
8510 crtc_mask <<= 1;
8511 }
8512
8513 if (encoder->possible_crtcs & crtc_mask)
8514 return true;
8515 return false;
8516}
8517
8518/** 8496/**
8519 * intel_modeset_update_staged_output_state 8497 * intel_modeset_update_staged_output_state
8520 * 8498 *
@@ -9679,8 +9657,8 @@ intel_modeset_stage_output_state(struct drm_device *dev,
9679 } 9657 }
9680 9658
9681 /* Make sure the new CRTC will work with the encoder */ 9659 /* Make sure the new CRTC will work with the encoder */
9682 if (!intel_encoder_crtc_ok(&connector->new_encoder->base, 9660 if (!drm_encoder_crtc_ok(&connector->new_encoder->base,
9683 new_crtc)) { 9661 new_crtc)) {
9684 return -EINVAL; 9662 return -EINVAL;
9685 } 9663 }
9686 connector->encoder->new_crtc = to_intel_crtc(new_crtc); 9664 connector->encoder->new_crtc = to_intel_crtc(new_crtc);