Compiling the linux kernel driver/linux/ogp_skel.ko:
I managed to compile the module after changing the following lines in the
interrupt handler
status = readl(ogp->regs.ptr + OGA1_XP10_INTERRUPT_STATUS);
printk("OGP IRQ (%x %u)\n", status, ogp->irq_count++);
writel(0x00000001, ogp->regs.ptr + OGA1_XP10_INTERRUPT_CLEAR);
writel(0x00000000, ogp->regs.ptr + OGA1_XP10_INTERRUPT_CLEAR);
Compile and insmod the result.
The dmesg output is:
[ 1366.724674] OGP - init
[ 1366.724674] OGP - probe
[ 1366.724674] pci_ogp 0000:0b:01.0: enabling device (0000 -> 0002)
[ 1366.724674] ACPI: PCI Interrupt 0000:0b:01.0[A] -> GSI 17 (level, low) ->
IRQ 17
[ 1366.724674] Enable device = 0
[ 1366.724674] Interrupt pin:1, line:5
[ 1366.724674] Resource info 0 dffc0000-dfffffff 21208 00040000
[ 1366.724674] Resource info 1 c0000000-cfffffff 21208 10000000
[ 1366.724674] Resource info 2 00000000-00000000 00000 00000000
[ 1366.724674] Resource info 3 00000000-00000000 00000 00000000
[ 1366.724674] Resource info 4 00000000-00000000 00000 00000000
[ 1366.724674] Resource info 5 00000000-00000000 00000 00000000
[ 1366.724674] Resource info 6 d0000000-d001ffff 27200 00020000
[ 1366.724674] map_regs = ffffc20013300000 0x40000
[ 1366.956649] map_mem = ffffc20015f80000 0x10000000
[ 1366.956649] map_rom = ffffc200132c0000 0x7000
[ 1366.956649] 0000: 55 aa 38 e9 cd 6b 4e 4f 47 44 31 00 00 00 00 00 U 8
kNOGD1
[ 1366.956649] 0010: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 49
42 @ IB
[ 1366.956649] 0020: 4d 00 32 30 31 30 2d 30 39 2d 32 37 20 32 30 3a M
2010-09-27 20:
[ 1366.956649] 0030: 34 36 3a 33 33 00 00 00 00 00 00 00 00 00 00 00
46:33
[ 1366.956649] 0040: 50 43 49 52 27 12 00 00 00 00 18 00 00 00 00 03
PCIR'
[ 1366.956649] 0050: 38 00 00 00 00 80 00 00 50 4d 49 44 00 00 00 00
8 PMID
[ 1366.956649] 0060: 00 00 00 a0 00 b0 00 b8 00 c0 00 0e 51 bf b6
21 Q !
[ 1366.956649] 0070: b9 0f 00 2e 3a 05 74 07 83 c7 06 e2 f6 31 ff 59 .:
t 1 Y
[ 1366.956649] 0080: c3 3e a0 49 04 e8 15 00 3c 02 72 07 77 0a 2e a1 >
I < r w .
[ 1366.956649] 0090: 64 00 c3 2e a1 62 00 c3 2e a1 66 00 c3 3c 08 76 d .
b . f < v
[ 1366.956649] 00a0: 03 b0 01 c3 3c 07 74 03 b0 03 c3 b0 02 c3 52 98 <
t R
[ 1366.956649] 00b0: 3e f7 26 4c 04 89 c2 88 e8 3e f6 26 4a 04 00 c8 >
&L > &J
[ 1366.956649] 00c0: 80 d4 00 01 c0 01 d0 5a c3 51 53 88 c3 83 e3 07
Z QS
[ 1366.956649] 00d0: d1 e3 3e 8b 8f 50 04 e8 d4 ff 5b 59 c3 52 53 98 >
P [Y RS
[ 1366.956649] 00e0: 3e f7 26 4c 04 89 c3 88 e8 3e f6 26 4a 04 3e f7 >
&L > &J >
[ 1366.956649] 00f0: 26 85 04 00 c8 80 d4 00 01 d8 5b 5a c3 51 53 88
& [Z QS
This is the output of 'grep ogp /proc/interrupts':
5: 0 0 0 0 0
0 0 0 IO-APIC-edge ogp
After modprobe svgalib I loaded framebuffer/ogdfb.ko
[ 3238.209638] OGDFB - init
I create a device file:
sudo mknod /dev/fb c 29 0
The testporgram aborts with
cyberpower:/data/home/martin/src/ogp/trunk/drivers/linux/framebuffer# strace
-f ./test_fb
open("/dev/fb", O_RDWR) = -1 ENODEV (No such device)
cyberpower:/lib/modules/2.6.26-2-amd64/kernel/drivers/video# cp
/home/martin/src/ogp/trunk/drivers/linux/{*.ko,*/*.ko} .
cyberpower:/lib/modules/2.6.26-2-amd64/kernel/drivers/video# depmod -ae
cyberpower:/lib/modules/2.6.26-2-amd64/kernel/drivers/video#
update-initramfs -k `uname -r` -u
update-initramfs: Generating /boot/initrd.img-2.6.26-2-amd64
Reboot and and append vga=731 to boot parameters in grub.
List all possible modes by pressing enter and choose one (I chose
1280x1024-32@60)
modprobe ogdfb will result in the following dmesg output.
[ 211.493933] fb1: OGD1 (dev) on 0000:0b:01.0, 256 MB RAM
[ 211.493933] fb1: Requested clock = 220022000
[ 211.493933] fb1: Actual clock = 220588224 (difference = 566224)
[ 211.493933] fb1: Dividers = sel:1 pre:34 post:1
[ 211.507270] fb1: Setting Up DVI on top head.
[ 211.507270] fb1: oga1_dvi_init_single_link: pixel clock = 110011000
[ 211.515270] fb1: Loading Video Program on top head (1280x1024@61).
[ 211.515273] fb1: start=0x0 pitch=1280
[ 211.515275] fb1: hres=1280, hfp=48, hsync=184, hbp=200 [432]
[ 211.515278] fb1: vres=1024, vfp=1, vsync=3, vbp=26 [30]
[ 211.515281] fb1: pix-clock=110011000 digital hsync-low vsync-low
[ 211.515288] fb1: oga1_set_video_mode: digital 1 dvi_sl 1 vid_mode 5
[ 211.515291] fb1: oga1_set_video_mode: pixel_info = d output_mode = 1
[ 211.515297] mtrr: type mismatch for c0000000,10000000 old: write-back
new: write-combining
sudo mknod /dev/fb c 29 1
cyberpower:/data/home/martin/src/ogp/trunk/drivers/linux/framebuffer#
./test_fb
Draws a violet square on the monitor.
Partial Success!
Now I have to set WXGA mode, so that I can write data onto the Forth
Dimension display.
--
Martin Kielhorn
Randall Division of Cell & Molecular Biophysics
King's College London, New Hunt's House
Guy's Campus, London SE1 1UL, U.K.
tel: +44 (0) 207 848 6519, fax: +44 (0) 207 848 6435
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)