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
109 static int mga_g200se_set_plls(struct mga_device *mdev, long clock) in mga_g200se_set_plls() argument
120 if (mdev->unique_rev_id <= 0x03) { in mga_g200se_set_plls()
220 static int mga_g200wb_set_plls(struct mga_device *mdev, long clock) in mga_g200wb_set_plls() argument
235 if (mdev->type == G200_EW3) { in mga_g200wb_set_plls()
399 static int mga_g200ev_set_plls(struct mga_device *mdev, long clock) in mga_g200ev_set_plls() argument
492 static int mga_g200eh_set_plls(struct mga_device *mdev, long clock) in mga_g200eh_set_plls() argument
586 static int mga_g200er_set_plls(struct mga_device *mdev, long clock) in mga_g200er_set_plls() argument
666 static int mga_crtc_set_plls(struct mga_device *mdev, long clock) in mga_crtc_set_plls() argument
668 switch(mdev->type) { in mga_crtc_set_plls()
671 return mga_g200se_set_plls(mdev, clock); in mga_crtc_set_plls()
675 return mga_g200wb_set_plls(mdev, clock); in mga_crtc_set_plls()
678 return mga_g200ev_set_plls(mdev, clock); in mga_crtc_set_plls()
681 return mga_g200eh_set_plls(mdev, clock); in mga_crtc_set_plls()
684 return mga_g200er_set_plls(mdev, clock); in mga_crtc_set_plls()
692 struct mga_device *mdev = crtc->dev->dev_private; in mga_g200wb_prepare() local
747 struct mga_device *mdev = crtc->dev->dev_private; in mga_g200wb_commit() local
797 struct mga_device *mdev = crtc->dev->dev_private; in mga_set_start_address() local
827 struct mga_device *mdev = crtc->dev->dev_private; in mga_crtc_do_set_base() local
860 if (&mdev->mfbdev->mfb == mga_fb) { in mga_crtc_do_set_base()
886 struct mga_device *mdev = dev->dev_private; in mga_crtc_mode_set() local
909 bppshift = mdev->bpp_shifts[(crtc->primary->fb->bits_per_pixel >> 3) - 1]; in mga_crtc_mode_set()
911 switch (mdev->type) { in mga_crtc_mode_set()
919 if (mdev->has_sdram) in mga_crtc_mode_set()
979 if (IS_G200_SE(mdev) && in mga_crtc_mode_set()
982 if ((mdev->type == G200_EV || in mga_crtc_mode_set()
983 mdev->type == G200_WB || in mga_crtc_mode_set()
984 mdev->type == G200_EH || in mga_crtc_mode_set()
985 mdev->type == G200_EW3) && in mga_crtc_mode_set()
992 if (mdev->type == G200_ER) in mga_crtc_mode_set()
1087 if (mdev->type == G200_WB || mdev->type == G200_EW3) in mga_crtc_mode_set()
1094 mga_crtc_set_plls(mdev, mode->clock); in mga_crtc_mode_set()
1100 if (mdev->type == G200_ER) in mga_crtc_mode_set()
1103 if (mdev->type == G200_EW3) in mga_crtc_mode_set()
1106 if (mdev->type == G200_EV) { in mga_crtc_mode_set()
1117 memcpy(&mdev->mode, mode, sizeof(struct drm_display_mode)); in mga_crtc_mode_set()
1122 if (mdev->type == G200_ER) { in mga_crtc_mode_set()
1139 if (IS_G200_SE(mdev)) { in mga_crtc_mode_set()
1140 if (mdev->unique_rev_id >= 0x02) { in mga_crtc_mode_set()
1170 if (mdev->unique_rev_id >= 0x01) in mga_crtc_mode_set()
1184 struct mga_device *mdev = dev->dev_private;
1188 if (mdev->suspended)
1207 mdev->suspended = true;
1216 struct mga_device *mdev = dev->dev_private;
1220 if (!mdev->suspended)
1231 mdev->suspended = false;
1241 struct mga_device *mdev = dev->dev_private; in mga_crtc_dpms() local
1271 mga_wait_vsync(mdev); in mga_crtc_dpms()
1272 mga_wait_busy(mdev); in mga_crtc_dpms()
1280 if (mode == DRM_MODE_DPMS_ON && mdev->suspended == true) { in mga_crtc_dpms()
1295 struct mga_device *mdev = dev->dev_private; in mga_crtc_prepare() local
1304 if (mdev->type == G200_SE_A || mdev->type == G200_SE_B) { in mga_crtc_prepare()
1318 if (mdev->type == G200_WB || mdev->type == G200_EW3) in mga_crtc_prepare()
1331 struct mga_device *mdev = dev->dev_private; in mga_crtc_commit() local
1335 if (mdev->type == G200_WB || mdev->type == G200_EW3) in mga_crtc_commit()
1338 if (mdev->type == G200_SE_A || mdev->type == G200_SE_B) { in mga_crtc_commit()
1422 static void mga_crtc_init(struct mga_device *mdev) in mga_crtc_init() argument
1434 drm_crtc_init(mdev->dev, &mga_crtc->base, &mga_crtc_funcs); in mga_crtc_init()
1437 mdev->mode_info.crtc = mga_crtc; in mga_crtc_init()
1593 struct mga_device *mdev = (struct mga_device*)dev->dev_private; in mga_vga_mode_valid() local
1596 if (IS_G200_SE(mdev)) { in mga_vga_mode_valid()
1597 if (mdev->unique_rev_id == 0x01) { in mga_vga_mode_valid()
1605 } else if (mdev->unique_rev_id == 0x02) { in mga_vga_mode_valid()
1614 } else if (mdev->type == G200_WB) { in mga_vga_mode_valid()
1622 } else if (mdev->type == G200_EV && in mga_vga_mode_valid()
1626 } else if (mdev->type == G200_EH && in mga_vga_mode_valid()
1630 } else if (mdev->type == G200_ER && in mga_vga_mode_valid()
1654 if ((mode->hdisplay * mode->vdisplay * (bpp/8)) > mdev->mc.vram_size) { in mga_vga_mode_valid()
1726 int mgag200_modeset_init(struct mga_device *mdev) in mgag200_modeset_init() argument
1732 mdev->mode_info.mode_config_initialized = true; in mgag200_modeset_init()
1734 mdev->dev->mode_config.max_width = MGAG200_MAX_FB_WIDTH; in mgag200_modeset_init()
1735 mdev->dev->mode_config.max_height = MGAG200_MAX_FB_HEIGHT; in mgag200_modeset_init()
1737 mdev->dev->mode_config.fb_base = mdev->mc.vram_base; in mgag200_modeset_init()
1739 mga_crtc_init(mdev); in mgag200_modeset_init()
1741 encoder = mga_encoder_init(mdev->dev); in mgag200_modeset_init()
1747 connector = mga_vga_init(mdev->dev); in mgag200_modeset_init()
1755 ret = mgag200_fbdev_init(mdev); in mgag200_modeset_init()
1764 void mgag200_modeset_fini(struct mga_device *mdev) in mgag200_modeset_fini() argument