diff -rupN x11-original/build/bin/xorg.conf x11-new/build/bin/xorg.conf --- x11-original/build/bin/xorg.conf 1969-12-31 18:00:00.000000000 -0600 +++ x11-new/build/bin/xorg.conf 2013-06-07 17:07:35.000000000 -0500 @@ -0,0 +1,40 @@ +Section "Monitor" +Identifier "Monitor0" +HorizSync 28.0-80.0 +VertRefresh 48.0-75.0 +#Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync +# 1224x685 @ 60.00 Hz (GTF) hsync: 42.54 kHz; pclk: 67.72 MHz +#Modeline "800x600" 67.72 800 848 936 1072 600 601 604 636 -HSync +Vsync +Modeline "1024x1024" 67.72 1024 1072 1160 1296 1024 1072 1160 1296 -HSync +Vsync +EndSection + +Section "Device" +Identifier "Card0" +Option "NoDDC" "true" +Option "IgnoreEDID" "true" +Driver "dummy" +EndSection + +Section "Screen" +DefaultDepth 24 +Identifier "Screen0" +Device "Card0" +Monitor "Monitor0" + SubSection "Display" + Depth 24 + Virtual 1024 1024 + Modes "1024x1024" + EndSubSection +EndSection + + +Section "InputClass" + Identifier "system-setup-keyboard" + MatchIsKeyboard "on" + Option "XkbModel" "pc105+inet" + Option "XkbLayout" "us" +# Option "XkbVariant" "(null)" + Option "XkbOptions" "terminate:ctrl_alt_bksp," +EndSection + + diff -rupN x11-original/src/driver/xf86-video-dummy/src/dummy_driver.c x11-new/src/driver/xf86-video-dummy/src/dummy_driver.c --- x11-original/src/driver/xf86-video-dummy/src/dummy_driver.c 2013-06-07 14:51:15.000000000 -0500 +++ x11-new/src/driver/xf86-video-dummy/src/dummy_driver.c 2013-06-07 17:07:20.000000000 -0500 @@ -551,9 +551,32 @@ dPtr = DUMMYPTR(pScrn); DUMMYScrn = pScrn; - if (!(dPtr->FBBase = malloc(pScrn->videoRam * 1024))) - return FALSE; + int fd = open("/dev/mem", O_RDWR | O_SYNC); + if (fd<0) { + perror("Cannot open /dev/mem"); + return -1; + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "This is Ruba's driver \n"); + + unsigned char *mem = mmap(NULL, PARAGRAPH_LEN, PROT_READ | PROT_WRITE, MAP_SHARED, fd, PARAGRAPH_PADDR); + + if (mem == MAP_FAILED) { + perror("Can't map memory"); + return -1; + } else { + printf("Mapped to 0x%p (%d bytes)\n", mem, PARAGRAPH_LEN); + } + + if (pScrn->videoRam * 1024 > 1024 * 1024 * 4) { + perror("Error but keep going"); + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "pScrn-> videoRAM is greater than 4MB but keep going\n"); + } + + dPtr->FBBase = mem; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBBase is set to %p \n", dPtr->FBBase); /* * next we save the current state and setup the first mode */