Lines Matching refs:mdev
32 struct mga_device *mdev = dev->dev_private; in mga_crtc_load_lut() local
71 static inline void mga_wait_vsync(struct mga_device *mdev) in mga_wait_vsync() argument
86 static inline void mga_wait_busy(struct mga_device *mdev) in mga_wait_busy() argument
107 static int mga_g200se_set_plls(struct mga_device *mdev, long clock) in mga_g200se_set_plls() argument
158 static int mga_g200wb_set_plls(struct mga_device *mdev, long clock) in mga_g200wb_set_plls() argument
298 static int mga_g200ev_set_plls(struct mga_device *mdev, long clock) in mga_g200ev_set_plls() argument
392 static int mga_g200eh_set_plls(struct mga_device *mdev, long clock) in mga_g200eh_set_plls() argument
487 static int mga_g200er_set_plls(struct mga_device *mdev, long clock) in mga_g200er_set_plls() argument
567 static int mga_crtc_set_plls(struct mga_device *mdev, long clock) in mga_crtc_set_plls() argument
569 switch(mdev->type) { in mga_crtc_set_plls()
572 return mga_g200se_set_plls(mdev, clock); in mga_crtc_set_plls()
575 return mga_g200wb_set_plls(mdev, clock); in mga_crtc_set_plls()
578 return mga_g200ev_set_plls(mdev, clock); in mga_crtc_set_plls()
581 return mga_g200eh_set_plls(mdev, clock); in mga_crtc_set_plls()
584 return mga_g200er_set_plls(mdev, clock); in mga_crtc_set_plls()
592 struct mga_device *mdev = crtc->dev->dev_private; in mga_g200wb_prepare() local
647 struct mga_device *mdev = crtc->dev->dev_private; in mga_g200wb_commit() local
697 struct mga_device *mdev = crtc->dev->dev_private; in mga_set_start_address() local
727 struct mga_device *mdev = crtc->dev->dev_private; in mga_crtc_do_set_base() local
760 if (&mdev->mfbdev->mfb == mga_fb) { in mga_crtc_do_set_base()
786 struct mga_device *mdev = dev->dev_private; in mga_crtc_mode_set() local
809 bppshift = mdev->bpp_shifts[(crtc->primary->fb->bits_per_pixel >> 3) - 1]; in mga_crtc_mode_set()
811 switch (mdev->type) { in mga_crtc_mode_set()
819 if (mdev->has_sdram) in mga_crtc_mode_set()
878 if (IS_G200_SE(mdev) && in mga_crtc_mode_set()
881 if ((mdev->type == G200_EV || mdev->type == G200_WB || mdev->type == G200_EH) && in mga_crtc_mode_set()
888 if (mdev->type == G200_ER) in mga_crtc_mode_set()
983 if (mdev->type == G200_WB) in mga_crtc_mode_set()
990 mga_crtc_set_plls(mdev, mode->clock); in mga_crtc_mode_set()
996 if (mdev->type == G200_ER) in mga_crtc_mode_set()
999 if (mdev->type == G200_EV) { in mga_crtc_mode_set()
1010 memcpy(&mdev->mode, mode, sizeof(struct drm_display_mode)); in mga_crtc_mode_set()
1015 if (mdev->type == G200_ER) { in mga_crtc_mode_set()
1032 if (IS_G200_SE(mdev)) { in mga_crtc_mode_set()
1033 if (mdev->unique_rev_id >= 0x02) { in mga_crtc_mode_set()
1063 if (mdev->unique_rev_id >= 0x01) in mga_crtc_mode_set()
1077 struct mga_device *mdev = dev->dev_private;
1081 if (mdev->suspended)
1100 mdev->suspended = true;
1109 struct mga_device *mdev = dev->dev_private;
1113 if (!mdev->suspended)
1124 mdev->suspended = false;
1134 struct mga_device *mdev = dev->dev_private; in mga_crtc_dpms() local
1164 mga_wait_vsync(mdev); in mga_crtc_dpms()
1165 mga_wait_busy(mdev); in mga_crtc_dpms()
1173 if (mode == DRM_MODE_DPMS_ON && mdev->suspended == true) { in mga_crtc_dpms()
1188 struct mga_device *mdev = dev->dev_private; in mga_crtc_prepare() local
1197 if (mdev->type == G200_SE_A || mdev->type == G200_SE_B) { in mga_crtc_prepare()
1211 if (mdev->type == G200_WB) in mga_crtc_prepare()
1224 struct mga_device *mdev = dev->dev_private; in mga_crtc_commit() local
1228 if (mdev->type == G200_WB) in mga_crtc_commit()
1231 if (mdev->type == G200_SE_A || mdev->type == G200_SE_B) { in mga_crtc_commit()
1315 static void mga_crtc_init(struct mga_device *mdev) in mga_crtc_init() argument
1327 drm_crtc_init(mdev->dev, &mga_crtc->base, &mga_crtc_funcs); in mga_crtc_init()
1330 mdev->mode_info.crtc = mga_crtc; in mga_crtc_init()
1486 struct mga_device *mdev = (struct mga_device*)dev->dev_private; in mga_vga_mode_valid() local
1489 if (IS_G200_SE(mdev)) { in mga_vga_mode_valid()
1490 if (mdev->unique_rev_id == 0x01) { in mga_vga_mode_valid()
1498 } else if (mdev->unique_rev_id >= 0x02) { in mga_vga_mode_valid()
1507 } else if (mdev->type == G200_WB) { in mga_vga_mode_valid()
1515 } else if (mdev->type == G200_EV && in mga_vga_mode_valid()
1519 } else if (mdev->type == G200_EH && in mga_vga_mode_valid()
1523 } else if (mdev->type == G200_ER && in mga_vga_mode_valid()
1547 if ((mode->hdisplay * mode->vdisplay * (bpp/8)) > mdev->mc.vram_size) { in mga_vga_mode_valid()
1619 int mgag200_modeset_init(struct mga_device *mdev) in mgag200_modeset_init() argument
1625 mdev->mode_info.mode_config_initialized = true; in mgag200_modeset_init()
1627 mdev->dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH; in mgag200_modeset_init()
1628 mdev->dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT; in mgag200_modeset_init()
1630 mdev->dev->mode_config.fb_base = mdev->mc.vram_base; in mgag200_modeset_init()
1632 mga_crtc_init(mdev); in mgag200_modeset_init()
1634 encoder = mga_encoder_init(mdev->dev); in mgag200_modeset_init()
1640 connector = mga_vga_init(mdev->dev); in mgag200_modeset_init()
1648 ret = mgag200_fbdev_init(mdev); in mgag200_modeset_init()
1657 void mgag200_modeset_fini(struct mga_device *mdev) in mgag200_modeset_fini() argument