]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vblank: Fix vblank timestamp debugs
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 13 Nov 2017 15:02:10 +0000 (17:02 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 29 Nov 2017 13:10:53 +0000 (15:10 +0200)
commit7d82ba04915084677b34675460385ca1ec8c3f2b
tree72afef93301b9f19150ca7dadeff7af5bb071e36
parent9237a4fd93982e0733e4481d06c7b7a109b4cd14
drm/vblank: Fix vblank timestamp debugs

We're currently calling ktime_to_timespec64() on stack garbage
hence the debug output for vblank timestamps also contains garbage.
Let's assing something to the ktime_t first before we go converting
it to a timespec.

While at it micro-optimize the ktime_to_timespec64() calls away
when vblank debugging isn't enabled.

Fixes: 6c312ab45b46 ("drm: vblank: use ktime_t instead of timeval")
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Keith Packard <keithp@keithp.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113150210.11311-1-ville.syrjala@linux.intel.com
Acked-by: Arnd Bergmann <arnd@arndb.de>
drivers/gpu/drm/drm_vblank.c