diff --git a/src/intel/ds/intel_driver_ds.cc b/src/intel/ds/intel_driver_ds.cc index c11160652fe..0eab9067d1f 100644 --- a/src/intel/ds/intel_driver_ds.cc +++ b/src/intel/ds/intel_driver_ds.cc @@ -127,6 +127,10 @@ sync_timestamp(IntelRenderpassDataSource::TraceContext &ctx, struct intel_ds_device *device) { uint64_t cpu_ts, gpu_ts; + uint64_t boottime = perfetto::base::GetBootTimeNs().count(); + + if (boottime < device->next_clock_sync_ns) + return; if (!intel_gem_read_correlate_cpu_gpu_timestamp(device->fd, device->info.kmd_type, @@ -141,13 +145,10 @@ sync_timestamp(IntelRenderpassDataSource::TraceContext &ctx, uint32_t cpu_clock_id = perfetto::protos::pbzero::BUILTIN_CLOCK_BOOTTIME; gpu_ts = intel_device_info_timebase_scale(&device->info, gpu_ts); - if (cpu_ts < device->next_clock_sync_ns) - return; - PERFETTO_LOG("sending clocks gpu=0x%08x", device->gpu_clock_id); device->sync_gpu_ts = gpu_ts; - device->next_clock_sync_ns = cpu_ts + 1000000000ull; + device->next_clock_sync_ns = boottime + 1000000000ull; MesaRenderpassDataSource::EmitClockSync(ctx, cpu_ts, gpu_ts, cpu_clock_id, device->gpu_clock_id);