static int cirrus_vga_get_modes(struct drm_connector *connector) { int count; /* Just add a static list of modes */ if (cirrus_bpp <= 24) { count = drm_add_modes_noedid(connector, 1280, 1024); drm_set_preferred_mode(connector, 1024, 768); } else { count = drm_add_modes_noedid(connector, 800, 600); drm_set_preferred_mode(connector, 800, 600); } return count; }
static int virtio_gpu_conn_get_modes(struct drm_connector *connector) { struct virtio_gpu_output *output = drm_connector_to_virtio_gpu_output(connector); struct drm_display_mode *mode = NULL; int count, width, height; width = le32_to_cpu(output->info.r.width); height = le32_to_cpu(output->info.r.height); count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX); if (width == 0 || height == 0) { width = XRES_DEF; height = YRES_DEF; drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF); } else { DRM_DEBUG("add mode: %dx%d\n", width, height); mode = drm_cvt_mode(connector->dev, width, height, 60, false, false, false); mode->type |= DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); count++; } return count; }
static int hibmc_connector_get_modes(struct drm_connector *connector) { int count; count = drm_add_modes_noedid(connector, 800, 600); drm_set_preferred_mode(connector, defx, defy); return count; }
static int arcpgu_drm_connector_get_modes(struct drm_connector *connector) { int count; count = drm_add_modes_noedid(connector, XRES_MAX, YRES_MAX); drm_set_preferred_mode(connector, XRES_DEF, YRES_DEF); return count; }
int bochs_connector_get_modes(struct drm_connector *connector) { int count; count = drm_add_modes_noedid(connector, 8192, 8192); drm_set_preferred_mode(connector, defx, defy); return count; }
static int cirrus_vga_get_modes(struct drm_connector *connector) { int count; /* Just add a static list of modes */ count = drm_add_modes_noedid(connector, 1280, 1024); drm_set_preferred_mode(connector, 1024, 768); return count; }