Commit 2d0a7df8 authored by Dimitris Lampridis's avatar Dimitris Lampridis Committed by Dimitris Lampridis

sw: stop modifying the event timestamp when setting queue timeouts

parent 58c3e6ce
......@@ -141,9 +141,6 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
if (adcout_out_queue_empty(q))
return;
ev = adcout_out_queue_front(q);
ts = &ev->ts;
if (!wr_is_timing_ok()) {
adcout_drop_trigger(dev, ev, WRTD_LOG_DISCARD_NO_SYNC, NULL);
return;
......@@ -151,14 +148,14 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
/* Program the output start time */
adcout_writel(dev, 0, ALT_TRIGIN_SECONDS + 0);
adcout_writel(dev, ts->seconds, ALT_TRIGIN_SECONDS + 4);
adcout_writel(dev, ts->ns / 8, ALT_TRIGIN_CYCLES);
adcout_writel(dev, ev->ts.seconds, ALT_TRIGIN_SECONDS + 4);
adcout_writel(dev, ev->ts.ns / 8, ALT_TRIGIN_CYCLES);
adcout_writel(dev, ALT_TRIGIN_CTRL_ENABLE, ALT_TRIGIN_CTRL);
wrtd_log(WRTD_LOG_MSG_EV_CONSUMED, WRTD_LOG_CONSUMED_START,
NULL, ev, NULL);
ts_add2_ns (ts, 8000);
ts_add3_ns (ts, &ev->ts, 8000);
/*
* Store the last programmed timestamp (+ some margin) and mark
......
......@@ -230,22 +230,19 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
if (pulse_queue_empty(q))
return;
ev = pulse_queue_front(q);
ts = &ev->ts;
if (!wr_is_timing_ok()) {
drop_trigger(out, ev, q, WRTD_LOG_DISCARD_NO_SYNC);
return;
}
/* Program the output start time */
fd_ch_writel(out, ts->seconds, FD_REG_U_STARTL);
fd_ch_writel(out, ts->ns / 8, FD_REG_C_START);
fd_ch_writel(out, ((ts->ns & 7) << 9) | (ts->frac >> (32 - 9)),
fd_ch_writel(out, ev->ts.seconds, FD_REG_U_STARTL);
fd_ch_writel(out, ev->ts.ns / 8, FD_REG_C_START);
fd_ch_writel(out, ((ev->ts.ns & 7) << 9) | (ev->ts.frac >> (32 - 9)),
FD_REG_F_START);
/* Adjust pulse width and program the output end time */
ts_add2_ns(ts, out->width_ns);
ts_add3_ns(ts, &ev->ts, out->width_ns);
fd_ch_writel(out, ts->seconds, FD_REG_U_ENDL);
fd_ch_writel(out, ts->ns / 8, FD_REG_C_END);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment