On 08/07/2014 08:50 AM, Daniel Vetter wrote: > On Thu, Aug 7, 2014 at 2:50 AM, Mario Kleiner > <mario.kleiner.de at gmail.com> wrote: >> I'm not sure about all the new embedded drivers, if they have hw vblank >> counters? > Quick grep says a lot don't have it or at least not implemented - they > use drm_vblank_count. Thinking about this, should we use that as a > signal to also set dev->vblnka_disable_allowed = false in > drm_vblank_init? > -Daniel
dev->vblank_disable_allowed = false; is already the default set in drm_vblank_init(). I think it was the idea of that flag that drivers which support a somewhat correct vblank dis/enable (= have useable hw vblank counters) opt-in to the vblank disable after some idle time by setting it to true. The strange thing is that unconditional dev->vblank_disable_allowed = true in drm_vblank_post_modeset()? It's there since the first introduction of the flag. The i915, gma500, armada and exynos drivers explicitely set the flag to true to opt-in to the auto vblank disable. radeon gets it implicitely set by calling the vblank_post_modeset function. Tegra also gets it via the post_modeset, and nouveau on old cards with nv04 display engine. armada, exynos and tegra don't have proper hw vblank counter queries, but opt-in, so those will lose vblank counts whenever vblank irqs get turned off. It's a bit all over the place. -mario