Sunxi disp driver interface

The allwinner provided sunxi disp driver has many severe issues and needs to be significantly redesigned. Since the allwinner engineers decided to directly use numbers for ioctls, instead of using the _IO macros, there is no way around redefining all of them to begin with. We will try to keep the current interface stable for as long as possible, and make the future break or breaks as abrupt and complete as possible. But:

The /dev/disp interface will break and will in the end vanish completely!

First!
The disp ioctl header file has been cleaned up and some versioning has been added. Be sure to get the correct header file from the kernel source (LINK!).

In Documentation/video/sunxi/ there is disp_version.c which gives a good example of how to easily support the new and mandatory versioning ioctl.

Current users
Below is a list of the current users of the disp interface, where the repository for this code is, and how the responsible author can notified of breakage.

Stable IOCTLs
The following IOCTLs and their structures are known to be in active use as they were flagged to us by the programs listed in the previous section. We will try to do our utmost best to keep these IOCTLs stable. All other ioctls are a bit of a free-for-all, and will not be checked for.


 * DISP_CMD_EXECUTE_CMD_AND_STOP_CACHE
 * DISP_CMD_FB_RELEASE
 * DISP_CMD_FB_REQUEST
 * DISP_CMD_GET_OUTPUT_TYPE
 * DISP_CMD_HDMI_GET_HPD_STATUS
 * DISP_CMD_HDMI_GET_MODE
 * DISP_CMD_HDMI_OFF
 * DISP_CMD_HDMI_ON
 * DISP_CMD_HDMI_SET_MODE
 * DISP_CMD_HDMI_SUPPORT_MODE
 * DISP_CMD_LAYER_ALPHA_OFF
 * DISP_CMD_LAYER_ALPHA_ON
 * DISP_CMD_LAYER_BOTTOM
 * DISP_CMD_LAYER_CK_OFF
 * DISP_CMD_LAYER_CK_ON
 * DISP_CMD_LAYER_CLOSE
 * DISP_CMD_LAYER_GET_BLACK_EXTEN_LEVEL
 * DISP_CMD_LAYER_GET_CHROMA_SHARP_LEVEL
 * DISP_CMD_LAYER_GET_LUMA_SHARP_LEVEL
 * DISP_CMD_LAYER_GET_PARA
 * DISP_CMD_LAYER_GET_VPP_EN
 * DISP_CMD_LAYER_GET_WHITE_EXTEN_LEVEL
 * DISP_CMD_LAYER_OPEN
 * DISP_CMD_LAYER_RELEASE
 * DISP_CMD_LAYER_REQUEST
 * DISP_CMD_LAYER_SET_ALPHA_VALUE
 * DISP_CMD_LAYER_SET_BLACK_EXTEN_LEVEL
 * DISP_CMD_LAYER_SET_CHROMA_SHARP_LEVEL
 * DISP_CMD_LAYER_SET_LUMA_SHARP_LEVEL
 * DISP_CMD_LAYER_SET_PARA
 * DISP_CMD_LAYER_SET_PIPE
 * DISP_CMD_LAYER_SET_SCN_WINDOW
 * DISP_CMD_LAYER_SET_WHITE_EXTEN_LEVEL
 * DISP_CMD_LAYER_TOP
 * DISP_CMD_LAYER_VPP_OFF
 * DISP_CMD_LAYER_VPP_ON
 * DISP_CMD_LCD_OFF
 * DISP_CMD_LCD_ON
 * DISP_CMD_SCN_GET_HEIGHT
 * DISP_CMD_SCN_GET_WIDTH
 * DISP_CMD_SET_COLORKEY
 * DISP_CMD_START_CMD_CACHE
 * DISP_CMD_VIDEO_GET_FRAME_ID
 * DISP_CMD_VIDEO_SET_FB
 * DISP_CMD_VIDEO_START
 * DISP_CMD_VIDEO_STOP