Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268090
b: refs/heads/master
c: 009adf2
h: refs/heads/master
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 677e1f7 commit 6886854
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d27c6bc9f4f4250b006b26ee4458b416676580b7
refs/heads/master: 009adf2d4be9479004e41fd9b49a6136498f256b
25 changes: 16 additions & 9 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
u8 reg, reg1;
u8 CR48, CR38;
int ret;
bool xgi21_drvlcdcaplist = false;

memset(&XGIhw_ext, 0, sizeof(struct xgi_hw_device_info));
fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev);
Expand Down Expand Up @@ -2174,15 +2175,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
CR38 = xgifb_reg_get(XGICR, 0x38);
if ((CR38&0xE0) == 0xC0) {
xgi_video_info.disp_state = DISPTYPE_LCD;
if (!XGIfb_GetXG21LVDSData()) {
int m;
for (m = 0; m < sizeof(XGI21_LCDCapList)/sizeof(struct XGI21_LVDSCapStruct); m++) {
if ((XGI21_LCDCapList[m].LVDSHDE == XGIbios_mode[xgifb_mode_idx].xres) &&
(XGI21_LCDCapList[m].LVDSVDE == XGIbios_mode[xgifb_mode_idx].yres)) {
xgifb_reg_set(XGI_Pr.P3d4, 0x36, m);
}
}
}
if (!XGIfb_GetXG21LVDSData())
xgi21_drvlcdcaplist = true;
} else if ((CR38&0xE0) == 0x60) {
xgi_video_info.hasVB = HASVB_CHRONTEL;
} else {
Expand Down Expand Up @@ -2334,6 +2328,19 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
}
}

if (xgi21_drvlcdcaplist) {
int m;

for (m = 0; m < ARRAY_SIZE(XGI21_LCDCapList); m++)
if ((XGI21_LCDCapList[m].LVDSHDE ==
XGIbios_mode[xgifb_mode_idx].xres) &&
(XGI21_LCDCapList[m].LVDSVDE ==
XGIbios_mode[xgifb_mode_idx].yres)) {
xgifb_reg_set(XGI_Pr.P3d4, 0x36, m);
break;
}
}

XGIfb_mode_no = XGIbios_mode[xgifb_mode_idx].mode_no;

/* yilin set default refresh rate */
Expand Down

0 comments on commit 6886854

Please sign in to comment.