PgWaitVSync busy waiting

bridged with qdn.public.qnxrtp.advocacy
Post Reply
Martin Tilsted

PgWaitVSync busy waiting

Post by Martin Tilsted » Wed Mar 20, 2002 2:26 pm

Does there exists any graphics drivers for qnx6 which implements
PgWaitVSync using an interrupt insted of busy waiting?

Martin Tilsted

Mario Charest

Re: PgWaitVSync busy waiting

Post by Mario Charest » Wed Mar 20, 2002 2:32 pm

Try the photon conference maybe?

"Martin Tilsted" <tiller@daimi.au.dk> wrote in message
news:3C989C10.D3D59734@daimi.au.dk...
Does there exists any graphics drivers for qnx6 which implements
PgWaitVSync using an interrupt insted of busy waiting?

Martin Tilsted

Martin Tilsted

Re: PgWaitVSync busy waiting

Post by Martin Tilsted » Wed Mar 20, 2002 2:40 pm

Mario Charest wrote:
Try the photon conference maybe?

"Martin Tilsted" <tiller@daimi.au.dk> wrote in message
news:3C989C10.D3D59734@daimi.au.dk...
Does there exists any graphics drivers for qnx6 which implements
PgWaitVSync using an interrupt insted of busy waiting?

Martin Tilsted
I tried that(Some time ago) and nobody answered. This time I a am
prepared so that if nobody answer I can write a long rant about busy
waiting and ugly graphics widtout beeing off-topic :}

To see the problem just try to start voyager and go to
www.slashdot.com(or an other site with a long page) and try to scroll
down using the "arrow down" key. Notice how voyager is unable to scroll
even remotely
smooth. This is a problem anyware where you scroll anything. This
problem is not not only in qnx. Windows/linux have it too -((((. (Se I
was in the right newsgroup after all :}

David Donohoe

Re: PgWaitVSync busy waiting

Post by David Donohoe » Wed Mar 20, 2002 4:03 pm

Martin Tilsted <tiller@daimi.au.dk> wrote:
Mario Charest wrote:

Try the photon conference maybe?

"Martin Tilsted" <tiller@daimi.au.dk> wrote in message
news:3C989C10.D3D59734@daimi.au.dk...
Does there exists any graphics drivers for qnx6 which implements
PgWaitVSync using an interrupt insted of busy waiting?

Martin Tilsted

I tried that(Some time ago) and nobody answered. This time I a am
prepared so that if nobody answer I can write a long rant about busy
waiting and ugly graphics widtout beeing off-topic :}
Sorry nobody answered; well, better late than never:

We have used interrupts to wait for VSync in some of our "custom" drivers
to avoid busy waiting, but are reluctant to do so for "standard" drivers.
With custom drivers, the hardware configuration is well known, and you
can be sure the VSync interrupt will actually work.

With standard chipsets, you don't know whether the board manufacturer
bothered to connect the interrupt pin, or whether there is a jumper
on the board which enables/disables the interrupt, and if so, whether
the jumper is connected or not.

I suppose we could add some code to detect whether interrupt is
firing or not, and fall back to busy waiting if it's not.
Maybe one of these days... ;-)

But also, you run the risk of breaking systems that worked for years,
even though the are misconfigured, e.g. an ISA edge triggered interrupt
being shared with PCI video cards level-triggered interrupt.
When you let the video card start generating interrupts, the ISA
device stops working.

I'm not sure if we can add code to detect whether the system
locked up due to misconfiguration ;-)
To see the problem just try to start voyager and go to
www.slashdot.com(or an other site with a long page) and try to scroll
down using the "arrow down" key. Notice how voyager is unable to scroll
even remotely
smooth. This is a problem anyware where you scroll anything. This
problem is not not only in qnx. Windows/linux have it too -((((. (Se I
was in the right newsgroup after all :}
I doubt this has anything to do with waiting for VSync, since voyager does
not call PgWaitVSync(). It probably has to do with HTML rendering being
CPU intensive.

Dave

Martin Tilsted

Re: PgWaitVSync busy waiting

Post by Martin Tilsted » Wed Mar 20, 2002 5:02 pm

Sorry nobody answered; well, better late than never:

We have used interrupts to wait for VSync in some of our "custom" drivers
to avoid busy waiting, but are reluctant to do so for "standard" drivers.
With custom drivers, the hardware configuration is well known, and you
can be sure the VSync interrupt will actually work.
Was this done with "standart" PCI/AGP hardware?.
I suppose we could add some code to detect whether interrupt is
firing or not, and fall back to busy waiting if it's not.
Maybe one of these days... ;-)
How about making 2 functions.

NewIsVBlankInterruptAvailable(); // Return true if there is a VBlank
interrupt. false else.

NewPgWaitVSync(); // Wait for the VBlank interrupt. NOP if there don't
exists a vblank interrupt.

I don't think that busywaiting in NewPgWaitVSync is a good idear. People
normaly calls me very ugly things when I busy wait in a program running
on the desktop.
But also, you run the risk of breaking systems that worked for years,
even though the are misconfigured, e.g. an ISA edge triggered interrupt
being shared with PCI video cards level-triggered interrupt.
When you let the video card start generating interrupts, the ISA
device stops working.
Hence the sugestion to making 2 new functions :}
I doubt this has anything to do with waiting for VSync, since voyager does
not call PgWaitVSync(). It probably has to do with HTML rendering being
CPU intensive.
That is the entire problem. Voyager can't use PgWaitVSync because then
voyager would use 100% time each time you scrolled.
Se me answer to David Rempel about what Voyager should do, it it could
use (New) PgWaitVSync();

Martin Tilsted

Wojtek Lerch

Re: PgWaitVSync busy waiting

Post by Wojtek Lerch » Wed Mar 20, 2002 5:13 pm

David Donohoe <ddonohoe@qnx.com> wrote:
I'm not sure if we can add code to detect whether the system
locked up due to misconfiguration ;-)
Why not? Windows does it! ;-)


--
Wojtek Lerch QNX Software Systems Ltd.

Post Reply

Return to “qdn.public.qnxrtp.advocacy”