/* Return false if @encoder can't be driven by @crtc, true otherwise.  */
static bool drm_encoder_crtc_ok(struct drm_encoder *encoder, struct drm_crtc *crtc)
/* Return false if @encoder can't be driven by @crtc, true otherwise.  */
static bool drm_encoder_crtc_ok(struct drm_encoder *encoder, struct drm_crtc *crtc)
{
	struct drm_device *dev;
	struct drm_crtc *tmp;
	int crtc_mask = 1;
	WARN(!crtc, "checking null crtc?");
	dev = crtc->dev;
	list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) {
		if (tmp == crtc)
			break;
		crtc_mask <<= 1;
	}
	if (encoder->possible_crtcs & crtc_mask)
		return true;
	return false;
}