Mesa has long supported vsync for synchronizing with the display's vertical refresh rate, but now there's adaptive vsync support. Adaptive vsync is where the rendering is only synchronized if the current frame-rate is exceeding that of the monitor's refresh rate. If using a 60Hz monitor and the frame-rate is below 60 FPS, no vsync will be done and there will be potential tearing, but otherwise vsync will be enabled.
This adaptive vsync support for Mesa can be enabled via the vblank_mode environment variable by setting vblank_mode=4. There is also the GLX_EXT_swap_control_tear extension (the specification), but it's not yet supported by the Mesa drivers nor is it widely used amongst OpenGL applications.
The initial Mesa patches for adaptive vsync can be found on the Mesa-dev list by Lauri Kasanen until their mainlining in Git.