The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/video_if.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $OpenBSD: video_if.h,v 1.19 2022/03/21 19:22:40 miod Exp $      */
    2 /*
    3  * Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
    4  * Copyright (c) 2008 Marcus Glocker <mglocker@openbsd.org>
    5  *
    6  * Permission to use, copy, modify, and distribute this software for any
    7  * purpose with or without fee is hereby granted, provided that the above
    8  * copyright notice and this permission notice appear in all copies.
    9  *
   10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   17  */
   18 
   19 #ifndef _SYS_DEV_VIDEO_IF_H
   20 #define _SYS_DEV_VIDEO_IF_H
   21 
   22 /*
   23  * Generic interface to hardware driver
   24  */
   25 
   26 #define VIDEOUNIT(x)    (minor(x))
   27 
   28 struct video_hw_if {
   29         /* open hardware */
   30         int     (*open)(void *, int, int *, uint8_t *, void (*)(void *),
   31                     void *);
   32 
   33         /* close hardware */
   34         int     (*close)(void *);
   35 
   36         /* ioctl's */
   37         int     (*querycap)(void *, struct v4l2_capability *);
   38         int     (*enum_fmt)(void *, struct v4l2_fmtdesc *);
   39         int     (*enum_fsizes)(void *, struct v4l2_frmsizeenum *);
   40         int     (*enum_fivals)(void *, struct v4l2_frmivalenum *);
   41         int     (*s_fmt)(void *, struct v4l2_format *);
   42         int     (*g_fmt)(void *, struct v4l2_format *);
   43         int     (*s_parm)(void *, struct v4l2_streamparm *);
   44         int     (*g_parm)(void *, struct v4l2_streamparm *);
   45         int     (*enum_input)(void *, struct v4l2_input *);
   46         int     (*s_input)(void *, int);
   47         int     (*g_input)(void *, int *);
   48         int     (*reqbufs)(void *, struct v4l2_requestbuffers *);
   49         int     (*querybuf)(void *, struct v4l2_buffer *);
   50         int     (*qbuf)(void *, struct v4l2_buffer *);
   51         int     (*dqbuf)(void *, struct v4l2_buffer *);
   52         int     (*streamon)(void *, int);
   53         int     (*streamoff)(void *, int);
   54         int     (*try_fmt)(void *, struct v4l2_format *);
   55         int     (*queryctrl)(void *, struct v4l2_queryctrl *);
   56         int     (*g_ctrl)(void *, struct v4l2_control *);
   57         int     (*s_ctrl)(void *, struct v4l2_control *);
   58         caddr_t (*mappage)(void *, off_t, int);
   59 
   60         /* other functions */
   61         int     (*get_bufsize)(void *);
   62         int     (*start_read)(void *);
   63 };
   64 
   65 struct video_attach_args {
   66         const void *hwif;
   67         void    *hdl;
   68 };
   69 
   70 struct device  *video_attach_mi(const struct video_hw_if *, void *,
   71             struct device *);
   72 
   73 #endif /* _SYS_DEV_VIDEO_IF_H */

Cache object: 35760a2b7fd9364a5a11cece34ef63c3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.