]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vblank: Document and fix vblank count barrier semantics
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jul 2019 13:13:37 +0000 (15:13 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 3 Sep 2019 15:16:53 +0000 (17:16 +0200)
commitb8854232ce693d7b6c1a5dddd1b96d1bbf88f420
tree7a5908b42fbd254473dab7bb7a1ee8aaeabd3431
parent72fa7651d40075fe63c58f963656bdf266f52ac5
drm/vblank: Document and fix vblank count barrier semantics

Noticed while reviewing code. I'm not sure whether this might or might
not explain some of the missed vblank hilarity we've been seeing on
various drivers (but those got tracked down to driver issues, at least
mostly). I think those all go through the vblank completion event,
which has unconditional barriers - it always takes the spinlock.
Therefore no cc stable.

v2:
- Barrriers are hard, put them in in the right order (Chris).
- Improve the comments a bit.

v3:

Ville noticed that on 32bit we might be breaking up the load/stores,
now that the vblank counter has been switched over to be 64 bit. Fix
that up by switching to atomic64_t. This this happens so rarely in
practice I figured no need to cc: stable ...

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Keith Packard <keithp@keithp.com>
References: ce95d37a9062 ("drm: Widen vblank count to 64-bits [v3]")
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190723131337.22031-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_vblank.c
include/drm/drm_vblank.h