Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
149 user(s) are online (138 user(s) are browsing Forums)

Members: 0
Guests: 149

more...

Support us!

Headlines

 
  Register To Post  

DMAing between PCI cards
Quite a regular
Quite a regular


See User information
Hi everybody,

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?

Anyone got any advice? Thanks!

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Spirantho

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.
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Rogue

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.

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Spirantho

Quote:

Spirantho wrote:
@Rogue

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.
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Rogue

Quote:

Rogue wrote:
@Spirantho

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.

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Spirantho

Quote:

Spirantho wrote:

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.
Go to top
Re: DMAing between PCI cards
Quite a regular
Quite a regular


See User information
@Rogue

Quote:

Does the chip not support a scatter/gather list?

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!)

Thanks again!

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: DMAing between PCI cards
Supreme Council
Supreme Council


See User information
@Spirantho

How about writing a guide based on your findings? Can submit it as an article here on amigans.

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: DMAing between PCI cards
Home away from home
Home away from home


See User information
@orgin

Quote:

orgin wrote:
@Spirantho

How about writing a guide based on your findings? Can submit it as an article here on amigans.


I like that idea. That would be helpful for anyone that decides to start writing a driver.

Hans

Go to top
Re: DMAing between PCI cards
Just popping in
Just popping in


See User information
@orgin

Or even utilitybase.com would be much better. Don't you think?

A1-XE/G4@933+Radeon7500/64MB, A1200BPPC+BVision
AmigaOS4 on both of course.
Go to top
Re: DMAing between PCI cards
Supreme Council
Supreme Council


See User information
@Chip

What is better is not for me to decide, that's for the author(s) to do.

As long as people don't see either choice as 'The Evil' or 'The Bad' choice then I'm happy.

Besides, there's nothing wrong with trying to fill our article section with articles.

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: DMAing between PCI cards
Home away from home
Home away from home


See User information
@Spirantho

Sound like you?re tiring to do some really cool stuff, I hope you succeed

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project