/* Return number of modes added or 0 if we couldn't find any.  */
int drm_add_modes_noedid(struct drm_connector *connector, int hdisplay, int vdisplay)
/* Return number of modes added or 0 if we couldn't find any.  */
int drm_add_modes_noedid(struct drm_connector *connector, int hdisplay, int vdisplay)
{
	int i, count, num_modes = 0;
	struct drm_display_mode *mode, *ptr;
	struct drm_device *dev = connector->dev;
	count = sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
	if (hdisplay < 0)
		hdisplay = 0;
	if (vdisplay < 0)
		vdisplay = 0;
	for (i = 0; i < count; i++) {
		ptr = &drm_dmt_modes[i];
		if (hdisplay && vdisplay) {
			if (ptr->hdisplay > hdisplay ||
					ptr->vdisplay > vdisplay)
				continue;
		}
		if (drm_mode_vrefresh(ptr) > 61)
			continue;
		mode = drm_mode_duplicate(dev, ptr);
		if (mode) {
			drm_mode_probed_add(connector, mode);
			num_modes++;
		}
	}
	return num_modes;
}