#define SEQ_DATA 0x15
-#define XGISR XGI_Pr.P3c4
-#define XGICR XGI_Pr.P3d4
-#define XGIDACA XGI_Pr.P3c8
-#define XGIDACD XGI_Pr.P3c9
-#define XGIPART1 XGI_Pr.Part1Port
-#define XGIPART2 XGI_Pr.Part2Port
-#define XGIPART3 XGI_Pr.Part3Port
-#define XGIPART4 XGI_Pr.Part4Port
-#define XGIPART5 XGI_Pr.Part5Port
+#define XGISR (xgifb_info->dev_info.P3c4)
+#define XGICR (xgifb_info->dev_info.P3d4)
+#define XGIDACA (xgifb_info->dev_info.P3c8)
+#define XGIDACD (xgifb_info->dev_info.P3c9)
+#define XGIPART1 (xgifb_info->dev_info.Part1Port)
+#define XGIPART2 (xgifb_info->dev_info.Part2Port)
+#define XGIPART3 (xgifb_info->dev_info.Part3Port)
+#define XGIPART4 (xgifb_info->dev_info.Part4Port)
+#define XGIPART5 (xgifb_info->dev_info.Part5Port)
#define XGIDAC2A XGIPART5
#define XGIDAC2D (XGIPART5 + 1)
/* TW: For ioctl XGIFB_GET_INFO */
/* XGIfb_info XGIfbinfo; */
-/* TW: XGI private structure */
-static struct vb_device_info XGI_Pr;
-
#define MD_XGI300 1
#define MD_XGI315 2
static int XGIfb_blank(int blank, struct fb_info *info)
{
+ struct xgifb_video_info *xgifb_info = info->par;
u8 reg;
reg = xgifb_reg_get(XGICR, 0x17);
hw_info->pjIOAddress = (unsigned char *)xgifb_info->vga_base;
/* XGI_Pr.RelIO = ioremap(pci_resource_start(pdev, 2), 128) + 0x30; */
printk("XGIfb: Relocate IO address: %lx [%08lx]\n",
- (unsigned long)pci_resource_start(pdev, 2), XGI_Pr.RelIO);
+ (unsigned long)pci_resource_start(pdev, 2),
+ xgifb_info->dev_info.RelIO);
if (pci_enable_device(pdev)) {
ret = -EIO;
goto error;
}
- XGIRegInit(&XGI_Pr, (unsigned long)hw_info->pjIOAddress);
+ XGIRegInit(&xgifb_info->dev_info, (unsigned long)hw_info->pjIOAddress);
xgifb_reg_set(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
reg1 = xgifb_reg_get(XGISR, IND_XGI_PASSWORD);
XGIbios_mode[xgifb_info->mode_idx].xres) &&
(XGI21_LCDCapList[m].LVDSVDE ==
XGIbios_mode[xgifb_info->mode_idx].yres)) {
- xgifb_reg_set(XGI_Pr.P3d4, 0x36, m);
+ xgifb_reg_set(xgifb_info->dev_info.P3d4,
+ 0x36,
+ m);
break;
}
}
XGIfb_bpp_to_var(xgifb_info, &fb_info->var);
fb_info->var.pixclock = (u32) (1000000000 /
- XGIfb_mode_rate_to_dclock(&XGI_Pr, hw_info,
+ XGIfb_mode_rate_to_dclock(&xgifb_info->dev_info,
+ hw_info,
XGIbios_mode[xgifb_info->mode_idx].mode_no,
xgifb_info->rate_idx));
- if (XGIfb_mode_rate_to_ddata(&XGI_Pr, hw_info,
+ if (XGIfb_mode_rate_to_ddata(&xgifb_info->dev_info, hw_info,
XGIbios_mode[xgifb_info->mode_idx].mode_no,
xgifb_info->rate_idx,
&fb_info->var.left_margin,