Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Guest-side test tools, config, and X11 stuff for PARAGRAPH graphics device
[palacios.git] / guest / linux / paragraph / x11.patch
1 diff -rupN x11-original/build/bin/xorg.conf x11-new/build/bin/xorg.conf
2 --- x11-original/build/bin/xorg.conf    1969-12-31 18:00:00.000000000 -0600
3 +++ x11-new/build/bin/xorg.conf 2013-06-07 17:07:35.000000000 -0500
4 @@ -0,0 +1,40 @@
5 +Section "Monitor"
6 +Identifier "Monitor0"
7 +HorizSync 28.0-80.0
8 +VertRefresh 48.0-75.0
9 +#Modeline "1280x800"  83.46  1280 1344 1480 1680  800 801 804 828 -HSync +Vsync
10 +# 1224x685 @ 60.00 Hz (GTF) hsync: 42.54 kHz; pclk: 67.72 MHz
11 +#Modeline "800x600" 67.72 800 848 936 1072 600 601 604 636 -HSync +Vsync
12 +Modeline "1024x1024" 67.72 1024 1072 1160 1296 1024 1072 1160 1296 -HSync +Vsync
13 +EndSection
14 +
15 +Section "Device"
16 +Identifier "Card0"
17 +Option "NoDDC" "true"
18 +Option "IgnoreEDID" "true"
19 +Driver "dummy"
20 +EndSection
21 +
22 +Section "Screen"
23 +DefaultDepth 24
24 +Identifier "Screen0"
25 +Device "Card0"
26 +Monitor "Monitor0"
27 +    SubSection "Display"
28 +    Depth 24
29 +    Virtual 1024 1024 
30 +     Modes "1024x1024"    
31 +    EndSubSection
32 +EndSection
33 +
34 +
35 +Section "InputClass"
36 +        Identifier      "system-setup-keyboard"
37 +        MatchIsKeyboard "on"
38 +        Option          "XkbModel"      "pc105+inet"
39 +        Option          "XkbLayout"     "us"
40 +#       Option          "XkbVariant"    "(null)"
41 +        Option          "XkbOptions"    "terminate:ctrl_alt_bksp,"
42 +EndSection
43 +
44 +
45 diff -rupN x11-original/src/driver/xf86-video-dummy/src/dummy_driver.c x11-new/src/driver/xf86-video-dummy/src/dummy_driver.c
46 --- x11-original/src/driver/xf86-video-dummy/src/dummy_driver.c 2013-06-07 14:51:15.000000000 -0500
47 +++ x11-new/src/driver/xf86-video-dummy/src/dummy_driver.c      2013-06-07 17:07:20.000000000 -0500
48 @@ -551,9 +551,32 @@ 
49      dPtr = DUMMYPTR(pScrn);
50      DUMMYScrn = pScrn;
51  
52 -    if (!(dPtr->FBBase = malloc(pScrn->videoRam * 1024)))
53 -        return FALSE;
54 +    int fd = open("/dev/mem", O_RDWR | O_SYNC);
55  
56 +    if (fd<0) {
57 +       perror("Cannot open /dev/mem");
58 +       return -1;
59 +    } 
60 +    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "This is Ruba's driver \n");
61 +
62 +    unsigned char *mem = mmap(NULL, PARAGRAPH_LEN, PROT_READ | PROT_WRITE, MAP_SHARED, fd, PARAGRAPH_PADDR);
63 +
64 +    if (mem == MAP_FAILED) {
65 +      perror("Can't map memory");
66 +      return -1;
67 +    } else {
68 +      printf("Mapped to 0x%p (%d bytes)\n", mem, PARAGRAPH_LEN);
69 +    }
70 +
71 +    if (pScrn->videoRam * 1024 > 1024 * 1024 * 4) {
72 +        perror("Error but keep going");
73 +       
74 +       xf86DrvMsg(pScrn->scrnIndex, X_INFO, "pScrn-> videoRAM is greater than 4MB but keep going\n");
75 +       }
76 +
77 +    dPtr->FBBase = mem;
78 +    
79 +    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBBase is set to %p \n", dPtr->FBBase);
80  /*
81       * next we save the current state and setup the first mode
82       */