|
@@ -19,8 +19,6 @@
|
|
|
|
|
|
static bool request_mem_succeeded = false;
|
|
static bool request_mem_succeeded = false;
|
|
|
|
|
|
-static struct pci_dev *default_vga;
|
|
|
|
-
|
|
|
|
static struct fb_var_screeninfo efifb_defined = {
|
|
static struct fb_var_screeninfo efifb_defined = {
|
|
.activate = FB_ACTIVATE_NOW,
|
|
.activate = FB_ACTIVATE_NOW,
|
|
.height = -1,
|
|
.height = -1,
|
|
@@ -84,23 +82,10 @@ static struct fb_ops efifb_ops = {
|
|
.fb_imageblit = cfb_imageblit,
|
|
.fb_imageblit = cfb_imageblit,
|
|
};
|
|
};
|
|
|
|
|
|
-struct pci_dev *vga_default_device(void)
|
|
|
|
-{
|
|
|
|
- return default_vga;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-EXPORT_SYMBOL_GPL(vga_default_device);
|
|
|
|
-
|
|
|
|
-void vga_set_default_device(struct pci_dev *pdev)
|
|
|
|
-{
|
|
|
|
- default_vga = pdev;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int efifb_setup(char *options)
|
|
static int efifb_setup(char *options)
|
|
{
|
|
{
|
|
char *this_opt;
|
|
char *this_opt;
|
|
int i;
|
|
int i;
|
|
- struct pci_dev *dev = NULL;
|
|
|
|
|
|
|
|
if (options && *options) {
|
|
if (options && *options) {
|
|
while ((this_opt = strsep(&options, ",")) != NULL) {
|
|
while ((this_opt = strsep(&options, ",")) != NULL) {
|
|
@@ -126,30 +111,6 @@ static int efifb_setup(char *options)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- for_each_pci_dev(dev) {
|
|
|
|
- int i;
|
|
|
|
-
|
|
|
|
- if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
|
|
|
|
- continue;
|
|
|
|
-
|
|
|
|
- for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
|
|
|
|
- resource_size_t start, end;
|
|
|
|
-
|
|
|
|
- if (!(pci_resource_flags(dev, i) & IORESOURCE_MEM))
|
|
|
|
- continue;
|
|
|
|
-
|
|
|
|
- start = pci_resource_start(dev, i);
|
|
|
|
- end = pci_resource_end(dev, i);
|
|
|
|
-
|
|
|
|
- if (!start || !end)
|
|
|
|
- continue;
|
|
|
|
-
|
|
|
|
- if (screen_info.lfb_base >= start &&
|
|
|
|
- (screen_info.lfb_base + screen_info.lfb_size) < end)
|
|
|
|
- default_vga = dev;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|