Lines Matching refs:drm_mode

155 	struct drm_display_mode *drm_mode;
167 drm_mode = drm_mode_create(dev);
168 if (!drm_mode)
191 drm_mode->hdisplay = hdisplay_rnd + 2 * hmargin;
204 drm_mode->vdisplay = vdisplay + 2 * vmargin;
253 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin +
273 hblank = drm_mode->hdisplay * hblank_percentage /
277 drm_mode->htotal = drm_mode->hdisplay + hblank;
278 drm_mode->hsync_end = drm_mode->hdisplay + hblank / 2;
279 drm_mode->hsync_start = drm_mode->hsync_end -
280 (drm_mode->htotal * CVT_HSYNC_PERCENTAGE) / 100;
281 drm_mode->hsync_start += CVT_H_GRANULARITY -
282 drm_mode->hsync_start % CVT_H_GRANULARITY;
284 drm_mode->vsync_start = drm_mode->vdisplay + CVT_MIN_V_PORCH;
285 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
309 drm_mode->vtotal = vdisplay_rnd + 2 * vmargin + vbilines;
311 drm_mode->htotal = drm_mode->hdisplay + CVT_RB_H_BLANK;
313 drm_mode->hsync_end = drm_mode->hdisplay + CVT_RB_H_BLANK / 2;
314 drm_mode->hsync_start = drm_mode->hsync_end - CVT_RB_H_SYNC;
316 drm_mode->vsync_start = drm_mode->vdisplay + CVT_RB_VFPORCH;
317 drm_mode->vsync_end = drm_mode->vsync_start + vsync;
320 tmp = drm_mode->htotal; /* perform intermediate calcs in u64 */
323 tmp -= drm_mode->clock % CVT_CLOCK_STEP;
324 drm_mode->clock = tmp;
328 drm_mode->vtotal *= 2;
329 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
332 drm_mode_set_name(drm_mode);
334 drm_mode->flags |= (DRM_MODE_FLAG_PHSYNC |
337 drm_mode->flags |= (DRM_MODE_FLAG_PVSYNC |
340 return drm_mode;
384 struct drm_display_mode *drm_mode;
402 drm_mode = drm_mode_create(dev);
403 if (!drm_mode)
510 drm_mode->hdisplay = hdisplay_rnd;
511 drm_mode->hsync_start = hdisplay_rnd + hfront_porch;
512 drm_mode->hsync_end = drm_mode->hsync_start + hsync;
513 drm_mode->htotal = total_pixels;
514 drm_mode->vdisplay = vdisplay_rnd;
515 drm_mode->vsync_start = vdisplay_rnd + vodd_front_porch_lines;
516 drm_mode->vsync_end = drm_mode->vsync_start + V_SYNC_RQD;
517 drm_mode->vtotal = vtotal_lines;
519 drm_mode->clock = pixel_freq;
522 drm_mode->vtotal *= 2;
523 drm_mode->flags |= DRM_MODE_FLAG_INTERLACE;
526 drm_mode_set_name(drm_mode);
528 drm_mode->flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC;
530 drm_mode->flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC;
532 return drm_mode;