Arnd Bergmann cff52e5fc4 drm: avoid uninitialized timestamp use in wait_vblank
gcc warns about the timestamp in drm_wait_vblank being possibly
used without an initialization:

drivers/gpu/drm/drm_irq.c: In function 'drm_crtc_send_vblank_event':
drivers/gpu/drm/drm_irq.c:992:24: error: 'now.tv_usec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/drm_irq.c:1069:17: note: 'now.tv_usec' was declared here
drivers/gpu/drm/drm_irq.c:991:23: error: 'now.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This can happen if drm_vblank_count_and_time() returns 0 in its
error path. To sanitize the error case, I'm changing that function
to return a zero timestamp when it fails.

Fixes: e6ae8687a87b ("drm: idiot-proof vblank")
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161017221355.1861551-6-arnd@arndb.de
2016-10-18 09:45:17 +02:00
..
2016-09-23 11:50:49 -07:00
2016-09-07 21:24:42 -07:00
2016-09-28 12:08:49 +10:00
2016-07-30 21:01:36 -07:00
2016-09-03 10:40:57 -07:00
2016-09-16 13:51:42 -07:00
2016-07-30 21:01:36 -07:00
2016-08-01 18:36:01 -04:00
2016-09-22 02:47:46 -04:00
2016-07-20 23:39:36 -07:00
2016-09-14 14:06:30 -07:00
2016-08-12 14:59:10 +05:30
2016-08-06 00:01:33 -04:00
2016-08-05 09:48:22 -04:00
2016-09-16 04:29:14 -04:00
2016-09-06 11:06:52 -07:00
2016-08-01 18:36:01 -04:00
2016-09-28 12:08:49 +10:00
2016-09-16 17:42:10 +02:00
2016-08-02 19:35:40 -04:00
2016-08-06 09:20:13 -04:00