]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Push vblank enable/disable past encoder->enable/disable
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 7 Jan 2015 12:54:39 +0000 (13:54 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 7 Jan 2015 17:18:56 +0000 (18:18 +0100)
commitdc03db43d5dcff9fa3812e601ee5c8392924bfe6
treed58cb1fc319afe9e15c4588094b94f25a145135a
parent415765c491786b21d048111c4c540872f972a6e8
drm/i915: Push vblank enable/disable past encoder->enable/disable

It is platform/output depenedent when exactly the pipe will start
running. Sometimes we just need the (cpu) pipe enabled, in other cases
the pch transcoder is enough and in yet other cases the (DP) port is
sending the frame start signal.

In a perfect world we'd put the drm_crtc_vblank_on call exactly where
the pipe starts running, but due to cloning and similar things this
will get messy. And the current approach of picking the most
conservative place for all combinations also doesn't work since that
results in legit vblank waits (in encoder->enable hooks, e.g. the 2
vblank waits for sdvo) failing.

Completely going back to the old world before

commit e7d25879726c57229cb23561815ab1774427a1ac
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Sep 15 12:36:02 2014 +0200

    drm/i915: Use generic vblank wait

isn't great either since screaming when the vblank wait work because
the pipe is off is kinda nice.

Pick a compromise and move the drm_crtc_vblank_on right before the
encoder->enable call. This is a lie on some outputs/platforms, but
after the ->enable callback the pipe is guaranteed to run everywhere.
So not that bad really. Suggested by Ville.

v2: Same treatment for drm_crtc_vblank_off and encoder->disable: I've
missed the ibx pipe B select w/a, which also has a vblank wait in the
disable function (while the pipe is obviously still running).

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/intel_display.c