Lines Matching defs:drm_mode

636 	struct drm_display_mode *drm_mode;
648 drm_mode = drm_mode_create(dev);
649 if (!drm_mode)
672 drm_mode->hdisplay = hdisplay_rnd + 2 * hmargin;
685 drm_mode->vdisplay = vdisplay + 2 * vmargin;
734 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin +
754 hblank = drm_mode->hdisplay * hblank_percentage /
758 drm_mode->htotal = drm_mode->hdisplay + hblank;
759 drm_mode->hsync_end = drm_mode->hdisplay + hblank / 2;
760 drm_mode->hsync_start = drm_mode->hsync_end -
761 (drm_mode->htotal * CVT_HSYNC_PERCENTAGE) / 100;
762 drm_mode->hsync_start += CVT_H_GRANULARITY -
763 drm_mode->hsync_start % CVT_H_GRANULARITY;
765 drm_mode->vsync_start = drm_mode->vdisplay + CVT_MIN_V_PORCH;
766 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
790 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin + vbilines;
792 drm_mode->htotal = drm_mode->hdisplay + CVT_RB_H_BLANK;
794 drm_mode->hsync_end = drm_mode->hdisplay + CVT_RB_H_BLANK / 2;
795 drm_mode->hsync_start = drm_mode->hsync_end - CVT_RB_H_SYNC;
797 drm_mode->vsync_start = drm_mode->vdisplay + CVT_RB_VFPORCH;
798 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
801 tmp = drm_mode->htotal; /* perform intermediate calcs in u64 */
804 tmp -= drm_mode->clock % CVT_CLOCK_STEP;
805 drm_mode->clock = tmp;
809 drm_mode->vtotal *= 2;
810 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
813 drm_mode_set_name(drm_mode);
815 drm_mode->flags |= (DRM_MODE_FLAG_PHSYNC |
818 drm_mode->flags |= (DRM_MODE_FLAG_PVSYNC |
821 return drm_mode;
865 struct drm_display_mode *drm_mode;
883 drm_mode = drm_mode_create(dev);
884 if (!drm_mode)
991 drm_mode->hdisplay = hdisplay_rnd;
992 drm_mode->hsync_start = hdisplay_rnd + hfront_porch;
993 drm_mode->hsync_end = drm_mode->hsync_start + hsync;
994 drm_mode->htotal = total_pixels;
995 drm_mode->vdisplay = vdisplay_rnd;
996 drm_mode->vsync_start = vdisplay_rnd + vodd_front_porch_lines;
997 drm_mode->vsync_end = drm_mode->vsync_start + V_SYNC_RQD;
998 drm_mode->vtotal = vtotal_lines;
1000 drm_mode->clock = pixel_freq;
1003 drm_mode->vtotal *= 2;
1004 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
1007 drm_mode_set_name(drm_mode);
1009 drm_mode->flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC;
1011 drm_mode->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
1013 return drm_mode;