Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8789
b: refs/heads/master
c: 438e5c5
h: refs/heads/master
i:
  8787: 96d5f87
v: v3
  • Loading branch information
Jan Beulich authored and Linus Torvalds committed Sep 13, 2005
1 parent 571f99b commit bd40d25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 2f4516dbd048f25eba78e115e8e73e1e8f04e7f9
refs/heads/master: 438e5c5e2dae30359b53514a02f5827fb6e552c7
13 changes: 8 additions & 5 deletions trunk/drivers/video/matrox/matroxfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
vaddr_t vm;
unsigned int offs;
unsigned int offs2;
unsigned char store;
unsigned char store, orig;
unsigned char bytes[32];
unsigned char* tmp;

Expand All @@ -1298,7 +1298,8 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
if (maxSize > 0x2000000) maxSize = 0x2000000;

mga_outb(M_EXTVGA_INDEX, 0x03);
mga_outb(M_EXTVGA_DATA, mga_inb(M_EXTVGA_DATA) | 0x80);
orig = mga_inb(M_EXTVGA_DATA);
mga_outb(M_EXTVGA_DATA, orig | 0x80);

store = mga_readb(vm, 0x1234);
tmp = bytes;
Expand All @@ -1323,7 +1324,7 @@ static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSi
mga_writeb(vm, 0x1234, store);

mga_outb(M_EXTVGA_INDEX, 0x03);
mga_outb(M_EXTVGA_DATA, mga_inb(M_EXTVGA_DATA) & ~0x80);
mga_outb(M_EXTVGA_DATA, orig);

*realSize = offs - 0x100000;
#ifdef CONFIG_FB_MATROX_MILLENIUM
Expand Down Expand Up @@ -1858,6 +1859,8 @@ static int initMatrox2(WPMINFO struct board* b){
to yres_virtual * xres_virtual < 2^32 */
}
matroxfb_init_fix(PMINFO2);
ACCESS_FBINFO(fbcon.screen_base) = vaddr_va(ACCESS_FBINFO(video.vbase));
matroxfb_update_fix(PMINFO2);
/* Normalize values (namely yres_virtual) */
matroxfb_check_var(&vesafb_defined, &ACCESS_FBINFO(fbcon));
/* And put it into "current" var. Do NOT program hardware yet, or we'll not take over
Expand Down Expand Up @@ -2010,11 +2013,11 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
}
/* not match... */
if (!b->vendor)
return -1;
return -ENODEV;
if (dev > 0) {
/* not requested one... */
dev--;
return -1;
return -ENODEV;
}
pci_read_config_dword(pdev, PCI_COMMAND, &cmd);
if (pci_enable_device(pdev)) {
Expand Down

0 comments on commit bd40d25

Please sign in to comment.