raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.18k stars 1.68k forks source link

VSync IRQ? #67

Closed rosery closed 12 years ago

rosery commented 12 years ago

Hi.. Is a VSync interrupt available to the ARM in any way please? Thanks

popcornmix commented 12 years ago

No, but I meant to add a mailbox property message that delays until next vsync and then response.

rosery commented 12 years ago

for some games and other stuff an irq would be helpful.. the 'wait for vsync' will certainly be better than nothing.

thanks John

rosery commented 12 years ago

Hi. The VSync issue is coming to the forefront again. Could we possibly have an indication of vsync? .. this allows screen update without tearing or flicker as it can happen in 'dead' time. Either a message 'wait for vsync' in 'issue#47', or ideally set an irq that fires on vsync.

What could be done do you think please

popcornmix commented 12 years ago

I can probably trigger the SMI interrupt when vsync occurs.

rosery commented 12 years ago

Yes please .. that would help very much indeed. Would you need a message to enable/disable it, or would you just waggle it anyway? .. obviously ARM side we can disable..

rosery commented 12 years ago

Hi.. Any progress on using SMI (or another irq?) as a vsync irq to arm side? .. it would be really helpful.. thanks

popcornmix commented 12 years ago

Set fake_vsync_isr=1 in config.txt and I will trigger the SMI interrupt (48) from my vsync callback. In your ISR, you should write 0 to SMICS (0x7E600000/0x20600000) to clear it.

In my source tree, will be in next firmware I push.

rosery commented 12 years ago

That is fantastic.. Many thanks. We'll take that onboard. As a thought, ought it really to be enabled/disabled via the messaging interface #47?... Or it that just a nicety?

Again, many thanks John

popcornmix commented 12 years ago

It may be enabled by mailbox interface, but see if it's useful first.

popcornmix commented 12 years ago

Firmware with this feature is pushed.