Lines Matching refs:drm_mode
635 struct drm_display_mode *drm_mode;
647 drm_mode = drm_mode_create(dev);
648 if (!drm_mode)
671 drm_mode->hdisplay = hdisplay_rnd + 2 * hmargin;
684 drm_mode->vdisplay = vdisplay + 2 * vmargin;
733 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin +
753 hblank = drm_mode->hdisplay * hblank_percentage /
757 drm_mode->htotal = drm_mode->hdisplay + hblank;
758 drm_mode->hsync_end = drm_mode->hdisplay + hblank / 2;
759 drm_mode->hsync_start = drm_mode->hsync_end -
760 (drm_mode->htotal * CVT_HSYNC_PERCENTAGE) / 100;
761 drm_mode->hsync_start += CVT_H_GRANULARITY -
762 drm_mode->hsync_start % CVT_H_GRANULARITY;
764 drm_mode->vsync_start = drm_mode->vdisplay + CVT_MIN_V_PORCH;
765 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
789 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin + vbilines;
791 drm_mode->htotal = drm_mode->hdisplay + CVT_RB_H_BLANK;
793 drm_mode->hsync_end = drm_mode->hdisplay + CVT_RB_H_BLANK / 2;
794 drm_mode->hsync_start = drm_mode->hsync_end - CVT_RB_H_SYNC;
796 drm_mode->vsync_start = drm_mode->vdisplay + CVT_RB_VFPORCH;
797 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
800 tmp = drm_mode->htotal; /* perform intermediate calcs in u64 */
803 tmp -= drm_mode->clock % CVT_CLOCK_STEP;
804 drm_mode->clock = tmp;
808 drm_mode->vtotal *= 2;
809 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
812 drm_mode_set_name(drm_mode);
814 drm_mode->flags |= (DRM_MODE_FLAG_PHSYNC |
817 drm_mode->flags |= (DRM_MODE_FLAG_PVSYNC |
820 return drm_mode;
864 struct drm_display_mode *drm_mode;
882 drm_mode = drm_mode_create(dev);
883 if (!drm_mode)
990 drm_mode->hdisplay = hdisplay_rnd;
991 drm_mode->hsync_start = hdisplay_rnd + hfront_porch;
992 drm_mode->hsync_end = drm_mode->hsync_start + hsync;
993 drm_mode->htotal = total_pixels;
994 drm_mode->vdisplay = vdisplay_rnd;
995 drm_mode->vsync_start = vdisplay_rnd + vodd_front_porch_lines;
996 drm_mode->vsync_end = drm_mode->vsync_start + V_SYNC_RQD;
997 drm_mode->vtotal = vtotal_lines;
999 drm_mode->clock = pixel_freq;
1002 drm_mode->vtotal *= 2;
1003 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
1006 drm_mode_set_name(drm_mode);
1008 drm_mode->flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC;
1010 drm_mode->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
1012 return drm_mode;