linux_dsm_epyc7002/drivers/gpu/drm/vkms
Shayenne Moura ba420afab5 drm/vkms: Bugfix racing hrtimer vblank handle
When the vblank irq happens, kernel time subsystem executes
`vkms_vblank_simulate`. In parallel or not, it prepares all stuff
necessary to the next vblank with arm, and it must flush these stuff
before the next vblank irq. However, vblank counter is ahead when arm is
executed in parallel with handle vblank.

CPU 0:					CPU 1:
 |					 |
atomic_commit_tail is ongoing		 |
 |					 |
 |					hrtimer: vkms_vblank_simulate()
 |					 |
 |					drm_crtc_handle_vblank()
 |					 |
drm_crtc_arm_vblank()			 |
 |					 |
->get_vblank_timestamp()		 |
 |					 |
 |					hrtimer_forward_now()

Then, we should guarantee that the vblank interval time is correct (not
changed) before finish the vblank handle.

Fix the bug including the call to `hrtimer_forward_now()` in the same
lock of `drm_crtc_handle_vblank()` to ensure that the timestamp update
is correct when finish the vblank handle.

Signed-off-by: Shayenne Moura <shayenneluzmoura@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e2e4b8f3a5cab7b2dba75bf1930f86b0a4ee08c9.1548856186.git.shayenneluzmoura@gmail.com
2019-02-03 19:28:21 -02:00
..
Makefile drm/vkms: Implement CRC debugfs API 2018-08-03 14:52:58 -04:00
vkms_crc.c drm/vkms: Fix possible memory leak in _vkms_get_crc() 2018-09-21 10:50:45 +02:00
vkms_crtc.c drm/vkms: Bugfix racing hrtimer vblank handle 2019-02-03 19:28:21 -02:00
vkms_drv.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
vkms_drv.h drm/vkms: Drop custom vkms_dumb_map(). 2018-11-27 12:23:32 -08:00
vkms_gem.c drm/vkms: Drop custom vkms_dumb_map(). 2018-11-27 12:23:32 -08:00
vkms_output.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
vkms_plane.c drm/vkms: Remove set but not used variable 'vkms_obj' 2018-12-04 11:47:27 +01:00