@@ -150,6 +150,18 @@ static void update_encoders_bitmask(struct intel_crtc *intel_crtc,
}
}
+static bool intel_crtc_in_use(struct intel_crtc *intel_crtc)
+{
+ struct drm_device *dev = intel_crtc->base.dev;
+ struct intel_encoder *intel_encoder;
+
+ list_for_each_entry(intel_encoder, &dev->mode_config.encoder_list, base.head)
+ if (intel_encoder->new_crtc == intel_crtc)
+ return true;
+
+ return false;
+}
+
static bool intel_encoder_in_use(struct intel_encoder *intel_encoder)
{
struct drm_device *dev = intel_encoder->base.dev;
@@ -1246,12 +1258,12 @@ static int check_crtc(struct intel_crtc_state *s)
if (crtc->enabled) {
if (!fb)
return -EINVAL;
- if (!drm_helper_crtc_in_use(crtc))
+ if (!intel_crtc_in_use(intel_crtc))
return -EINVAL;
} else {
if (fb)
return -EINVAL;
- if (drm_helper_crtc_in_use(crtc))
+ if (intel_crtc_in_use(intel_crtc))
return -EINVAL;
}