CHROMIUM: drm/exynos: disallow vblank_disable (for now)

exynos drm does not update crtc vblank counters when crtc vblank irqs are
disabled.

EGL does not (yet) provide a "GetMscRate", so EGL applications
compute MSC rate using MSC and UCT (ie, the vblank_count and its
corresponding timestamp) values returned from by via:
  DRI2GetMSC ->
  drmWaitVBlank({.seq=0, .type=_DRM_VBLANK_RELATIVE}) ->
  ioctl(DRM_IOCTL_WAIT_VBLANK)

Since vblanks aren't counted when the crtc vblank irq is disabled, this
computed MSC rate is miscalculated.

Disallow vblank_disable until this is fixed.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG=chromium:328953
TEST=cd /sys/kernel/debug/tracing
  # ensure no screen updates are occuring
  # for example, at blank page, click the window to disable cursor blink
  F=$(grep vblank available_filter_functions); echo ${F} > set_ftrace_filter ; echo ${F} > set_graph_function
  echo function_graph > current_tracer
  echo funcgraph-abstime > trace_options
  cat trace_pipe
  => Should still see messages like this, every 16.7 ms:
225918.023949 |   0)               |  drm_handle_vblank() {
225918.023961 |   0)   1.375 us    |    drm_vblank_count_and_time();
225918.023974 |   0) + 19.084 us   |  }
225918.040647 |   0)               |  drm_handle_vblank() {
225918.040660 |   0)   1.333 us    |    drm_vblank_count_and_time();
225918.040673 |   0) + 19.500 us   |  }
TEST=tail -F /var/log/chrome/chrome
  at blank webpage click to disable blinking cursor
  wait > 300 seconds
  click in the search box to start cursor blinking...
  => Should be no FATAL sync_control_vsync_provider message like this:
 [12556:12556:0113/061218:FATAL:sync_control_vsync_provider.cc(126)] Calculated bogus refresh interval of 250562 us. Last time base of 822186893 us. Current time base of 839225114 us. Last media stream count of 30565. Current media stream count of 30633.

Change-Id: I1290bf83d7cc4e81fc6c3710413e4c602d0af512
Reviewed-on: https://chromium-review.googlesource.com/182310
Reviewed-by: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Revert "drm/exynos: Call pre/post modeset vblank hooks from modeset code"

This reverts commit 9abd7485590937b5fd1c0763bf0af3685e631b18.

exynos drm does not update crtc vblank counters when crtc vblank irqs are
disabled.  This causes problems when userspace tries to use vblank counts
and timestamps to estimate vrefresh.

commit [0] tried to fix this, but was incomplete.  It turns out that
setting vblank_disable_allowed to 0 in exynos_drm_load() doesn't do
anything, since at that point, thevblank_disable_allowed is already 0 (it
was initialized to 0 in drm_vblank_init()).

However, vblank_disable_allowed gets set to 1 during any modeset (on any
crtc), when exynos_drm_crtc_commit() calls drm_vblank_pre_modeset().
In particular, it gets set to 1 in the initial FIMD modeset during
exynos_drm_fbdev_init() (it would also get set to 1 on any subsequent
modeset, such as an external monitor hotplug).

[0] commit 5a560c448d6288803331bfce2cadaaae6c433f0b
CHROMIUM: drm/exynos: disallow vblank_disable (for now)

So, since, (for now) we don't ever want to turn off the vblank irq based
on drm_vblank_get/put refcounts, let's revert the patch that calls
drm_vblank_pre/post_modeset() that actually enables this behavior.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG=chromium:328953
TEST=cd /sys/kernel/debug/tracing
  # ensure no screen updates are occuring
  # for example, at blank page, click the window to disable cursor blink
  F=$(grep vblank available_filter_functions); echo ${F} > set_ftrace_filter ; echo ${F} > set_graph_function
  echo function_graph > current_tracer
  echo funcgraph-abstime > trace_options
  cat trace_pipe
  => Should still see messages like this, every 16.7 ms:
225918.023949 |   0)               |  drm_handle_vblank() {
225918.023961 |   0)   1.375 us    |    drm_vblank_count_and_time();
225918.023974 |   0) + 19.084 us   |  }
225918.040647 |   0)               |  drm_handle_vblank() {
225918.040660 |   0)   1.333 us    |    drm_vblank_count_and_time();
225918.040673 |   0) + 19.500 us   |  }
TEST=tail -F /var/log/chrome/chrome
  at blank webpage click to disable blinking cursor
  wait > 300 seconds
  click in the search box to start cursor blinking...
  => Should be no FATAL sync_control_vsync_provider message like this:
 [12556:12556:0113/061218:FATAL:sync_control_vsync_provider.cc(126)] Calculated bogus refresh interval of 250562 us. Last time base of 822186893 us. Current time base of 839225114 us. Last media stream count of 30565. Current media stream count of 30633.

Change-Id: I41f298f907316d0d680ba153eea3044b83afa45b
Reviewed-on: https://chromium-review.googlesource.com/182764
Reviewed-by: John Sheu <sheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>