Searched refs:xgifb_info (Results 1 - 5 of 5) sorted by relevance

/linux-4.4.14/drivers/staging/xgifb/
H A DXGI_main_26.c32 static void dumpVGAReg(struct xgifb_video_info *xgifb_info) dumpVGAReg() argument
51 static inline void dumpVGAReg(struct xgifb_video_info *xgifb_info) dumpVGAReg() argument
234 static int XGIfb_GetXG21DefaultLVDSModeIdx(struct xgifb_video_info *xgifb_info) XGIfb_GetXG21DefaultLVDSModeIdx() argument
239 && (XGIbios_mode[i].xres <= xgifb_info->lvds_data.LVDSHDE)) { XGIfb_GetXG21DefaultLVDSModeIdx()
240 if ((XGIbios_mode[i].xres == xgifb_info->lvds_data.LVDSHDE) XGIfb_GetXG21DefaultLVDSModeIdx()
241 && (XGIbios_mode[i].yres == xgifb_info->lvds_data.LVDSVDE) XGIfb_GetXG21DefaultLVDSModeIdx()
251 static void XGIfb_search_mode(struct xgifb_video_info *xgifb_info, XGIfb_search_mode() argument
269 xgifb_info->mode_idx = i; XGIfb_search_mode()
276 static void XGIfb_search_vesamode(struct xgifb_video_info *xgifb_info, XGIfb_search_vesamode() argument
289 xgifb_info->mode_idx = i; XGIfb_search_vesamode()
299 static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex) XGIfb_validate_mode() argument
302 struct xgi_hw_device_info *hw_info = &xgifb_info->hw_info; XGIfb_validate_mode()
305 if (xgifb_info->chip == XG21) { XGIfb_validate_mode()
306 if (xgifb_info->display2 == XGIFB_DISP_LCD) { XGIfb_validate_mode()
307 xres = xgifb_info->lvds_data.LVDSHDE; XGIfb_validate_mode()
308 yres = xgifb_info->lvds_data.LVDSVDE; XGIfb_validate_mode()
325 if (xgifb_info->chip == XG27) XGIfb_validate_mode()
331 switch (xgifb_info->display2) { XGIfb_validate_mode()
484 if (xgifb_info->TV_type == TVMODE_NTSC) { XGIfb_validate_mode()
487 } else if (xgifb_info->TV_type == TVMODE_PAL) { XGIfb_validate_mode()
492 if (xgifb_info->hasVB == HASVB_LVDS_CHRONTEL || XGIfb_validate_mode()
493 xgifb_info->hasVB == HASVB_CHRONTEL) { XGIfb_validate_mode()
498 if (xgifb_info->TV_type == TVMODE_NTSC) { XGIfb_validate_mode()
518 if (required_mem > xgifb_info->video_size) XGIfb_validate_mode()
543 static u8 XGIfb_search_refresh_rate(struct xgifb_video_info *xgifb_info, XGIfb_search_refresh_rate() argument
549 xres = XGIbios_mode[xgifb_info->mode_idx].xres; XGIfb_search_refresh_rate()
550 yres = XGIbios_mode[xgifb_info->mode_idx].yres; XGIfb_search_refresh_rate()
552 xgifb_info->rate_idx = 0; XGIfb_search_refresh_rate()
557 xgifb_info->rate_idx = XGIfb_vrate[i].idx; XGIfb_search_refresh_rate()
563 xgifb_info->rate_idx = XGIfb_search_refresh_rate()
565 xgifb_info->refresh_rate = XGIfb_search_refresh_rate()
573 xgifb_info->rate_idx = XGIfb_search_refresh_rate()
575 xgifb_info->refresh_rate = XGIfb_search_refresh_rate()
582 xgifb_info->rate_idx = XGIfb_vrate[i].idx; XGIfb_search_refresh_rate()
588 if (xgifb_info->rate_idx > 0) XGIfb_search_refresh_rate()
589 return xgifb_info->rate_idx; XGIfb_search_refresh_rate()
613 static void XGIfb_bpp_to_var(struct xgifb_video_info *xgifb_info, XGIfb_bpp_to_var() argument
620 xgifb_info->video_cmap_len = 256; XGIfb_bpp_to_var()
631 xgifb_info->video_cmap_len = 16; XGIfb_bpp_to_var()
642 xgifb_info->video_cmap_len = 16; XGIfb_bpp_to_var()
649 static void XGIfb_pre_setmode(struct xgifb_video_info *xgifb_info) XGIfb_pre_setmode() argument
656 switch (xgifb_info->display2) { XGIfb_pre_setmode()
666 if (xgifb_info->TV_type == TVMODE_HIVISION) XGIfb_pre_setmode()
669 else if (xgifb_info->TV_plug == TVPLUG_SVIDEO) XGIfb_pre_setmode()
672 else if (xgifb_info->TV_plug == TVPLUG_COMPOSITE) XGIfb_pre_setmode()
675 else if (xgifb_info->TV_plug == TVPLUG_SCART) XGIfb_pre_setmode()
680 if (XGIfb_tvmode == 1 || xgifb_info->TV_type == TVMODE_PAL) XGIfb_pre_setmode()
693 (xgifb_info->rate_idx & 0x0F)); XGIfb_pre_setmode()
696 static void XGIfb_post_setmode(struct xgifb_video_info *xgifb_info) XGIfb_post_setmode() argument
701 if (xgifb_info->video_bpp == 8) { XGIfb_post_setmode()
706 if ((xgifb_info->hasVB == HASVB_LVDS) || XGIfb_post_setmode()
707 (xgifb_info->hasVB == HASVB_LVDS_CHRONTEL)) { XGIfb_post_setmode()
714 if (xgifb_info->display2 == XGIFB_DISP_LCD) XGIfb_post_setmode()
719 if (xgifb_info->hasVB != HASVB_NONE) { XGIfb_post_setmode()
738 if (xgifb_info->display2 == XGIFB_DISP_TV && XGIfb_post_setmode()
739 xgifb_info->hasVB == HASVB_301) { XGIfb_post_setmode()
746 switch (xgifb_info->video_width) { XGIfb_post_setmode()
748 filter_tb = (xgifb_info->TV_type == XGIfb_post_setmode()
752 filter_tb = (xgifb_info->TV_type == XGIfb_post_setmode()
756 filter_tb = (xgifb_info->TV_type == XGIfb_post_setmode()
760 filter_tb = (xgifb_info->TV_type == XGIfb_post_setmode()
772 if (xgifb_info->TV_type == TVMODE_NTSC) { XGIfb_post_setmode()
776 if (xgifb_info->TV_plug == TVPLUG_SVIDEO) { XGIfb_post_setmode()
780 } else if (xgifb_info->TV_plug XGIfb_post_setmode()
785 switch (xgifb_info->video_width) { XGIfb_post_setmode()
831 } else if (xgifb_info->TV_type == TVMODE_PAL) { XGIfb_post_setmode()
835 if (xgifb_info->TV_plug == TVPLUG_SVIDEO) { XGIfb_post_setmode()
839 } else if (xgifb_info->TV_plug XGIfb_post_setmode()
844 switch (xgifb_info->video_width) { XGIfb_post_setmode()
924 struct xgifb_video_info *xgifb_info = info->par; XGIfb_do_set_var() local
925 struct xgi_hw_device_info *hw_info = &xgifb_info->hw_info; XGIfb_do_set_var()
955 xgifb_info->refresh_rate = (unsigned int) (hrate * 2 XGIfb_do_set_var()
958 xgifb_info->refresh_rate = 60; XGIfb_do_set_var()
965 xgifb_info->refresh_rate); XGIfb_do_set_var()
967 old_mode = xgifb_info->mode_idx; XGIfb_do_set_var()
968 xgifb_info->mode_idx = 0; XGIfb_do_set_var()
970 while ((XGIbios_mode[xgifb_info->mode_idx].mode_no != 0) && XGIfb_do_set_var()
971 (XGIbios_mode[xgifb_info->mode_idx].xres <= var->xres)) { XGIfb_do_set_var()
972 if ((XGIbios_mode[xgifb_info->mode_idx].xres == var->xres) && XGIfb_do_set_var()
973 (XGIbios_mode[xgifb_info->mode_idx].yres == var->yres) && XGIfb_do_set_var()
974 (XGIbios_mode[xgifb_info->mode_idx].bpp XGIfb_do_set_var()
979 xgifb_info->mode_idx++; XGIfb_do_set_var()
983 xgifb_info->mode_idx = XGIfb_validate_mode(xgifb_info, XGIfb_do_set_var()
984 xgifb_info->mode_idx); XGIfb_do_set_var()
986 xgifb_info->mode_idx = -1; XGIfb_do_set_var()
988 if (xgifb_info->mode_idx < 0) { XGIfb_do_set_var()
991 xgifb_info->mode_idx = old_mode; XGIfb_do_set_var()
995 if (XGIfb_search_refresh_rate(xgifb_info, XGIfb_do_set_var()
996 xgifb_info->refresh_rate) == 0) { XGIfb_do_set_var()
997 xgifb_info->rate_idx = 1; XGIfb_do_set_var()
998 xgifb_info->refresh_rate = 60; XGIfb_do_set_var()
1003 XGIfb_pre_setmode(xgifb_info); XGIfb_do_set_var()
1004 if (XGISetModeNew(xgifb_info, hw_info, XGIfb_do_set_var()
1005 XGIbios_mode[xgifb_info->mode_idx].mode_no) XGIfb_do_set_var()
1008 XGIbios_mode[xgifb_info->mode_idx].mode_no); XGIfb_do_set_var()
1021 XGIfb_post_setmode(xgifb_info); XGIfb_do_set_var()
1024 XGIbios_mode[xgifb_info->mode_idx].xres, XGIfb_do_set_var()
1025 XGIbios_mode[xgifb_info->mode_idx].yres, XGIfb_do_set_var()
1026 XGIbios_mode[xgifb_info->mode_idx].bpp, XGIfb_do_set_var()
1027 xgifb_info->refresh_rate); XGIfb_do_set_var()
1029 xgifb_info->video_bpp = XGIbios_mode[xgifb_info->mode_idx].bpp; XGIfb_do_set_var()
1030 xgifb_info->video_vwidth = info->var.xres_virtual; XGIfb_do_set_var()
1031 xgifb_info->video_width = XGIfb_do_set_var()
1032 XGIbios_mode[xgifb_info->mode_idx].xres; XGIfb_do_set_var()
1033 xgifb_info->video_vheight = info->var.yres_virtual; XGIfb_do_set_var()
1034 xgifb_info->video_height = XGIfb_do_set_var()
1035 XGIbios_mode[xgifb_info->mode_idx].yres; XGIfb_do_set_var()
1036 xgifb_info->org_x = xgifb_info->org_y = 0; XGIfb_do_set_var()
1037 xgifb_info->video_linelength = info->var.xres_virtual XGIfb_do_set_var()
1038 * (xgifb_info->video_bpp >> 3); XGIfb_do_set_var()
1039 switch (xgifb_info->video_bpp) { XGIfb_do_set_var()
1041 xgifb_info->DstColor = 0x0000; XGIfb_do_set_var()
1042 xgifb_info->XGI310_AccelDepth = 0x00000000; XGIfb_do_set_var()
1043 xgifb_info->video_cmap_len = 256; XGIfb_do_set_var()
1050 xgifb_info->DstColor = 0x8000; XGIfb_do_set_var()
1051 xgifb_info->XGI310_AccelDepth = 0x00010000; XGIfb_do_set_var()
1056 xgifb_info->video_cmap_len = 16; XGIfb_do_set_var()
1059 xgifb_info->DstColor = 0xC000; XGIfb_do_set_var()
1060 xgifb_info->XGI310_AccelDepth = 0x00020000; XGIfb_do_set_var()
1061 xgifb_info->video_cmap_len = 16; XGIfb_do_set_var()
1068 xgifb_info->video_cmap_len = 16; XGIfb_do_set_var()
1070 xgifb_info->video_bpp); XGIfb_do_set_var()
1074 XGIfb_bpp_to_var(xgifb_info, var); /*update ARGB info*/ XGIfb_do_set_var()
1076 dumpVGAReg(xgifb_info); XGIfb_do_set_var()
1082 struct xgifb_video_info *xgifb_info = info->par; XGIfb_pan_var() local
1108 if (xgifb_info->display2 != XGIFB_DISP_NONE) { XGIfb_pan_var()
1140 struct xgifb_video_info *xgifb_info = info->par; XGIfb_setcolreg() local
1151 if (xgifb_info->display2 != XGIFB_DISP_NONE) { XGIfb_setcolreg()
1179 struct xgifb_video_info *xgifb_info = info->par; XGIfb_get_fix() local
1189 fix->smem_start = xgifb_info->video_base; XGIfb_get_fix()
1190 fix->smem_len = xgifb_info->video_size; XGIfb_get_fix()
1198 if (xgifb_info->video_bpp == 8) XGIfb_get_fix()
1206 fix->line_length = xgifb_info->video_linelength; XGIfb_get_fix()
1207 fix->mmio_start = xgifb_info->mmio_base; XGIfb_get_fix()
1208 fix->mmio_len = xgifb_info->mmio_size; XGIfb_get_fix()
1227 struct xgifb_video_info *xgifb_info = info->par; XGIfb_check_var() local
1258 xgifb_info->refresh_rate = XGIfb_check_var()
1264 __func__, drate, hrate, xgifb_info->refresh_rate); XGIfb_check_var()
1266 xgifb_info->refresh_rate = 60; XGIfb_check_var()
1279 if (XGIfb_validate_mode(xgifb_info, search_idx) > 0) { XGIfb_check_var()
1297 if (XGIfb_validate_mode(xgifb_info, XGIfb_check_var()
1319 XGIfb_bpp_to_var(xgifb_info, var); XGIfb_check_var()
1378 struct xgifb_video_info *xgifb_info = info->par; XGIfb_blank() local
1412 static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info) XGIfb_get_dram_size() argument
1419 if (xgifb_info->chip == XG27) XGIfb_get_dram_size()
1428 xgifb_info->video_size = 0x100000; XGIfb_get_dram_size()
1431 xgifb_info->video_size = 0x200000; XGIfb_get_dram_size()
1434 xgifb_info->video_size = 0x400000; XGIfb_get_dram_size()
1437 xgifb_info->video_size = 0x800000; XGIfb_get_dram_size()
1440 xgifb_info->video_size = 0x1000000; XGIfb_get_dram_size()
1443 xgifb_info->video_size = 0x2000000; XGIfb_get_dram_size()
1446 xgifb_info->video_size = 0x4000000; XGIfb_get_dram_size()
1449 xgifb_info->video_size = 0x8000000; XGIfb_get_dram_size()
1452 xgifb_info->video_size = 0x10000000; XGIfb_get_dram_size()
1459 switch (xgifb_info->chip) { XGIfb_get_dram_size()
1484 xgifb_info->video_size = xgifb_info->video_size * ChannelNum; XGIfb_get_dram_size()
1488 xgifb_info->video_size, ChannelNum); XGIfb_get_dram_size()
1493 static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info) XGIfb_detect_VB() argument
1497 xgifb_info->TV_plug = xgifb_info->TV_type = 0; XGIfb_detect_VB()
1510 if (!xgifb_info->display2_force) { XGIfb_detect_VB()
1512 xgifb_info->display2 = XGIFB_DISP_TV; XGIfb_detect_VB()
1514 xgifb_info->display2 = XGIFB_DISP_LCD; XGIfb_detect_VB()
1516 xgifb_info->display2 = XGIFB_DISP_CRT; XGIfb_detect_VB()
1518 xgifb_info->display2 = XGIFB_DISP_NONE; XGIfb_detect_VB()
1523 xgifb_info->TV_plug = XGIfb_tvplug; XGIfb_detect_VB()
1525 xgifb_info->TV_type = TVMODE_HIVISION; XGIfb_detect_VB()
1526 xgifb_info->TV_plug = TVPLUG_SVIDEO; XGIfb_detect_VB()
1528 xgifb_info->TV_plug = TVPLUG_SVIDEO; XGIfb_detect_VB()
1530 xgifb_info->TV_plug = TVPLUG_COMPOSITE; XGIfb_detect_VB()
1532 xgifb_info->TV_plug = TVPLUG_SCART; XGIfb_detect_VB()
1534 if (xgifb_info->TV_type == 0) { XGIfb_detect_VB()
1537 xgifb_info->TV_type = TVMODE_PAL; XGIfb_detect_VB()
1539 xgifb_info->TV_type = TVMODE_NTSC; XGIfb_detect_VB()
1551 static bool XGIfb_has_VB(struct xgifb_video_info *xgifb_info) XGIfb_has_VB() argument
1558 xgifb_info->hasVB = HASVB_301; XGIfb_has_VB()
1561 xgifb_info->hasVB = HASVB_302; XGIfb_has_VB()
1564 xgifb_info->hasVB = HASVB_NONE; XGIfb_has_VB()
1570 static void XGIfb_get_VB_type(struct xgifb_video_info *xgifb_info) XGIfb_get_VB_type() argument
1574 if (!XGIfb_has_VB(xgifb_info)) { XGIfb_get_VB_type()
1578 xgifb_info->hasVB = HASVB_LVDS; XGIfb_get_VB_type()
1581 xgifb_info->hasVB = HASVB_LVDS_CHRONTEL; XGIfb_get_VB_type()
1654 struct xgifb_video_info *xgifb_info; xgifb_probe() local
1658 fb_info = framebuffer_alloc(sizeof(*xgifb_info), &pdev->dev); xgifb_probe()
1662 xgifb_info = fb_info->par; xgifb_probe()
1663 hw_info = &xgifb_info->hw_info; xgifb_probe()
1664 xgifb_info->fb_info = fb_info; xgifb_probe()
1665 xgifb_info->chip_id = pdev->device; xgifb_probe()
1668 &xgifb_info->revision_id); xgifb_probe()
1669 hw_info->jChipRevision = xgifb_info->revision_id; xgifb_probe()
1671 xgifb_info->pcibus = pdev->bus->number; xgifb_probe()
1672 xgifb_info->pcislot = PCI_SLOT(pdev->devfn); xgifb_probe()
1673 xgifb_info->pcifunc = PCI_FUNC(pdev->devfn); xgifb_probe()
1674 xgifb_info->subsysvendor = pdev->subsystem_vendor; xgifb_probe()
1675 xgifb_info->subsysdevice = pdev->subsystem_device; xgifb_probe()
1678 xgifb_info->video_base = pci_resource_start(pdev, 0); xgifb_probe()
1679 xgifb_info->mmio_base = pci_resource_start(pdev, 1); xgifb_probe()
1680 xgifb_info->mmio_size = pci_resource_len(pdev, 1); xgifb_probe()
1681 xgifb_info->vga_base = pci_resource_start(pdev, 2) + 0x30; xgifb_probe()
1684 xgifb_info->vga_base); xgifb_probe()
1692 xgifb_info->display2 = XGIfb_crt2type; xgifb_probe()
1693 xgifb_info->display2_force = true; xgifb_probe()
1696 XGIRegInit(&xgifb_info->dev_info, xgifb_info->vga_base); xgifb_probe()
1707 switch (xgifb_info->chip_id) { xgifb_probe()
1712 xgifb_info->chip = XG21; xgifb_probe()
1714 xgifb_info->chip = XG20; xgifb_probe()
1717 xgifb_info->chip = XG40; xgifb_probe()
1720 xgifb_info->chip = XG42; xgifb_probe()
1723 xgifb_info->chip = XG27; xgifb_probe()
1730 dev_info(&pdev->dev, "chipid = %x\n", xgifb_info->chip); xgifb_probe()
1731 hw_info->jChipType = xgifb_info->chip; xgifb_probe()
1733 if (XGIfb_get_dram_size(xgifb_info)) { xgifb_probe()
1734 xgifb_info->video_size = min_t(unsigned long, video_size_max, xgifb_probe()
1736 } else if (xgifb_info->video_size > video_size_max) { xgifb_probe()
1737 xgifb_info->video_size = video_size_max; xgifb_probe()
1747 hw_info->ulVideoMemorySize = xgifb_info->video_size; xgifb_probe()
1749 if (!request_mem_region(xgifb_info->video_base, xgifb_probe()
1750 xgifb_info->video_size, xgifb_probe()
1753 xgifb_info->video_size); xgifb_probe()
1760 if (!request_mem_region(xgifb_info->mmio_base, xgifb_probe()
1761 xgifb_info->mmio_size, xgifb_probe()
1769 xgifb_info->video_vbase = hw_info->pjVideoMemoryAddress = xgifb_probe()
1770 ioremap_wc(xgifb_info->video_base, xgifb_info->video_size); xgifb_probe()
1771 xgifb_info->mmio_vbase = ioremap(xgifb_info->mmio_base, xgifb_probe()
1772 xgifb_info->mmio_size); xgifb_probe()
1776 (u64) xgifb_info->video_base, xgifb_probe()
1777 xgifb_info->video_vbase, xgifb_probe()
1778 xgifb_info->video_size / 1024); xgifb_probe()
1782 (u64) xgifb_info->mmio_base, xgifb_info->mmio_vbase, xgifb_probe()
1783 xgifb_info->mmio_size / 1024); xgifb_probe()
1785 pci_set_drvdata(pdev, xgifb_info); xgifb_probe()
1789 xgifb_info->mtrr = -1; xgifb_probe()
1791 xgifb_info->hasVB = HASVB_NONE; xgifb_probe()
1792 if ((xgifb_info->chip == XG20) || xgifb_probe()
1793 (xgifb_info->chip == XG27)) { xgifb_probe()
1794 xgifb_info->hasVB = HASVB_NONE; xgifb_probe()
1795 } else if (xgifb_info->chip == XG21) { xgifb_probe()
1798 xgifb_info->display2 = XGIFB_DISP_LCD; xgifb_probe()
1800 xgifb_info->hasVB = HASVB_CHRONTEL; xgifb_probe()
1802 xgifb_info->hasVB = HASVB_NONE; xgifb_probe()
1804 XGIfb_get_VB_type(xgifb_info); xgifb_probe()
1811 switch (xgifb_info->hasVB) { xgifb_probe()
1873 if (xgifb_info->hasVB != HASVB_NONE) xgifb_probe()
1874 XGIfb_detect_VB(xgifb_info); xgifb_probe()
1875 else if (xgifb_info->chip != XG21) xgifb_probe()
1876 xgifb_info->display2 = XGIFB_DISP_NONE; xgifb_probe()
1878 if (xgifb_info->display2 == XGIFB_DISP_LCD) { xgifb_probe()
1886 xgifb_info->mode_idx = -1; xgifb_probe()
1889 XGIfb_search_mode(xgifb_info, mode); xgifb_probe()
1891 XGIfb_search_vesamode(xgifb_info, vesa); xgifb_probe()
1893 if (xgifb_info->mode_idx >= 0) xgifb_probe()
1894 xgifb_info->mode_idx = xgifb_probe()
1895 XGIfb_validate_mode(xgifb_info, xgifb_info->mode_idx); xgifb_probe()
1897 if (xgifb_info->mode_idx < 0) { xgifb_probe()
1898 if (xgifb_info->display2 == XGIFB_DISP_LCD && xgifb_probe()
1899 xgifb_info->chip == XG21) xgifb_probe()
1900 xgifb_info->mode_idx = xgifb_probe()
1901 XGIfb_GetXG21DefaultLVDSModeIdx(xgifb_info); xgifb_probe()
1903 xgifb_info->mode_idx = DEFAULT_MODE; xgifb_probe()
1906 if (xgifb_info->mode_idx < 0) { xgifb_probe()
1913 xgifb_info->refresh_rate = refresh_rate; xgifb_probe()
1914 if (xgifb_info->refresh_rate == 0) xgifb_probe()
1915 xgifb_info->refresh_rate = 60; xgifb_probe()
1916 if (XGIfb_search_refresh_rate(xgifb_info, xgifb_probe()
1917 xgifb_info->refresh_rate) == 0) { xgifb_probe()
1918 xgifb_info->rate_idx = 1; xgifb_probe()
1919 xgifb_info->refresh_rate = 60; xgifb_probe()
1922 xgifb_info->video_bpp = XGIbios_mode[xgifb_info->mode_idx].bpp; xgifb_probe()
1923 xgifb_info->video_vwidth = xgifb_probe()
1924 xgifb_info->video_width = xgifb_probe()
1925 XGIbios_mode[xgifb_info->mode_idx].xres; xgifb_probe()
1926 xgifb_info->video_vheight = xgifb_probe()
1927 xgifb_info->video_height = xgifb_probe()
1928 XGIbios_mode[xgifb_info->mode_idx].yres; xgifb_probe()
1929 xgifb_info->org_x = xgifb_info->org_y = 0; xgifb_probe()
1930 xgifb_info->video_linelength = xgifb_probe()
1931 xgifb_info->video_width * xgifb_probe()
1932 (xgifb_info->video_bpp >> 3); xgifb_probe()
1933 switch (xgifb_info->video_bpp) { xgifb_probe()
1935 xgifb_info->DstColor = 0x0000; xgifb_probe()
1936 xgifb_info->XGI310_AccelDepth = 0x00000000; xgifb_probe()
1937 xgifb_info->video_cmap_len = 256; xgifb_probe()
1940 xgifb_info->DstColor = 0x8000; xgifb_probe()
1941 xgifb_info->XGI310_AccelDepth = 0x00010000; xgifb_probe()
1942 xgifb_info->video_cmap_len = 16; xgifb_probe()
1945 xgifb_info->DstColor = 0xC000; xgifb_probe()
1946 xgifb_info->XGI310_AccelDepth = 0x00020000; xgifb_probe()
1947 xgifb_info->video_cmap_len = 16; xgifb_probe()
1950 xgifb_info->video_cmap_len = 16; xgifb_probe()
1952 xgifb_info->video_bpp); xgifb_probe()
1957 xgifb_info->video_width, xgifb_probe()
1958 xgifb_info->video_height, xgifb_probe()
1959 xgifb_info->video_bpp, xgifb_probe()
1960 xgifb_info->refresh_rate); xgifb_probe()
1969 fb_info->var.xres = xgifb_info->video_width; xgifb_probe()
1970 fb_info->var.xres_virtual = xgifb_info->video_width; xgifb_probe()
1971 fb_info->var.yres = xgifb_info->video_height; xgifb_probe()
1972 fb_info->var.yres_virtual = xgifb_info->video_height; xgifb_probe()
1973 fb_info->var.bits_per_pixel = xgifb_info->video_bpp; xgifb_probe()
1975 XGIfb_bpp_to_var(xgifb_info, &fb_info->var); xgifb_probe()
1978 XGIfb_mode_rate_to_dclock(&xgifb_info->dev_info, xgifb_probe()
1980 XGIbios_mode[xgifb_info->mode_idx].mode_no)); xgifb_probe()
1982 if (XGIfb_mode_rate_to_ddata(&xgifb_info->dev_info, hw_info, xgifb_probe()
1983 XGIbios_mode[xgifb_info->mode_idx].mode_no, xgifb_probe()
2007 fb_info->screen_base = xgifb_info->video_vbase; xgifb_probe()
2010 fb_info->pseudo_palette = xgifb_info->pseudo_palette; xgifb_probe()
2014 xgifb_info->mtrr = arch_phys_wc_add(xgifb_info->video_base, xgifb_probe()
2015 xgifb_info->video_size); xgifb_probe()
2022 dumpVGAReg(xgifb_info); xgifb_probe()
2027 arch_phys_wc_del(xgifb_info->mtrr); xgifb_probe()
2029 iounmap(xgifb_info->mmio_vbase); xgifb_probe()
2030 iounmap(xgifb_info->video_vbase); xgifb_probe()
2031 release_mem_region(xgifb_info->mmio_base, xgifb_info->mmio_size); xgifb_probe()
2033 release_mem_region(xgifb_info->video_base, xgifb_info->video_size); xgifb_probe()
2047 struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); xgifb_remove() local
2048 struct fb_info *fb_info = xgifb_info->fb_info; xgifb_remove()
2051 arch_phys_wc_del(xgifb_info->mtrr); xgifb_remove()
2052 iounmap(xgifb_info->mmio_vbase); xgifb_remove()
2053 iounmap(xgifb_info->video_vbase); xgifb_remove()
2054 release_mem_region(xgifb_info->mmio_base, xgifb_info->mmio_size); xgifb_remove()
2055 release_mem_region(xgifb_info->video_base, xgifb_info->video_size); xgifb_remove()
H A Dvb_setmode.h12 unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
H A DXGI_main.h21 #define XGISR (xgifb_info->dev_info.P3c4)
22 #define XGICR (xgifb_info->dev_info.P3d4)
23 #define XGIDACA (xgifb_info->dev_info.P3c8)
24 #define XGIDACD (xgifb_info->dev_info.P3c9)
25 #define XGIPART1 (xgifb_info->dev_info.Part1Port)
26 #define XGIPART2 (xgifb_info->dev_info.Part2Port)
27 #define XGIPART3 (xgifb_info->dev_info.Part3Port)
28 #define XGIPART4 (xgifb_info->dev_info.Part4Port)
29 #define XGIPART5 (xgifb_info->dev_info.Part5Port)
H A Dvb_init.c826 static void XGINew_SetDRAMSize_340(struct xgifb_video_info *xgifb_info, XGINew_SetDRAMSize_340() argument
834 XGISetModeNew(xgifb_info, HwDeviceExtension, 0x2e); XGINew_SetDRAMSize_340()
839 XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo); XGINew_SetDRAMSize_340()
870 struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); xgifb_read_vbios() local
890 (!xgifb_info->display2_force || xgifb_read_vbios()
891 xgifb_info->display2 != XGIFB_DISP_LCD)) { xgifb_read_vbios()
908 entry = xgifb_reg_get(xgifb_info->dev_info.P3d4, 0x36); xgifb_read_vbios()
912 lvds = &xgifb_info->lvds_data; xgifb_read_vbios()
1087 struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); XGINew_GetXG21Sense() local
1099 XGINew_SenseLCD(&xgifb_info->hw_info, pVBInfo); XGINew_GetXG21Sense()
1181 struct xgifb_video_info *xgifb_info = pci_get_drvdata(pdev); XGIInitNew() local
1182 struct xgi_hw_device_info *HwDeviceExtension = &xgifb_info->hw_info; XGIInitNew()
1194 XGIRegInit(pVBInfo, xgifb_info->vga_base); XGIInitNew()
1349 XGINew_SetDRAMSize_340(xgifb_info, HwDeviceExtension, pVBInfo); XGIInitNew()
H A Dvb_setmode.c2295 static void XGI_DisplayOn(struct xgifb_video_info *xgifb_info, XGI_DisplayOn() argument
2306 mdelay(xgifb_info->lvds_data.PSC_S2); XGI_DisplayOn()
2311 mdelay(xgifb_info->lvds_data.PSC_S3); XGI_DisplayOn()
2326 mdelay(xgifb_info->lvds_data.PSC_S2); XGI_DisplayOn()
2331 mdelay(xgifb_info->lvds_data.PSC_S3); XGI_DisplayOn()
2342 void XGI_DisplayOff(struct xgifb_video_info *xgifb_info, XGI_DisplayOff() argument
2351 mdelay(xgifb_info->lvds_data.PSC_S3); XGI_DisplayOff()
2362 mdelay(xgifb_info->lvds_data.PSC_S3); XGI_DisplayOff()
4190 static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, XGI_XG21CheckLVDSMode() argument
4212 if (xres > xgifb_info->lvds_data.LVDSHDE) XGI_XG21CheckLVDSMode()
4215 if (yres > xgifb_info->lvds_data.LVDSVDE) XGI_XG21CheckLVDSMode()
4218 if (xres != xgifb_info->lvds_data.LVDSHDE || XGI_XG21CheckLVDSMode()
4219 yres != xgifb_info->lvds_data.LVDSVDE) { XGI_XG21CheckLVDSMode()
4227 static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info, xgifb_set_lvds() argument
4238 temp = (unsigned char) ((xgifb_info->lvds_data.LVDS_Capability & xgifb_set_lvds()
4245 temp = xgifb_info->lvds_data.LVDS_Capability & LCDPolarity; xgifb_set_lvds()
4265 LVDSHT = xgifb_info->lvds_data.LVDSHT; xgifb_set_lvds()
4267 LVDSHBS = xres + (xgifb_info->lvds_data.LVDSHDE - xres) / 2; xgifb_set_lvds()
4272 LVDSHRS = LVDSHBS + xgifb_info->lvds_data.LVDSHFP; xgifb_set_lvds()
4276 LVDSHRE = LVDSHRS + xgifb_info->lvds_data.LVDSHSYNC; xgifb_set_lvds()
4280 LVDSHBE = LVDSHBS + LVDSHT - xgifb_info->lvds_data.LVDSHDE; xgifb_set_lvds()
4282 LVDSVT = xgifb_info->lvds_data.LVDSVT; xgifb_set_lvds()
4284 LVDSVBS = yres + (xgifb_info->lvds_data.LVDSVDE - yres) / 2; xgifb_set_lvds()
4291 LVDSVRS = LVDSVBS + xgifb_info->lvds_data.LVDSVFP; xgifb_set_lvds()
4295 LVDSVRE = LVDSVRS + xgifb_info->lvds_data.LVDSVSYNC; xgifb_set_lvds()
4299 LVDSVBE = LVDSVBS + LVDSVT - xgifb_info->lvds_data.LVDSVDE; xgifb_set_lvds()
4399 0x2B, xgifb_info->lvds_data.VCLKData1); xgifb_set_lvds()
4401 0x2C, xgifb_info->lvds_data.VCLKData2); xgifb_set_lvds()
4439 static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info, XGI_DisableBridge() argument
4469 XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo); XGI_DisableBridge()
4513 XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo); XGI_DisableBridge()
5298 static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info, XGI_EnableBridge() argument
5360 XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo); XGI_EnableBridge()
5373 XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo); XGI_EnableBridge()
5377 static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info, XGI_SetCRT1Group() argument
5437 xgifb_set_lvds(xgifb_info, XGI_SetCRT1Group()
5450 unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, XGISetModeNew() argument
5463 XGIRegInit(pVBInfo, xgifb_info->vga_base); XGISetModeNew()
5491 XGI_DisableBridge(xgifb_info, HwDeviceExtension, pVBInfo); XGISetModeNew()
5495 XGI_SetCRT1Group(xgifb_info, HwDeviceExtension, ModeNo, XGISetModeNew()
5519 XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo); XGISetModeNew()
5523 if (!XGI_XG21CheckLVDSMode(xgifb_info, ModeNo, XGISetModeNew()
5533 XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo); XGISetModeNew()
5535 XGI_SetCRT1Group(xgifb_info, HwDeviceExtension, ModeNo, XGISetModeNew()
5538 XGI_DisplayOn(xgifb_info, HwDeviceExtension, pVBInfo); XGISetModeNew()

Completed in 256 milliseconds