freebsd-skq/sys/compat/linux
netchild 7cde5eb62d Whitespace change to be able to provide the correct commit log for r202364:
---snip---
Add video clipping support but with the caveats below.

Background info:

Video clipping allows the user to provide either a series of clip rectangles
or a clip bitmap to the driver and have the driver mask the video according
to the clipping specs provided.

Adding support for clipping to the FreeBSD Linux emulator is problematic
because it seems that this feature is not supported by many drivers and
therefore it is ignored by many applications. Unfortunately, when not
using it, rather than passing in a null clipping list, some apps leave the
clipping fields uninitialized, casuing random values to be passed in. In
the case where the driver does not use the clipping info, this is not a
problem (although it is bad form). But the Linux emulator does not know
which drivers will use this and which won't, so the Linux emulator must
try to handle this clip list, and deal gracefully with cases where the
values seem to be uninitialized.

Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields
in the video_window structure: the integer clipcount and the pointer clips.

How the linuxulator handles this from this commit on:

    * if (clipcount == VIDEO_CLIP_BITMAP)
      The clips variable is a void * pointer to a 128*625 byte
      (1024*625 bit) memory area containing a bitmap of the clipping area.
      The pointer in the video_window structure is copied, but no
      video_clip structures are copied.
    * if (clipcount > 0 && clipcount <= 16384)
      The clips variable is pointer to a list of video_clip structures. Up
      to clipcount structures are copied and passed to the driver.
      The upper limit of 16384 was imposed here so that user code that does
      not properly initialize clipcount falls through below and no attempt
      is made to copy an uninitialized list. This value was found by
      examining Linux drivers that support the clip list.
    * else
      The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or
      positive (> 16384).
      All these cases are treated as invalid data. Both the clipcount field
      and clips pointer are forced to zero/NULL and passed to the driver.

It should be noted that, at the time of developing this V4L emulator code,
the pwc(4) V4L driver does not support clipping.

Submitted by:	J.R. Oldroyd <fbsd@opal.com>
MFC after:	1 month
---snip---
2010-01-15 15:38:31 +00:00
..
linux_emul.c Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_emul.h Remove support for FUTEX_REQUEUE operation. 2009-04-19 13:48:42 +00:00
linux_file.c Background: 2010-01-11 20:44:05 +00:00
linux_file.h Implement the linux syscalls 2008-04-08 09:45:49 +00:00
linux_futex.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
linux_futex.h Move extern variable definitions to the header file. 2009-05-02 10:06:49 +00:00
linux_getcwd.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
linux_ioctl.c Whitespace change to be able to provide the correct commit log for r202364: 2010-01-15 15:38:31 +00:00
linux_ioctl.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
linux_ipc.c Fix typo in kernel message. The fix is based upon the patch in the PR. 2009-11-05 07:37:48 +00:00
linux_ipc.h MFP4 (110956): 2006-12-21 13:11:06 +00:00
linux_mib.c Some jail parameters (in particular, "ip4" and "ip6" for IP address 2009-07-25 14:48:57 +00:00
linux_mib.h Do not export AT_CLKTCK when emulating Linux kernel prior 2009-05-10 18:43:43 +00:00
linux_misc.c Since all other comparisons involving ngroups_max use 2010-01-15 07:05:00 +00:00
linux_misc.h Rework r189362, r191883. 2009-05-10 18:16:07 +00:00
linux_signal.c Signal 0 is used to check the permission for current process to signal 2009-12-18 14:27:18 +00:00
linux_signal.h Correctly fill siginfo for the signals delivered by linux tkill/tgkill. 2008-10-19 10:02:26 +00:00
linux_socket.c Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets 2009-10-25 09:58:56 +00:00
linux_socket.h Implement MSG_CMSG_CLOEXEC flag for linux_recvmsg(). 2009-05-18 04:07:46 +00:00
linux_stats.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
linux_sysctl.c Unbreak COMPAT_LINUX32 option support on amd64. 2006-03-19 11:10:33 +00:00
linux_sysproto.h
linux_time.c MFP4: 109655 2006-12-20 20:17:35 +00:00
linux_uid16.c Since all other comparisons involving ngroups_max use 2010-01-15 07:05:00 +00:00
linux_util.c Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
linux_util.h Add preliminary KTR(9) support to the linux emulation layer. 2009-05-07 10:01:05 +00:00
linux_videodev_compat.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00
linux_videodev.h This is v4l support for the linuxulator. This allows to access FreeBSD 2009-12-04 21:06:54 +00:00