mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
media: omap3isp: support 64-bit version of omap3isp_stat_data
C libraries with 64-bit time_t use an incompatible format for struct omap3isp_stat_data. This changes the kernel code to support either version, by moving over the normal handling to the 64-bit variant, and adding compatiblity code to handle the old binary format with the existing ioctl command code. Fortunately, the command code includes the size of the structure, so the difference gets handled automatically. In the process of eliminating the references to 'struct timeval' from the kernel, I also change the way the timestamp is generated internally, basically by open-coding the v4l2_get_timestamp() call. [Sakari Ailus: Alphabetical order of headers, clean up compat code] Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
daa36370b6
commit
378e3f81cb
6 changed files with 52 additions and 3 deletions
|
@ -55,6 +55,8 @@
|
|||
_IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct omap3isp_h3a_af_config)
|
||||
#define VIDIOC_OMAP3ISP_STAT_REQ \
|
||||
_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data)
|
||||
#define VIDIOC_OMAP3ISP_STAT_REQ_TIME32 \
|
||||
_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data_time32)
|
||||
#define VIDIOC_OMAP3ISP_STAT_EN \
|
||||
_IOWR('V', BASE_VIDIOC_PRIVATE + 7, unsigned long)
|
||||
|
||||
|
@ -165,7 +167,14 @@ struct omap3isp_h3a_aewb_config {
|
|||
* @config_counter: Number of the configuration associated with the data.
|
||||
*/
|
||||
struct omap3isp_stat_data {
|
||||
#ifdef __KERNEL__
|
||||
struct {
|
||||
__s64 tv_sec;
|
||||
__s64 tv_usec;
|
||||
} ts;
|
||||
#else
|
||||
struct timeval ts;
|
||||
#endif
|
||||
void __user *buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
|
@ -173,6 +182,19 @@ struct omap3isp_stat_data {
|
|||
__u16 config_counter;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct omap3isp_stat_data_time32 {
|
||||
struct {
|
||||
__s32 tv_sec;
|
||||
__s32 tv_usec;
|
||||
} ts;
|
||||
__u32 buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Histogram related structs */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue