PgWaitVSync busy waiting

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

Martin Tilsted

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

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 :}

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… :wink:

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 :wink:

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

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… > :wink:

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

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 > :wink:

Why not? Windows does it! :wink:

\

Wojtek Lerch QNX Software Systems Ltd.