--- zzzz-none-000/linux-3.10.107/drivers/media/platform/davinci/vpif_display.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/platform/davinci/vpif_display.h 2021-02-04 17:41:59.000000000 +0000 @@ -13,15 +13,12 @@ * GNU General Public License for more details. */ -#ifndef DAVINCIHD_DISPLAY_H -#define DAVINCIHD_DISPLAY_H +#ifndef VPIF_DISPLAY_H +#define VPIF_DISPLAY_H /* Header files */ -#include -#include -#include #include -#include +#include #include "vpif.h" @@ -65,22 +62,15 @@ }; struct vpif_disp_buffer { - struct vb2_buffer vb; + struct vb2_v4l2_buffer vb; struct list_head list; }; struct common_obj { - /* Buffer specific parameters */ - u8 *fbuffers[VIDEO_MAX_FRAME]; /* List of buffer pointers for - * storing frames */ - u32 numbuffers; /* number of buffers */ struct vpif_disp_buffer *cur_frm; /* Pointer pointing to current * vb2_buffer */ struct vpif_disp_buffer *next_frm; /* Pointer pointing to next * vb2_buffer */ - enum v4l2_memory memory; /* This field keeps track of - * type of buffer exchange - * method user has selected */ struct v4l2_format fmt; /* Used to store the format */ struct vb2_queue buffer_queue; /* Buffer queue used in * video-buf */ @@ -93,10 +83,6 @@ /* channel specific parameters */ struct mutex lock; /* lock used to access this * structure */ - u32 io_usrs; /* number of users performing - * IO */ - u8 started; /* Indicates whether streaming - * started */ u32 ytop_off; /* offset of Y top from the * starting of the buffer */ u32 ybtm_off; /* offset of Y bottom from the @@ -106,7 +92,7 @@ u32 cbtm_off; /* offset of C bottom from the * starting of the buffer */ /* Function pointer to set the addresses */ - void (*set_addr) (unsigned long, unsigned long, + void (*set_addr)(unsigned long, unsigned long, unsigned long, unsigned long); u32 height; u32 width; @@ -114,12 +100,8 @@ struct channel_obj { /* V4l2 specific parameters */ - struct video_device *video_dev; /* Identifies video device for + struct video_device video_dev; /* Identifies video device for * this channel */ - struct v4l2_prio_state prio; /* Used to keep track of state of - * the priority */ - atomic_t usrs; /* number of open instances of - * the channel */ u32 field_id; /* Indicates id of the field * which is being displayed */ u8 initialized; /* flag to indicate whether @@ -133,33 +115,13 @@ struct video_obj video; }; -/* File handle structure */ -struct vpif_fh { - struct channel_obj *channel; /* pointer to channel object for - * opened device */ - u8 io_allowed[VPIF_NUMOBJECTS]; /* Indicates whether this file handle - * is doing IO */ - enum v4l2_priority prio; /* Used to keep track priority of - * this instance */ - u8 initialized; /* Used to keep track of whether this - * file handle has initialized - * channel or not */ -}; - /* vpif device structure */ struct vpif_device { struct v4l2_device v4l2_dev; struct channel_obj *dev[VPIF_DISPLAY_NUM_CHANNELS]; struct v4l2_subdev **sd; - -}; - -struct vpif_config_params { - u32 min_bufsize[VPIF_DISPLAY_NUM_CHANNELS]; - u32 channel_bufsize[VPIF_DISPLAY_NUM_CHANNELS]; - u8 numbuffers[VPIF_DISPLAY_NUM_CHANNELS]; - u32 video_limit[VPIF_DISPLAY_NUM_CHANNELS]; - u8 min_numbuffers; + struct v4l2_async_notifier notifier; + struct vpif_display_config *config; }; -#endif /* DAVINCIHD_DISPLAY_H */ +#endif /* VPIF_DISPLAY_H */