PDA

View Full Version : [Proposal pending] Implementation of Vsync


cryox92
03-16-2010, 04:48 AM
What is Vsync?

VSync stands for Vertical Synchronization. The basic idea is that synchronizes your FPS with your monitor's refresh rate. The purpose is to eliminate something called "tearing". I will describe all these things here.

Every screen monitor has a refresh rate. It's specified in Hz (Hertz, cycles per second). It is the number of times the screen updates the display per second. Different monitors support different refresh rates at different resolutions. They range from 60Hz at the low end up to 100Hz and higher. Note that this isn't your FPS as your games report it. If your monitor is set at a specific refresh rate, it always updates the screen at that rate, even if nothing on it is changing. On an LCD, things work differently. Pixels on an LCD stay lit until they are told to change; they don't have to be refreshed. However, because of how VGA (and DVI) works, the LCD must still poll the video card at a certain rate for new frames. This is why LCD's still have a "refresh rate" even though they don't actually have to refresh.

Tearing is a phenomenon that gives a disjointed image. The idea is as if you took a photograph of something, then rotated your vew maybe just 1 degree to the left and took a photograph of that, then cut the two pictures in half and taped the top half of one to the bottom half of the other. The images would be similar but there would be a notable difference in the top half from the bottom half. This is what is called tearing on a visual display. It doesn't always have to be cut right in the middle. It can be near the top or the bottom and the separation point can actually move up or down the screen, or seem to jump back and forth between two points.

Why does this happen? Lets take a specific example. Let's say your monitor is set to a refresh rate of 75Hz. You're playing your favorite game and you're getting 100FPS right now. That means that the mointor is updating itself 75 times per second, but the video card is updating the display 100 times per second, that's 33% faster than the mointor. So that means in the time between screen updates, the video card has drawn one frame and a third of another one. That third of the next frame will overwrite the top third of the previous frame and then get drawn on the screen. The video card then finishes the last 2 thirds of that frame, and renders the next 2 thirds of the next frame and then the screen updates again. As you can see this would cause this tearing effect as 2 out of every 3 times the screen updates, either the top third or bottom third is disjointed from the rest of the display. This won't really be noticeable if what is on the screen isn't changing much, but if you're looking around quickly or what not this effect will be very apparant.

http://hardforum.com/showthread.php?t=928593 <-----More info

chemist
03-22-2010, 09:52 AM
So what is your problem and what is your brainstorm? If you are getting tearing this might be worth a bugreport!
Please get clear on that!
(Nice explanation btw!)

soeiro
03-26-2010, 09:09 AM
I think that the OP just wants that the VSync function be implemented on the N900. I assume that its activation could be optional, triggered by a button in the settings menu: "Use VSync".

extent
03-26-2010, 09:22 AM
its very easy to spot this screen tearing/lines problem in some utilities, eg vsynch definately needs to be included as an option in games emulators, or any program which includes alot of vertical 2d scrolling, as an example, where its very obvious to notice. im not sure if this may be down to the developer to implement, or if it might be easier for nokia to add to the phone in general as a screen vsynch on/off option, and then not need to be included elsewhere such as in seperate installed programs

ArnimS
05-29-2010, 08:03 AM
I support reporting refresh event. If that cannot be done, perhaps we should request a "force lcd refresh" command instead.

Of course maybe the answer is "ignore tearing and go do something else". But it is lamentable or lame for short.

pH5
05-29-2010, 08:40 AM
If you are getting tearing this might be worth a bugreport!
Check out bugs #5556 (https://bugs.maemo.org/show_bug.cgi?id=5556), #8116 (https://bugs.maemo.org/show_bug.cgi?id=8116), and #9320 (https://bugs.maemo.org/show_bug.cgi?id=9320).

ysss
05-29-2010, 09:08 AM
Heh, I've spotted this issue from youtube demo of early N900 devices a year ago. When I mentioned it in the discussion thread I was met with the usual responses:

1. I must be mistaken.
2. It's early version anyway.
3. It will be fixed (soon, quickly, eventually).

Here's hoping to a better outcome in the future.

cb22
05-29-2010, 09:19 AM
I posted about this in the Meego thread: http://talk.maemo.org/showthread.php?p=687537#post687537

According to https://bugs.maemo.org/show_bug.cgi?id=7459#c3 the new drivers which support vsync should be in Harmatton, and according to one of the Meego team members in that thread, the Meego 1.0 build has the latest SGX drivers.

I wonder how easy it would be to get Maemo 5 booting up with their 2.6.33 kernel, and relevant X libraries?