Lines Matching defs:dmode

592  * drm_display_mode_from_videomode - fill in @dmode using @vm,
594 * @dmode: drm_display_mode structure to use as destination
596 * Fills out @dmode using the display mode specified in @vm.
599 struct drm_display_mode *dmode)
601 dmode->hdisplay = vm->hactive;
602 dmode->hsync_start = dmode->hdisplay + vm->hfront_porch;
603 dmode->hsync_end = dmode->hsync_start + vm->hsync_len;
604 dmode->htotal = dmode->hsync_end + vm->hback_porch;
606 dmode->vdisplay = vm->vactive;
607 dmode->vsync_start = dmode->vdisplay + vm->vfront_porch;
608 dmode->vsync_end = dmode->vsync_start + vm->vsync_len;
609 dmode->vtotal = dmode->vsync_end + vm->vback_porch;
611 dmode->clock = vm->pixelclock / 1000;
613 dmode->flags = 0;
615 dmode->flags |= DRM_MODE_FLAG_PHSYNC;
617 dmode->flags |= DRM_MODE_FLAG_NHSYNC;
619 dmode->flags |= DRM_MODE_FLAG_PVSYNC;
621 dmode->flags |= DRM_MODE_FLAG_NVSYNC;
623 dmode->flags |= DRM_MODE_FLAG_INTERLACE;
625 dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
627 dmode->flags |= DRM_MODE_FLAG_DBLCLK;
628 drm_mode_set_name(dmode);
633 * drm_display_mode_to_videomode - fill in @vm using @dmode,
634 * @dmode: drm_display_mode structure to use as source
637 * Fills out @vm using the display mode specified in @dmode.
639 void drm_display_mode_to_videomode(const struct drm_display_mode *dmode,
642 vm->hactive = dmode->hdisplay;
643 vm->hfront_porch = dmode->hsync_start - dmode->hdisplay;
644 vm->hsync_len = dmode->hsync_end - dmode->hsync_start;
645 vm->hback_porch = dmode->htotal - dmode->hsync_end;
647 vm->vactive = dmode->vdisplay;
648 vm->vfront_porch = dmode->vsync_start - dmode->vdisplay;
649 vm->vsync_len = dmode->vsync_end - dmode->vsync_start;
650 vm->vback_porch = dmode->vtotal - dmode->vsync_end;
652 vm->pixelclock = dmode->clock * 1000;
655 if (dmode->flags & DRM_MODE_FLAG_PHSYNC)
657 else if (dmode->flags & DRM_MODE_FLAG_NHSYNC)
659 if (dmode->flags & DRM_MODE_FLAG_PVSYNC)
661 else if (dmode->flags & DRM_MODE_FLAG_NVSYNC)
663 if (dmode->flags & DRM_MODE_FLAG_INTERLACE)
665 if (dmode->flags & DRM_MODE_FLAG_DBLSCAN)
667 if (dmode->flags & DRM_MODE_FLAG_DBLCLK)
707 * @dmode: will be set to the return value
719 struct drm_display_mode *dmode, u32 *bus_flags,
729 drm_display_mode_from_videomode(&vm, dmode);
735 drm_mode_debug_printmodeline(dmode);