vcrtcm: add 1024x600 to the list of common modes

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
vcrtcm: cleanup some line breaks

Cleanup a piece of code before we touch it.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
vcrtcm: issue vblanks only if PCON DPMS state is on

Physical CRTCs stop progressing vblank-events if their
associated connector goes into DPMS-off state because
the clock source to the CRTC halts. Virtual CRTCs do not
behave this way, which is wrong. This patch fixes the
problem by stopping the associated vblank thread if
PCON is put in DPMS-off state. If we look at it through
"PCON is a connector" analogy, then this is the right
behavior.

The vblank-generation thread should be re-enabled when
we transition back from DPMS-off into DPMS-on state.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
vcrtcm: do not start vblank thread unecessarily

When set_fps function is called, we should only start
the vblank thread if
1) we are making the transition from zero to non-zero fps
   (we should not start it for zero-to-zero transition)
2) the associated PCON's DPMS state is ON regardless of
   the fps transition.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
drm: implement drm_vcrtcm_get_time function

As of 3.9 kernel, DRM timestamp can be either
monotonic or wall-clock timestamp depending on the value
of drm_timestamp_monotonic. So we no longer can
use do_gettimeofday to generate timestamp for emulated
vblanks. We have to look at drm_timestamp_monotonic
parameter and do the right thing depending on its
value.

Rather than having other modules peek into this parameter
(which is ugly) we write a small helper function inside DRM
module that returns the present time in correct
format (monotonic or wall-clock). All other VCRTCM-based
modules should use this function to generate the timestamp.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
drm/radeon/kms: use helper for emulated vblank timestamps

Instead of useing do_gettimeofday, we use a new
helper function in DRM that returns either
monotonic or wall-clock timestamp depending on
the relevant parameter.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>