On Wed, Sep 12, 2012 at 12:44:39AM +0300, Aaro Koskinen wrote: > On embedded systems without a BIOS, the DRAM sizing register is 0 after > the boot, and the driver thinks we have only 1 MB video memory. On such > cases, use the PCI window size for the initial size. This information > is needed only to create the I/O mapping - the driver will later detect > and configure the memory size correctly. Limit the size to 16 MB as it > should be sufficient for all supported video modes. > > Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx> > --- > drivers/staging/xgifb/XGI_main_26.c | 9 +++++---- > 1 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c > index 98b8b09..f780bcf 100644 > --- a/drivers/staging/xgifb/XGI_main_26.c > +++ b/drivers/staging/xgifb/XGI_main_26.c > @@ -1470,6 +1470,9 @@ static int XGIfb_get_dram_size(struct xgifb_video_info *xgifb_info) > xgifb_reg_set(XGISR, IND_SIS_DRAM_SIZE, 0x51); > > reg = xgifb_reg_get(XGISR, IND_SIS_DRAM_SIZE); > + if (!reg) > + return -1; > + > switch ((reg & XGI_DRAM_SIZE_MASK) >> 4) { > case XGI_DRAM_SIZE_1MB: > xgifb_info->video_size = 0x100000; > @@ -1778,10 +1781,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, > hw_info->jChipType = xgifb_info->chip; > > if (XGIfb_get_dram_size(xgifb_info)) { > - dev_err(&pdev->dev, > - "Fatal error: Unable to determine RAM size.\n"); > - ret = -ENODEV; > - goto error_disable; > + xgifb_info->video_size = min_t(unsigned long, video_size_max, > + SZ_16M); This line causes a build error for me on x86-64. Care to fix it up and resend this? I've applied the first two patches in this series. greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel