Merge branch 'torvalds/master'
[firefly-linux-kernel-4.4.55.git] / include / media / davinci / vpbe_display.h
index 8dffffedbb590ecaf7a5454fad2d84d21a557ebb..e14a9370b67e0fc713d0823b2230935f37982094 100644 (file)
@@ -16,6 +16,8 @@
 /* Header files */
 #include <linux/videodev2.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-fh.h>
+#include <media/videobuf2-v4l2.h>
 #include <media/videobuf2-dma-contig.h>
 #include <media/davinci/vpbe_types.h>
 #include <media/davinci/vpbe_osd.h>
@@ -63,14 +65,12 @@ struct display_layer_info {
 };
 
 struct vpbe_disp_buffer {
-       struct vb2_buffer vb;
+       struct vb2_v4l2_buffer vb;
        struct list_head list;
 };
 
 /* vpbe display object structure */
 struct vpbe_layer {
-       /* number of buffers in fbuffers */
-       unsigned int numbuffers;
        /* Pointer to the vpbe_display */
        struct vpbe_display *disp_dev;
        /* Pointer pointing to current v4l2_buffer */
@@ -90,12 +90,6 @@ struct vpbe_layer {
        /* V4l2 specific parameters */
        /* Identifies video device for this layer */
        struct video_device video_dev;
-       /* This field keeps track of type of buffer exchange mechanism user
-        * has selected
-        */
-       enum v4l2_memory memory;
-       /* Used to keep track of state of the priority */
-       struct v4l2_prio_state prio;
        /* Used to store pixel format */
        struct v4l2_pix_format pix_fmt;
        enum v4l2_field buf_field;
@@ -107,12 +101,8 @@ struct vpbe_layer {
        unsigned char window_enable;
        /* number of open instances of the layer */
        unsigned int usrs;
-       /* number of users performing IO */
-       unsigned int io_usrs;
        /* Indicates id of the field which is being displayed */
        unsigned int field_id;
-       /* Indicates whether streaming started */
-       unsigned char started;
        /* Identifies device object */
        enum vpbe_display_device_id device_id;
        /* facilitation of ioctl ops lock by v4l2*/
@@ -132,18 +122,6 @@ struct vpbe_display {
        struct osd_state *osd_device;
 };
 
-/* File handle structure */
-struct vpbe_fh {
-       /* vpbe device structure */
-       struct vpbe_display *disp_dev;
-       /* pointer to layer object for opened device */
-       struct vpbe_layer *layer;
-       /* Indicates whether this file handle is doing IO */
-       unsigned char io_allowed;
-       /* Used to keep track priority of this instance */
-       enum v4l2_priority prio;
-};
-
 struct buf_config_params {
        unsigned char min_numbuffers;
        unsigned char numbuffers[VPBE_DISPLAY_MAX_DEVICES];