Lines Matching refs:drm_mode

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