Michael,

A periodic event timer at 30 times a second should not cause pauses forever, 
unless the action you are performing in the event notification function takes 
more than 1/30 of a second to complete.  You should be able to just add a 
periodic event handler that does nothing, so you can measure what the overhead 
is.

Another option is to use the performance counter in the TimerLib each time a 
Blt() is called (GetPerformanceCounterProperties() and 
GetPerformanceCounter()).  When Blt() is called frequently, the amount of time 
since last vsync will have elapsed, and you can go the vsync action within the 
Blt() call.  If you also set a one shot timer event, so if the last call to 
Blt() did not do a vsync and there are no more Blt() calls, 1/30th of a second 
later, the vsync action can be done.  Every time Blt() is called, the one shot 
timer can be re-armed.  This way, the one shot timer event is not actually 
executed very often.

Mike

>-----Original Message-----
>From: edk2-devel [mailto:[email protected]] On Behalf Of Michael 
>Zimmermann
>Sent: Wednesday, November 11, 2015 12:32 AM
>To: [email protected]
>Subject: [edk2] EFI GOP with manual vsync trigger
>
>Hi,
>
>my Graphics HW uses a manual vsync trigger. That means that after drawing
>to the framebuffer I need to manually trigger vsync(you can compare it to
>switching between double buffers).
>
>The problem is that UEFI's GraphicsOutputProtocol(GOP) doesn't take care of
>HW that needs a flush.
>While issuing the trigger after every Blt Operation works, this obviously
>causes extremely slow rendering for applications like the Shell which call
>Blt very often(like for every character).
>
>Also I can't use a timer to set the trigger(like 30times a second) because
>it takes too much time and the Timer Interrupt ends up consuming too much
>time and the "normal" code gets paused forever.
>
>Do you have any other ideas how to handle this?
>
>Thx
>Michael
>_______________________________________________
>edk2-devel mailing list
>[email protected]
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to