mbox series

[0/8] Preparing for Y2038 support

Message ID 20190121133229.33893-1-hverkuil-cisco@xs4all.nl (mailing list archive)
Headers show
Series Preparing for Y2038 support | expand

Message

Hans Verkuil Jan. 21, 2019, 1:32 p.m. UTC
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

This patch series modifies v4l2-event, videobuf and various
drivers that do not use vb2 or videobuf at all to store the
event and buffer timestamps internally as a u64 (ktime_get_ns()).

Only when interfacing with the userspace API are these timestamps
converted to a timespec or timeval.

The final patch drops the now unused v4l2_get_timestamp().

This simplifies the work needed to support Y2038-compatible
timeval/timespec structures. It also ensures consistent
behavior for all media drivers.

Regards,

	Hans

Hans Verkuil (8):
  v4l2-event: keep track of the timestamp in ns
  videobuf: use u64 for the timestamp internally
  meye: use u64 for the timestamp internally
  cpia2: use u64 for the timestamp internally
  stkwebcam: use u64 for the timestamp internally
  usbvision: use u64 for the timestamp internally
  zoran: use u64 for the timestamp internally
  v4l2-common: drop v4l2_get_timestamp

 drivers/media/common/saa7146/saa7146_fops.c   |  2 +-
 drivers/media/pci/bt8xx/bttv-driver.c         |  8 +++-----
 drivers/media/pci/cx18/cx18-mailbox.c         |  2 +-
 drivers/media/pci/meye/meye.c                 |  8 ++++----
 drivers/media/pci/meye/meye.h                 |  2 +-
 drivers/media/platform/davinci/vpfe_capture.c |  2 +-
 drivers/media/platform/fsl-viu.c              |  2 +-
 drivers/media/platform/omap/omap_vout.c       | 12 ++++++------
 drivers/media/usb/cpia2/cpia2.h               |  2 +-
 drivers/media/usb/cpia2/cpia2_usb.c           |  2 +-
 drivers/media/usb/cpia2/cpia2_v4l.c           | 11 +++--------
 drivers/media/usb/cx231xx/cx231xx-417.c       |  4 ++--
 drivers/media/usb/cx231xx/cx231xx-vbi.c       |  2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c     |  2 +-
 drivers/media/usb/stkwebcam/stk-webcam.c      |  2 +-
 drivers/media/usb/tm6000/tm6000-video.c       |  2 +-
 drivers/media/usb/usbvision/usbvision-core.c  |  2 +-
 drivers/media/usb/usbvision/usbvision-video.c |  4 ++--
 drivers/media/usb/usbvision/usbvision.h       |  2 +-
 drivers/media/usb/zr364xx/zr364xx.c           |  4 ++--
 drivers/media/v4l2-core/v4l2-common.c         | 10 ----------
 drivers/media/v4l2-core/v4l2-event.c          | 19 +++++++++----------
 drivers/media/v4l2-core/videobuf-core.c       |  4 ++--
 drivers/staging/media/zoran/zoran.h           |  2 +-
 drivers/staging/media/zoran/zoran_device.c    |  4 ++--
 drivers/staging/media/zoran/zoran_driver.c    |  4 ++--
 include/media/v4l2-common.h                   |  9 ---------
 include/media/v4l2-event.h                    |  2 ++
 include/media/videobuf-core.h                 |  2 +-
 29 files changed, 54 insertions(+), 79 deletions(-)

Comments

Sakari Ailus Feb. 1, 2019, 10:54 a.m. UTC | #1
Hi Hans,

On Mon, Jan 21, 2019 at 02:32:21PM +0100, hverkuil-cisco@xs4all.nl wrote:
> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> This patch series modifies v4l2-event, videobuf and various
> drivers that do not use vb2 or videobuf at all to store the
> event and buffer timestamps internally as a u64 (ktime_get_ns()).
> 
> Only when interfacing with the userspace API are these timestamps
> converted to a timespec or timeval.
> 
> The final patch drops the now unused v4l2_get_timestamp().
> 
> This simplifies the work needed to support Y2038-compatible
> timeval/timespec structures. It also ensures consistent
> behavior for all media drivers.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>