freedreno/log: avoid duplicate ts's
authorRob Clark <robdclark@chromium.org>
Mon, 30 Mar 2020 16:30:54 +0000 (09:30 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 23:20:13 +0000 (23:20 +0000)
commit1b3aefad46bda59ff02c0d81c53fd3fbf249d8f4
treee49281731ef67ec9d369b36d0f2dba0c8d39711a
parent2bf7dba80bb196bbb557e26017a5297c80fe2428
freedreno/log: avoid duplicate ts's

In cases where `fd_log()`/`fd_log_stream()` are called multiple times
back-to-back, just use the timestamp of the first trace.

This seems to avoid some occasional GPU hangs I was seeing with logging
enabled.  Although not exactly sure the reason for the hangs.  (Looks
like GPU hangs *after* all the cmdstream is processed, according to
crashdec.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
src/gallium/drivers/freedreno/freedreno_log.c