/* Check the CRTC we're going to map each output to vs. its current CRTC. If they don't match, we have to disable the output and the CRTC since the driver will have to re-route things.  */
static void drm_crtc_prepare_encoders(struct drm_device *dev)
/* Check the CRTC we're going to map each output to vs. its current CRTC. If they don't match, we have to disable the output and the CRTC since the driver will have to re-route things.  */
static void drm_crtc_prepare_encoders(struct drm_device *dev)
{
	struct drm_encoder_helper_funcs *encoder_funcs;
	struct drm_encoder *encoder;
	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
		encoder_funcs = encoder->helper_private;
		if (encoder->crtc == NULL)
			(*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
		if (encoder_funcs->get_crtc &&
		    encoder->crtc != (*encoder_funcs->get_crtc)(encoder))
			(*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF);
	}
}