Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281291
b: refs/heads/master
c: fab04b9
h: refs/heads/master
i:
  281289: 9f1ed9e
  281287: 29811d1
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 9cb8998 commit 8889e12
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 98 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: 64afdf8722dc64b33e588f759c44c8d137e56920
refs/heads/master: fab04b97be07e9e561b624a2a68f714c037d918b
16 changes: 8 additions & 8 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)

/* ------------------ Internal helper routines ----------------- */

static int XGIfb_GetXG21DefaultLVDSModeIdx(void)
static int XGIfb_GetXG21DefaultLVDSModeIdx(struct xgifb_video_info *xgifb_info)
{

int found_mode = 0;
Expand All @@ -391,11 +391,11 @@ static int XGIfb_GetXG21DefaultLVDSModeIdx(void)
found_mode = 0;
while ((XGIbios_mode[XGIfb_mode_idx].mode_no != 0)
&& (XGIbios_mode[XGIfb_mode_idx].xres
<= XGI21_LCDCapList[0].LVDSHDE)) {
<= xgifb_info->lvds_data.LVDSHDE)) {
if ((XGIbios_mode[XGIfb_mode_idx].xres
== XGI21_LCDCapList[0].LVDSHDE)
== xgifb_info->lvds_data.LVDSHDE)
&& (XGIbios_mode[XGIfb_mode_idx].yres
== XGI21_LCDCapList[0].LVDSVDE)
== xgifb_info->lvds_data.LVDSVDE)
&& (XGIbios_mode[XGIfb_mode_idx].bpp == 8)) {
found_mode = 1;
break;
Expand Down Expand Up @@ -458,8 +458,8 @@ static int XGIfb_validate_mode(struct xgifb_video_info *xgifb_info, int myindex)

if (xgifb_info->chip == XG21) {
if (xgifb_info->display2 == XGIFB_DISP_LCD) {
xres = XGI21_LCDCapList[0].LVDSHDE;
yres = XGI21_LCDCapList[0].LVDSVDE;
xres = xgifb_info->lvds_data.LVDSHDE;
yres = xgifb_info->lvds_data.LVDSVDE;
if (XGIbios_mode[myindex].xres > xres)
return -1;
if (XGIbios_mode[myindex].yres > yres)
Expand Down Expand Up @@ -1173,7 +1173,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
if (isactive) {

XGIfb_pre_setmode(xgifb_info);
if (XGISetModeNew(hw_info,
if (XGISetModeNew(xgifb_info, hw_info,
XGIbios_mode[xgifb_info->mode_idx].mode_no)
== 0) {
printk(KERN_ERR "XGIfb: Setting mode[0x%x] failed\n",
Expand Down Expand Up @@ -2167,7 +2167,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
if (xgifb_info->display2 == XGIFB_DISP_LCD &&
xgifb_info->chip == XG21)
xgifb_info->mode_idx =
XGIfb_GetXG21DefaultLVDSModeIdx();
XGIfb_GetXG21DefaultLVDSModeIdx(xgifb_info);
else
xgifb_info->mode_idx = DEFAULT_MODE;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/staging/xgifb/XGIfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ struct xgifb_video_info {
unsigned char TV_type;
unsigned char TV_plug;

struct XGI21_LVDSCapStruct lvds_data;

enum XGI_CHIP_TYPE chip;
unsigned char revision_id;

Expand Down
11 changes: 6 additions & 5 deletions trunk/drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,19 +1070,20 @@ static int XGINew_DDRSizing340(struct xgi_hw_device_info *HwDeviceExtension,
return 0;
}

static void XGINew_SetDRAMSize_340(struct xgi_hw_device_info *HwDeviceExtension,
static void XGINew_SetDRAMSize_340(struct xgifb_video_info *xgifb_info,
struct xgi_hw_device_info *HwDeviceExtension,
struct vb_device_info *pVBInfo)
{
unsigned short data;

pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress;

XGISetModeNew(HwDeviceExtension, 0x2e);
XGISetModeNew(xgifb_info, HwDeviceExtension, 0x2e);

data = xgifb_reg_get(pVBInfo->P3c4, 0x21);
/* disable read cache */
xgifb_reg_set(pVBInfo->P3c4, 0x21, (unsigned short) (data & 0xDF));
XGI_DisplayOff(HwDeviceExtension, pVBInfo);
XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo);

/* data = xgifb_reg_get(pVBInfo->P3c4, 0x1); */
/* data |= 0x20 ; */
Expand Down Expand Up @@ -1156,7 +1157,7 @@ static void xgifb_read_vbios(struct pci_dev *pdev,
if (entry >= j)
entry = 0;
i += entry * 25;
lvds = &pVBInfo->XG21_LVDSCapList[0];
lvds = &xgifb_info->lvds_data;
if (vbios_size <= i + 24)
goto error;
lvds->LVDS_Capability = vbios[i] | (vbios[i + 1] << 8);
Expand Down Expand Up @@ -1779,7 +1780,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
pVBInfo);

printk("20");
XGINew_SetDRAMSize_340(HwDeviceExtension, pVBInfo);
XGINew_SetDRAMSize_340(xgifb_info, HwDeviceExtension, pVBInfo);
printk("21");

printk("22");
Expand Down
Loading

0 comments on commit 8889e12

Please sign in to comment.