Re: [Y2038] [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
On Tuesday 15 September 2015 18:32:36 Hans Verkuil wrote:
> >  
> > - ktime_get_ts();
> > + ktime_get_ts64();
> > + vts.tv_sec = timestamp.tv_sec;
> > + vts.tv_nsec = timestamp.tv_nsec;
> 
> I prefer to take this opportunity to create a v4l2_get_timespec helper
> function, just like v4l2_get_timeval.

Ok, good idea. I'll do that once we have agreed on the ABI.

> > @@ -2088,7 +2094,7 @@ struct v4l2_event {
> >   } u;
> >   __u32   pending;
> >   __u32   sequence;
> > - struct timespec timestamp;
> > + struct v4l2_timespectimestamp;
> >   __u32   id;
> >   __u32   reserved[8];
> >  };
> > 
> 
> I think I am OK with this. This timestamp is used much more rarely and I do
> not expect this ABI change to cause any problems in userspace.

I'd still wait the outcome of the v4l2_timeval discussion though. It may
be useful for consistency to pick the same approach for both structures.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [Y2038] [PATCH 7/7] [RFC] [media] introduce v4l2_timespec type for timestamps

2015-09-15 Thread Arnd Bergmann
On Tuesday 15 September 2015 18:32:36 Hans Verkuil wrote:
> >  
> > - ktime_get_ts();
> > + ktime_get_ts64();
> > + vts.tv_sec = timestamp.tv_sec;
> > + vts.tv_nsec = timestamp.tv_nsec;
> 
> I prefer to take this opportunity to create a v4l2_get_timespec helper
> function, just like v4l2_get_timeval.

Ok, good idea. I'll do that once we have agreed on the ABI.

> > @@ -2088,7 +2094,7 @@ struct v4l2_event {
> >   } u;
> >   __u32   pending;
> >   __u32   sequence;
> > - struct timespec timestamp;
> > + struct v4l2_timespectimestamp;
> >   __u32   id;
> >   __u32   reserved[8];
> >  };
> > 
> 
> I think I am OK with this. This timestamp is used much more rarely and I do
> not expect this ABI change to cause any problems in userspace.

I'd still wait the outcome of the v4l2_timeval discussion though. It may
be useful for consistency to pick the same approach for both structures.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/