One of the things about doing WinTV card development is that I need to find the best speed, and I think that the usual way is for the WinTV card (which is a BusMastering card) to dump its output straight into the graphics card memory.
How can you go about doing this? I've created an overlay surface and got the address of the bitmap associated with it. When I tried to StartDMA on it, though, the system kind of went kablooie a bit (i.e. it hung solid). Do I need to mess around with Physical Addresses and the like?
StartDMA on a framebuffer address will probably not work because there is no VMarea for the range. That's probably a bug, I'll have to check it.
PCI addresses should always be mapped in one piece, though, so you should be safe for now to just translate virtual to physical (through the PCI range structure) and use the physical address (which is also quite likely the same as the virtual address) for the DMA operation. Can't promise that this works, but it should.
We'll see that this bug gets fixed in the next release.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
Excellent... so I should just need to IMMU->GetPhysicalAddress( OverlayBitmapAddress ) or whatever, and then I should be able to StartDMA() on it?
Ironically enough had I been able to do that already I probably wouldn't be needing to wait for the updated SDK as the Framebuffer should be contiguous anyway.
In the meantime I'll just carry on what I'm doing at the moment (DMAing into main memory, then copying into frame buffer overlay memory). Or at least what I'm trying to do at the moment, albeit in 2K DMA chunks!
Now if I could just work out why the interrupt routine isn't being triggered even when the interrupt is being raised... but that's a different matter entirely I'll worry about when I've got things displaying again.
Excellent... so I should just need to IMMU->GetPhysicalAddress( OverlayBitmapAddress ) or whatever, and then I should be able to StartDMA() on it?
Not even that, you just need to look up the address in the PCI range of the graphics card. For the moment, you can even skip this step because they are always mapped one-to-one.
Quote:
In the meantime I'll just carry on what I'm doing at the moment (DMAing into main memory, then copying into frame buffer overlay memory). Or at least what I'm trying to do at the moment, albeit in 2K DMA chunks!
I am not aware that there should be any kind of problem with the DMA buffer size. For starters, 4k should be safe since that is the page size.
Quote:
Now if I could just work out why the interrupt routine isn't being triggered even when the interrupt is being raised... but that's a different matter entirely I'll worry about when I've got things displaying again.
What machine is this card in? Does it have a bridge?
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
I am not aware that there should be any kind of problem with the DMA buffer size. For starters, 4k should be safe since that is the page size.
It's not a problem per se, it's just a side-effect of not being able to allocate contiguous blocks of memory. Once I can do that it should just work. I hope!
Quote:
Quote:
Now if I could just work out why the interrupt routine isn't being triggered even when the interrupt is being raised... but that's a different matter entirely I'll worry about when I've got things displaying again.
What machine is this card in? Does it have a bridge?
Bog standard A1XE G4@800. Interrupts worked fine when I was using the Bt8x8 chipset, but the CX2388x chipset raises the interrupt from what I can see but the interrupt routine never gets called. The registers on the Cx2388x say it's raised, I can read the interrupt register and it's triggered - it just never calls the routine. It may be a peculiarity of the Cx2388x chipset though.
It's not a problem per se, it's just a side-effect of not being able to allocate contiguous blocks of memory. Once I can do that it should just work. I hope!
Does the chip not support a scatter/gather list?
Quote:
Bog standard A1XE G4@800. Interrupts worked fine when I was using the Bt8x8 chipset, but the CX2388x chipset raises the interrupt from what I can see but the interrupt routine never gets called. The registers on the Cx2388x say it's raised, I can read the interrupt register and it's triggered - it just never calls the routine. It may be a peculiarity of the Cx2388x chipset though.
Have you looked at the PCI device, whether it has a PCI pin and line assigned?
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
Have you looked at the PCI device, whether it has a PCI pin and line assigned?
To be honest I'm not exactly sure, as my knowledge of such things is rather limited (this is the first proper driver I've written, after all). I do know that I can program exactly where I want each pixel to be put in memory, though, which is how I'm working round the lack of a contiguous lump of memory.
As for the PCI pin and line... how can I tell for sure if it's assigned? Certainly the code which worked on the Bt8x8 chipset doesn't work on the Cx2388x chipset even though they're practically the same hardware. How can you diagnose these problems?
Sorry for so many questions, I'm a bit in the dark here but there's not very much documentation on writing device drivers under AmigaOS 4 (not surprisingly given how you're too busy writing the OS itself!)