• Home
  • Raw
  • Download

Lines Matching refs:mode

54 void drm_mode_debug_printmodeline(const struct drm_display_mode *mode)  in drm_mode_debug_printmodeline()  argument
56 DRM_DEBUG_KMS("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode)); in drm_mode_debug_printmodeline()
89 void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode) in drm_mode_destroy() argument
91 if (!mode) in drm_mode_destroy()
94 kfree(mode); in drm_mode_destroy()
108 struct drm_display_mode *mode) in drm_mode_probed_add() argument
112 list_add_tail(&mode->head, &connector->probed_modes); in drm_mode_probed_add()
740 void drm_mode_set_name(struct drm_display_mode *mode) in drm_mode_set_name() argument
742 bool interlaced = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); in drm_mode_set_name()
744 snprintf(mode->name, DRM_DISPLAY_MODE_LEN, "%dx%d%s", in drm_mode_set_name()
745 mode->hdisplay, mode->vdisplay, in drm_mode_set_name()
758 int drm_mode_vrefresh(const struct drm_display_mode *mode) in drm_mode_vrefresh() argument
762 if (mode->htotal == 0 || mode->vtotal == 0) in drm_mode_vrefresh()
765 num = mode->clock; in drm_mode_vrefresh()
766 den = mode->htotal * mode->vtotal; in drm_mode_vrefresh()
768 if (mode->flags & DRM_MODE_FLAG_INTERLACE) in drm_mode_vrefresh()
770 if (mode->flags & DRM_MODE_FLAG_DBLSCAN) in drm_mode_vrefresh()
772 if (mode->vscan > 1) in drm_mode_vrefresh()
773 den *= mode->vscan; in drm_mode_vrefresh()
788 void drm_mode_get_hv_timing(const struct drm_display_mode *mode, in drm_mode_get_hv_timing() argument
791 struct drm_display_mode adjusted = *mode; in drm_mode_get_hv_timing()
907 const struct drm_display_mode *mode) in drm_mode_duplicate() argument
915 drm_mode_copy(nmode, mode); in drm_mode_duplicate()
1078 drm_mode_validate_basic(const struct drm_display_mode *mode) in drm_mode_validate_basic() argument
1080 if (mode->type & ~DRM_MODE_TYPE_ALL) in drm_mode_validate_basic()
1083 if (mode->flags & ~DRM_MODE_FLAG_ALL) in drm_mode_validate_basic()
1086 if ((mode->flags & DRM_MODE_FLAG_3D_MASK) > DRM_MODE_FLAG_3D_MAX) in drm_mode_validate_basic()
1089 if (mode->clock == 0) in drm_mode_validate_basic()
1092 if (mode->hdisplay == 0 || in drm_mode_validate_basic()
1093 mode->hsync_start < mode->hdisplay || in drm_mode_validate_basic()
1094 mode->hsync_end < mode->hsync_start || in drm_mode_validate_basic()
1095 mode->htotal < mode->hsync_end) in drm_mode_validate_basic()
1098 if (mode->vdisplay == 0 || in drm_mode_validate_basic()
1099 mode->vsync_start < mode->vdisplay || in drm_mode_validate_basic()
1100 mode->vsync_end < mode->vsync_start || in drm_mode_validate_basic()
1101 mode->vtotal < mode->vsync_end) in drm_mode_validate_basic()
1121 const struct drm_display_mode *mode) in drm_mode_validate_driver() argument
1125 status = drm_mode_validate_basic(mode); in drm_mode_validate_driver()
1130 return dev->mode_config.funcs->mode_valid(dev, mode); in drm_mode_validate_driver()
1151 drm_mode_validate_size(const struct drm_display_mode *mode, in drm_mode_validate_size() argument
1154 if (maxX > 0 && mode->hdisplay > maxX) in drm_mode_validate_size()
1157 if (maxY > 0 && mode->vdisplay > maxY) in drm_mode_validate_size()
1176 drm_mode_validate_ycbcr420(const struct drm_display_mode *mode, in drm_mode_validate_ycbcr420() argument
1179 u8 vic = drm_match_cea_mode(mode); in drm_mode_validate_ycbcr420()
1263 struct drm_display_mode *mode, *t; in drm_mode_prune_invalid() local
1265 list_for_each_entry_safe(mode, t, mode_list, head) { in drm_mode_prune_invalid()
1266 if (mode->status != MODE_OK) { in drm_mode_prune_invalid()
1267 list_del(&mode->head); in drm_mode_prune_invalid()
1269 drm_mode_debug_printmodeline(mode); in drm_mode_prune_invalid()
1271 mode->name, in drm_mode_prune_invalid()
1272 drm_get_mode_status_name(mode->status)); in drm_mode_prune_invalid()
1274 drm_mode_destroy(dev, mode); in drm_mode_prune_invalid()
1346 struct drm_display_mode *mode; in drm_connector_list_update() local
1350 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_list_update()
1351 if (!drm_mode_equal(pmode, mode)) in drm_connector_list_update()
1368 if (mode->status == MODE_STALE) { in drm_connector_list_update()
1369 drm_mode_copy(mode, pmode); in drm_connector_list_update()
1370 } else if ((mode->type & DRM_MODE_TYPE_PREFERRED) == 0 && in drm_connector_list_update()
1372 pmode->type |= mode->type; in drm_connector_list_update()
1373 drm_mode_copy(mode, pmode); in drm_connector_list_update()
1375 mode->type |= pmode->type; in drm_connector_list_update()
1391 struct drm_cmdline_mode *mode) in drm_mode_parse_cmdline_bpp() argument
1403 mode->bpp = bpp; in drm_mode_parse_cmdline_bpp()
1404 mode->bpp_specified = true; in drm_mode_parse_cmdline_bpp()
1410 struct drm_cmdline_mode *mode) in drm_mode_parse_cmdline_refresh() argument
1422 mode->refresh = refresh; in drm_mode_parse_cmdline_refresh()
1423 mode->refresh_specified = true; in drm_mode_parse_cmdline_refresh()
1431 struct drm_cmdline_mode *mode) in drm_mode_parse_cmdline_extra() argument
1441 mode->interlace = true; in drm_mode_parse_cmdline_extra()
1447 mode->margins = true; in drm_mode_parse_cmdline_extra()
1450 if (mode->force != DRM_FORCE_UNSPECIFIED) in drm_mode_parse_cmdline_extra()
1455 mode->force = DRM_FORCE_ON; in drm_mode_parse_cmdline_extra()
1457 mode->force = DRM_FORCE_ON_DIGITAL; in drm_mode_parse_cmdline_extra()
1460 if (mode->force != DRM_FORCE_UNSPECIFIED) in drm_mode_parse_cmdline_extra()
1463 mode->force = DRM_FORCE_OFF; in drm_mode_parse_cmdline_extra()
1466 if (mode->force != DRM_FORCE_UNSPECIFIED) in drm_mode_parse_cmdline_extra()
1469 mode->force = DRM_FORCE_ON; in drm_mode_parse_cmdline_extra()
1482 struct drm_cmdline_mode *mode) in drm_mode_parse_cmdline_res_mode() argument
1526 mode); in drm_mode_parse_cmdline_res_mode()
1535 mode->xres = xres; in drm_mode_parse_cmdline_res_mode()
1536 mode->yres = yres; in drm_mode_parse_cmdline_res_mode()
1537 mode->cvt = cvt; in drm_mode_parse_cmdline_res_mode()
1538 mode->rb = rb; in drm_mode_parse_cmdline_res_mode()
1567 struct drm_cmdline_mode *mode) in drm_mode_parse_panel_orientation() argument
1580 mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_NORMAL; in drm_mode_parse_panel_orientation()
1582 mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP; in drm_mode_parse_panel_orientation()
1584 mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP; in drm_mode_parse_panel_orientation()
1586 mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP; in drm_mode_parse_panel_orientation()
1596 struct drm_cmdline_mode *mode) in drm_mode_parse_cmdline_options() argument
1643 mode->tv_margins.right = margin; in drm_mode_parse_cmdline_options()
1648 mode->tv_margins.left = margin; in drm_mode_parse_cmdline_options()
1653 mode->tv_margins.top = margin; in drm_mode_parse_cmdline_options()
1658 mode->tv_margins.bottom = margin; in drm_mode_parse_cmdline_options()
1660 if (drm_mode_parse_panel_orientation(delim, mode)) in drm_mode_parse_cmdline_options()
1679 mode->rotation_reflection = rotation; in drm_mode_parse_cmdline_options()
1716 struct drm_cmdline_mode *mode) in drm_mode_parse_command_line_for_connector() argument
1727 memset(mode, 0, sizeof(*mode)); in drm_mode_parse_command_line_for_connector()
1728 mode->panel_orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN; in drm_mode_parse_command_line_for_connector()
1769 strcpy(mode->name, drm_named_modes_whitelist[i]); in drm_mode_parse_command_line_for_connector()
1770 mode->specified = true; in drm_mode_parse_command_line_for_connector()
1776 if (!mode->specified && isdigit(name[0])) { in drm_mode_parse_command_line_for_connector()
1780 mode); in drm_mode_parse_command_line_for_connector()
1784 mode->specified = true; in drm_mode_parse_command_line_for_connector()
1788 if (!mode->specified) { in drm_mode_parse_command_line_for_connector()
1803 ret = drm_mode_parse_cmdline_bpp(bpp_ptr, &bpp_end_ptr, mode); in drm_mode_parse_command_line_for_connector()
1807 mode->bpp_specified = true; in drm_mode_parse_command_line_for_connector()
1812 &refresh_end_ptr, mode); in drm_mode_parse_command_line_for_connector()
1816 mode->refresh_specified = true; in drm_mode_parse_command_line_for_connector()
1837 connector, mode); in drm_mode_parse_command_line_for_connector()
1845 connector, mode); in drm_mode_parse_command_line_for_connector()
1866 struct drm_display_mode *mode; in drm_mode_create_from_cmdline_mode() local
1869 mode = drm_cvt_mode(dev, in drm_mode_create_from_cmdline_mode()
1875 mode = drm_gtf_mode(dev, in drm_mode_create_from_cmdline_mode()
1880 if (!mode) in drm_mode_create_from_cmdline_mode()
1883 mode->type |= DRM_MODE_TYPE_USERDEF; in drm_mode_create_from_cmdline_mode()
1886 drm_mode_fixup_1366x768(mode); in drm_mode_create_from_cmdline_mode()
1887 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); in drm_mode_create_from_cmdline_mode()
1888 return mode; in drm_mode_create_from_cmdline_mode()
2032 const struct drm_display_mode *mode) in drm_mode_is_420_only() argument
2034 u8 vic = drm_match_cea_mode(mode); in drm_mode_is_420_only()
2052 const struct drm_display_mode *mode) in drm_mode_is_420_also() argument
2054 u8 vic = drm_match_cea_mode(mode); in drm_mode_is_420_also()
2071 const struct drm_display_mode *mode) in drm_mode_is_420() argument
2073 return drm_mode_is_420_only(display, mode) || in drm_mode_is_420()
2074 drm_mode_is_420_also(display, mode); in drm_mode_is_420()