Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225350 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2015-09-15 17:50 +0200 |
| Last post | 2015-09-16 11:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4/7] [media] exynos4-is: use monotonic timestamps as advertized Arnd Bergmann <arnd@arndb.de> - 2015-09-15 17:50 +0200
Re: [PATCH 4/7] [media] exynos4-is: use monotonic timestamps as advertized Sylwester Nawrocki <s.nawrocki@samsung.com> - 2015-09-16 11:00 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-09-15 17:50 +0200 |
| Subject | [PATCH 4/7] [media] exynos4-is: use monotonic timestamps as advertized |
| Message-ID | <q90Ez-Jd-47@gated-at.bofh.it> |
The exynos4 fimc capture driver claims to use monotonic
timestamps but calls ktime_get_real_ts(). This is both
an incorrect API use, and a bad idea because of the y2038
problem and the fact that the wall clock time is not reliable
for timestamps across suspend or settimeofday().
This changes the driver to use the normal v4l2_get_timestamp()
function like all other drivers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/platform/exynos4-is/fimc-capture.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
index cfebf292e15a..776ea6d78d03 100644
--- a/drivers/media/platform/exynos4-is/fimc-capture.c
+++ b/drivers/media/platform/exynos4-is/fimc-capture.c
@@ -183,8 +183,6 @@ void fimc_capture_irq_handler(struct fimc_dev *fimc, int deq_buf)
struct v4l2_subdev *csis = p->subdevs[IDX_CSIS];
struct fimc_frame *f = &cap->ctx->d_frame;
struct fimc_vid_buffer *v_buf;
- struct timeval *tv;
- struct timespec ts;
if (test_and_clear_bit(ST_CAPT_SHUT, &fimc->state)) {
wake_up(&fimc->irq_queue);
@@ -193,13 +191,9 @@ void fimc_capture_irq_handler(struct fimc_dev *fimc, int deq_buf)
if (!list_empty(&cap->active_buf_q) &&
test_bit(ST_CAPT_RUN, &fimc->state) && deq_buf) {
- ktime_get_real_ts(&ts);
-
v_buf = fimc_active_queue_pop(cap);
- tv = &v_buf->vb.v4l2_buf.timestamp;
- tv->tv_sec = ts.tv_sec;
- tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
+ v4l2_get_timestamp(&v_buf->vb.v4l2_buf.timestamp);
v_buf->vb.v4l2_buf.sequence = cap->frame_count++;
vb2_buffer_done(&v_buf->vb, VB2_BUF_STATE_DONE);
--
2.1.0.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sylwester Nawrocki <s.nawrocki@samsung.com> |
|---|---|
| Date | 2015-09-16 11:00 +0200 |
| Subject | Re: [PATCH 4/7] [media] exynos4-is: use monotonic timestamps as advertized |
| Message-ID | <q9gJk-7WT-27@gated-at.bofh.it> |
| In reply to | #1225350 |
On 15/09/15 17:49, Arnd Bergmann wrote: > The exynos4 fimc capture driver claims to use monotonic > timestamps but calls ktime_get_real_ts(). This is both > an incorrect API use, and a bad idea because of the y2038 > problem and the fact that the wall clock time is not reliable > for timestamps across suspend or settimeofday(). > > This changes the driver to use the normal v4l2_get_timestamp() > function like all other drivers. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web