Lines 1-51
Link Here
|
1 |
--- src/rendition.c.orig 2015-10-11 22:31:51.242126000 +0200 |
1 |
# Correct a string that should be const |
2 |
+++ src/rendition.c 2015-10-11 22:32:20.465605000 +0200 |
2 |
# |
3 |
@@ -1173,7 +1173,6 @@ renditionScreenInit(SCREEN_INIT_ARGS_DEC |
3 |
--- src/rendition.c.orig 2014-09-30 14:21:44 UTC |
4 |
fbPictureInit (pScreen, 0, 0); |
4 |
+++ src/rendition.c |
5 |
|
5 |
@@ -480,7 +480,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo |
6 |
xf86SetBlackWhitePixels(pScreen); |
6 |
MessageType From; |
7 |
- miInitializeBackingStore(pScreen); |
7 |
int videoRam, Rounding, nModes = 0; |
8 |
|
8 |
renditionPtr pRendition; |
9 |
/*********************************************************/ |
9 |
- char *in_string; |
10 |
/* The actual setup of the driver-specific code */ |
10 |
+ const char *in_string; |
11 |
@@ -1372,6 +1371,18 @@ renditionMapMem(ScrnInfoPtr pScreenInfo) |
11 |
vgaHWPtr pvgaHW; |
12 |
/* Override on users request */ |
12 |
|
13 |
WriteCombine |
13 |
#ifdef DEBUG |
14 |
= xf86ReturnOptValBool(pRendition->Options, OPTION_FBWC, WriteCombine); |
|
|
15 |
+#ifdef XSERVER_LIBPCIACCESS |
16 |
+ mapOption = PCI_DEV_MAP_FLAG_WRITABLE; |
17 |
+ if (WriteCombine) |
18 |
+ mapOption |= PCI_DEV_MAP_FLAG_WRITE_COMBINE; |
19 |
+ |
20 |
+ err = pci_device_map_range(pRendition->PciInfo, |
21 |
+ pRendition->PciInfo->regions[0].base_addr, |
22 |
+ pRendition->PciInfo->regions[0].size, |
23 |
+ mapOption, (void *)&pRendition->board.vmem_base); |
24 |
+ |
25 |
+ return (err == 0); |
26 |
+#else |
27 |
if (WriteCombine) { |
28 |
xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG, |
29 |
("Requesting Write-Combined memory access\n")); |
30 |
@@ -1382,12 +1393,6 @@ renditionMapMem(ScrnInfoPtr pScreenInfo) |
31 |
mapOption = VIDMEM_MMIO; |
32 |
} |
33 |
|
34 |
-#ifdef XSERVER_LIBPCIACCESS |
35 |
- err = pci_device_map_region(pRendition->PciInfo, 0, TRUE); |
36 |
- pRendition->board.vmem_base = pRendition->PciInfo->regions[0].memory; |
37 |
- |
38 |
- return (err == 0); |
39 |
-#else |
40 |
pRendition->board.vmem_base= |
41 |
xf86MapPciMem(pScreenInfo->scrnIndex, mapOption, |
42 |
pRendition->pcitag, |
43 |
@@ -1416,7 +1421,7 @@ renditionUnmapMem(ScrnInfoPtr pScreenInf |
44 |
#else |
45 |
pci_device_unmap_range(pRendition->PciInfo, |
46 |
pRendition->board.vmem_base, |
47 |
- pScreenInfo->videoRam * 1024); |
48 |
+ pRendition->PciInfo->regions[0].size); |
49 |
#endif |
50 |
return TRUE; |
51 |
#ifdef DEBUG0 |