Lines Matching refs:mode

101 				const struct drm_display_mode *mode,  in mga_crtc_mode_fixup()  argument
781 struct drm_display_mode *mode, in mga_crtc_mode_set() argument
865 if (mode->flags & DRM_MODE_FLAG_NHSYNC) in mga_crtc_mode_set()
867 if (mode->flags & DRM_MODE_FLAG_NVSYNC) in mga_crtc_mode_set()
906 hdisplay = mode->hdisplay / 8 - 1; in mga_crtc_mode_set()
907 hsyncstart = mode->hsync_start / 8 - 1; in mga_crtc_mode_set()
908 hsyncend = mode->hsync_end / 8 - 1; in mga_crtc_mode_set()
909 htotal = mode->htotal / 8 - 1; in mga_crtc_mode_set()
915 vdisplay = mode->vdisplay - 1; in mga_crtc_mode_set()
916 vsyncstart = mode->vsync_start - 1; in mga_crtc_mode_set()
917 vsyncend = mode->vsync_end - 1; in mga_crtc_mode_set()
918 vtotal = mode->vtotal - 2; in mga_crtc_mode_set()
990 mga_crtc_set_plls(mdev, mode->clock); in mga_crtc_mode_set()
1010 memcpy(&mdev->mode, mode, sizeof(struct drm_display_mode)); in mga_crtc_mode_set()
1045 mb = (mode->clock * bpp) / 1000; in mga_crtc_mode_set()
1131 static void mga_crtc_dpms(struct drm_crtc *crtc, int mode) in mga_crtc_dpms() argument
1137 switch (mode) { in mga_crtc_dpms()
1158 if (mode == DRM_MODE_DPMS_OFF) { in mga_crtc_dpms()
1173 if (mode == DRM_MODE_DPMS_ON && mdev->suspended == true) { in mga_crtc_dpms()
1376 const struct drm_display_mode *mode, in mga_encoder_mode_fixup() argument
1383 struct drm_display_mode *mode, in mga_encoder_mode_set() argument
1456 static uint32_t mga_vga_calculate_mode_bandwidth(struct drm_display_mode *mode, in mga_vga_calculate_mode_bandwidth() argument
1465 if (!mode->htotal || !mode->vtotal || !mode->clock) in mga_vga_calculate_mode_bandwidth()
1468 active_area = mode->hdisplay * mode->vdisplay; in mga_vga_calculate_mode_bandwidth()
1469 total_area = mode->htotal * mode->vtotal; in mga_vga_calculate_mode_bandwidth()
1471 pixels_per_second = active_area * mode->clock * 1000; in mga_vga_calculate_mode_bandwidth()
1483 struct drm_display_mode *mode) in mga_vga_mode_valid() argument
1491 if (mode->hdisplay > 1600) in mga_vga_mode_valid()
1493 if (mode->vdisplay > 1200) in mga_vga_mode_valid()
1495 if (mga_vga_calculate_mode_bandwidth(mode, bpp) in mga_vga_mode_valid()
1499 if (mode->hdisplay > 1920) in mga_vga_mode_valid()
1501 if (mode->vdisplay > 1200) in mga_vga_mode_valid()
1503 if (mga_vga_calculate_mode_bandwidth(mode, bpp) in mga_vga_mode_valid()
1508 if (mode->hdisplay > 1280) in mga_vga_mode_valid()
1510 if (mode->vdisplay > 1024) in mga_vga_mode_valid()
1512 if (mga_vga_calculate_mode_bandwidth(mode, in mga_vga_mode_valid()
1516 (mga_vga_calculate_mode_bandwidth(mode, bpp) in mga_vga_mode_valid()
1520 (mga_vga_calculate_mode_bandwidth(mode, bpp) in mga_vga_mode_valid()
1524 (mga_vga_calculate_mode_bandwidth(mode, in mga_vga_mode_valid()
1529 if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 || in mga_vga_mode_valid()
1530 (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) { in mga_vga_mode_valid()
1534 if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 || in mga_vga_mode_valid()
1535 mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 || in mga_vga_mode_valid()
1536 mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 || in mga_vga_mode_valid()
1537 mode->crtc_vsync_end > 4096 || mode->crtc_vtotal > 4096) { in mga_vga_mode_valid()
1547 if ((mode->hdisplay * mode->vdisplay * (bpp/8)) > mdev->mc.vram_size) { in mga_vga_mode_valid()