From: Adrian M. <ad...@ne...> - 2007-07-16 20:40:49
|
On Mon, 2007-07-16 at 07:42 +0900, Paul Mundt wrote: > On Sun, Jul 15, 2007 at 07:09:02PM +0100, Adrian McMenamin wrote: > > It appears it is not the sh_dmac code which is to blame, but the > > pvr2_dma code. If I fix the build to exclude pvr2_dma.c, the Dreamcast > > will boot with CONFIG_NR_ONCHIP_DMA_CHANNELS set correctly (ie to 4) > > > CONFIG_NR_ONCHIP_DMA_CHANNELS should be 4 for this, yes. > CONFIG_NR_DMA_CHANNELS should be 9, as per the Kconfig entry. > > > Plainly the pvr code is broken when it tries to take channel 4, not sure > > why though, will have a deeper look. > > > How do you reach that conclusion? The pvr code is requesting the first > channel of the pvr2 DMAC. SH DMAC channels are mapped to virtual channels > 0 - 3, pvr2 at 4, andthe G2 channels above that. It's all ordering > dependent. > > While there might be some problems in the channel management, you're > barking up the wrong tree here. This stuff worked fine before, and the > driver has undergone zero changes in terms of the DMA code since then. OK, I've made sure that the modules are compiled and loaded in the right order, and built pvr2fb as a module - get this now: Builds with correct number of channels: [ 0.036116] DMA: Registering DMA API. [ 0.036203] DMA: Registering sh_dmac handler (4 channels). [ 0.038616] DMA: Registering pvr2_dmac handler (1 channel). [ 0.039326] DMA: Registering g2_dmac handler (4 channels). But oopses on attempt to load module - don't know if this is a toolset problem or code: / # modprobe pvr2fb [ 74.814053] Fault in unaligned fixup: 0000 [#1] [ 74.817984] Modules linked in: pvr2fb cfbcopyarea cfbimgblt cfbfillrect [ 74.824808] [ 74.826344] Pid : 713, Comm: modprobe [ 74.831211] PC is at request_dma+0x2a/0x84 [ 74.835429] PC : 8c10f96e SP : 8c1fbea8 SR : 400080f1 TEA : c0103be4 Not tainted [ 74.843601] R0 : 00000000 R1 : 00000001 R2 : 8c1e20d0 R3 : 8c1e20d0 [ 74.850428] R4 : 00000004 R5 : c010f11c R6 : 00000000 R7 : 8c1fbd98 [ 74.857253] R8 : ffffffea R9 : 00000000 R10 : 00000000 R11 : c010f11c [ 74.864082] R12 : c0110244 R13 : 8cd21998 R14 : c0109000 [ 74.869557] MACH: 00000245 MACL: 00000005 GBR : 00000000 PR : 8c10f95e [ 74.876368] [ 74.876395] Call trace: [ 74.880507] [<c01000b8>] pvr2fb_dc_init+0x9c/0x108 [pvr2fb] [ 74.886261] [<c010018c>] pvr2fb_init+0x68/0xb8 [pvr2fb] [ 74.891644] [<8c02e4be>] sys_init_module+0xfba/0x1090 [ 74.896857] [<8c174ee4>] mutex_unlock+0x0/0x40 [ 74.901438] [<8c174ee4>] mutex_unlock+0x0/0x40 [ 74.906061] [<8c007244>] syscall_call+0xc/0x10 [ 74.910604] [<8c02d504>] sys_init_module+0x0/0x1090 [ 74.915645] [ 74.917161] Process: modprobe (pid: 713, stack limit = 8c1fa001) [ 74.923360] Stack: (0x8c1fbea8 to 0x8c1fc000) [ 74.927840] bea0: c01000b8 ffffffed 00000000 c010fd54 c010fd6c c010018c [ 74.936372] bec0: 8c02e4be c010aa8c 8c174ee4 c011015c c01100a0 8c174ee4 00000000 00000000 [ 74.944905] bee0: 00000000 00000000 004160c8 c010a9e4 8cd1b7c0 c010bbdc 00000011 00000012 [ 74.953438] bf00: 00000000 00000000 00000000 0000000b 00000000 00000007 00000000 00000000 [ 74.961971] bf20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000006f [ 74.970505] bf40: 0000006f 00000000 00000001 00000000 00000000 00000000 00000000 00000013 [ 74.979038] bf60: 00000174 00000028 c0109030 c0109030 c0109030 c0109030 000002f8 8c1793e8 [ 74.987571] bf80: 8c007244 7bf5fadc 00418290 295e2490 ffffff0f 00000001 8c1fbff8 8c02d504 [ 74.996104] bfa0: 0000308d 00400ef8 7bf5fadc 00000080 29560000 0000308d 004160c8 004160c8 [ 75.004637] bfc0: 00000000 00000000 00000000 004160b8 295e2490 00418290 7bf5fadc 7bf5fadc [ 75.013170] bfe0: 2959862e 00402b48 00008001 00000000 00000210 07ab98f7 00000054 00000160 Segmentation fault |