Sunxi disp driver interface/IOCTL
Jump to navigation
Jump to search
Framebuffer Engine
IOCTL | Args | Success | Failed | Description |
---|---|---|---|---|
FBIOGET_VSCREENINFO |
|
0 | errno | Get framebuffer var screen information. |
FBIOPUT_VSCREENINFO |
|
0 | errno | Set framebuffer var screen information. |
FBIOGET_FSCREENINFO |
|
0 | errno | Get framebuffer fix screen information. |
FBIOPUTCMAP |
|
0 | errno | Set framebuffer Palette. |
FBIOGETCMAP |
|
0 | errno | Get framebuffer Palette. |
FBIOPAN_DISPLAY |
|
0 | errno | pan display, adjustment var.xoffset, var.yoffset, var.xres, var.yres. |
FBIOBLANK |
|
0 | errno | Currently defined for the framebuffer the corresponding layers switch??? (todo) |
FBIOGET_LAYER_HDL_0 |
|
0 | errno | Get framebuffer handle corresponding layers on the screen 0. |
FBIOGET_LAYER_HDL_1 |
|
0 | errno | Get framebuffer handle corresponding layers on the screen 1. |
Display Engine
Framebuffer IOCTLs
IOCTL | Args | Success | Failed | Description |
---|---|---|---|---|
DISP_CMD_FB_REQUEST |
|
framebuffer handle | errno | Application framebuffer, the framebuffer operation must apply. |
DISP_CMD_FB_RELEASE |
|
0 | errno | Release framebuffer. |
Global IOCTLs
IOCTL | Args | Success | Failed | Description |
---|---|---|---|---|
DISP_CMD_START_CMD_CACHE |
|
0 | errno | Start cache. Behind the IO command will not be executed immediately, but wait until call DISP_CMD_EXECUTE_CMD_AND_STOP_CACHE after execution in conjunction. |
DISP_CMD_EXECUTE_CMD_AND_STOP_CACHE |
|
0 | errno | Execute commands and stop the cache. |
DISP_CMD_SET_BKCOLOR |
|
0 | errno | Set the background colour. |
DISP_CMD_GET_BKCOLOR |
|
0 | errno | Get the background colour. |
DISP_CMD_SET_COLORKEY |
|
0 | errno | Set color key. |
DISP_CMD_GET_COLORKEY |
|
0 | errno | Get color key. |
DISP_CMD_SET_PALETTE_TBL |
|
0 | errno | Set the palette, the total size of the system palette is 256 * 4 byte, and can
be set to any period of continuous regional palette. |
DISP_CMD_GET_PALETTE_TBL |
|
0 | errno | Get palette. |
DISP_CMD_SCN_GET_WIDTH |
|
The width of the screen. | Get the current width of the screen. | |
DISP_CMD_SCN_GET_HEIGHT |
|
The height of the screen. | Get the current height of the screen. | |
DISP_CMD_GET_OUTPUT_TYPE |
|
Output type (__disp_output_type_t) | Get the current output type (LCD,TV,HDMI,VGA,NONE). | |
DISP_CMD_SET_GAMMA_TABLE |
|
0 | errno | Set the gamma correction coefficient table. |
DISP_CMD_GAMMA_CORRECTION_ON |
|
0 | errno | Enable gamma correction. |
DISP_CMD_GAMMA_CORRECTION_OFF |
|
0 | errno | Disable gamma correction. |
DISP_CMD_SET_BRIGHT |
|
0 | errno | Set the brightness of the screen. |
DISP_CMD_GET_BRIGHT |
|
The brightness of the screen. | Get the brightness of the screen. | |
DISP_CMD_SET_CONTRAST |
|
0 | errno | Set the contrast of the screen. |
DISP_CMD_GET_CONTRAST |
|
The contrast of the screen. | Get the contrast of the screen. | |
DISP_CMD_SET_SATURATION |
|
0 | errno | Set screen saturation. |
DISP_CMD_GET_SATURATION |
|
The saturation of the screen. | Get screen saturation. | |
DISP_CMD_SET_HUE (sun4i only) |
|
0 | errno | Set screen hue. |
DISP_CMD_GET_HUE (sun4i only) |
|
screen hue | Get screen hue. | |
DISP_CMD_ENHANCE_ON |
|
0 | errno | Enable screen enhance function. |
DISP_CMD_ENHANCE_OFF |
|
0 | errno | Disable screen enhance function. |
DISP_CMD_GET_ENHANCE_EN |
|
|
Query whether screen enhance function is enabled. | |
DISP_CMD_DE_FLICKER_ON |
|
0 | errno | Enable deflicker function (in the output interlace where used). |
DISP_CMD_DE_FLICKER_OFF |
|
0 | errno | Disable deflicker function. |
Layer IOCTLs
IOCTL | Args | Success | Failed | Description |
---|---|---|---|---|
DISP_CMD_LAYER_REQUEST |
|
layer_handle | NULL | The application layer, the drive will only be allocated to a layer out, did not
make any of the layers set, it is recommended to set this parameter layers call DISP_CMD_LAYER_SET_PARA command immediately after the application layer. |
DISP_CMD_LAYER_RELEASE |
|
0 | errno | The release layer, after the release of the layers, all the layers registers
are cleared to the default of value, so if you want to re-think using the layer must re-apply. |
DISP_CMD_LAYER_OPEN |
|
0 | errno | Open the Layer, that can see the layers. |
DISP_CMD_LAYER_CLOSE |
|
0 | errno | Close layer. |
DISP_CMD_LAYER_SET_FB |
|
0 | errno | Set layer framebuffer, the original source window remains set. |
DISP_CMD_LAYER_GET_FB |
|
0 | errno | Get the layer's framebuffer. |
DISP_CMD_LAYER_SET_SRC_WINDOW |
|
0 | errno | Set the layer's source window |
DISP_CMD_LAYER_GET_SRC_WINDOW |
|
0 | errno | Get the layer's source window. |
DISP_CMD_LAYER_SET_SCN_WINDOW |
|
0 | errno | Set the layer's screen window. |
DISP_CMD_LAYER_GET_SCN_WINDOW |
|
0 | errno | Get the layer's screen window. |
DISP_CMD_LAYER_SET_PARA |
|
0 | errno | Set layer parameters, all the parameters of the layer are set by the command,
in addition to the priority (priority adjustment can only be implemented through DISP_CMD_LAYER_TOP / DISP_CMD_LAYER_BOTTOM). |
DISP_CMD_LAYER_GET_PARA |
|
0 | errno | Get layer parameter. |
DISP_CMD_LAYER_ALPHA_ON |
|
0 | errno | Open layers of global alpha function, that use surface alpha. |
DISP_CMD_LAYER_ALPHA_OFF |
|
0 | errno | Close layers of global alpha function, that use surface alpha. |
DISP_CMD_LAYER_GET_ALPHA_EN |
|
|
Query whether layer has global alpha enabled. | |
DISP_CMD_LAYER_SET_ALPHA_VALUE |
|
0 | errno | Set a layer's global alpha value. |
DISP_CMD_LAYER_GET_ALPHA_VALUE |
|
global alpha value | Get a layer's global alpha value. | |
DISP_CMD_LAYER_CK_ON |
|
0 | errno | Enable color key on a layer. |
DISP_CMD_LAYER_CK_OFF |
|
0 | errno | Disable a layer's color key. |
DISP_CMD_LAYER_GET_CK_EN |
|
|
Query whether layer has color key enabled. | |
DISP_CMD_LAYER_SET_PIPE |
|
0 | errno | Set the layer pipe, a pipe layer can only be high priority coverage low
priority, rather than do alpha blending. |
DISP_CMD_LAYER_GET_PIPE |
|
pipe | Get the pipe associated with the layer. | |
DISP_CMD_LAYER_TOP |
|
0 | errno | Set top layer, the relative relationship between the other layers priority remains unchanged. |
DISP_CMD_LAYER_BOTTOM |
|
0 | errno | Set bottom layer, the relative relationship between the other layers priority remains unchanged. |
DISP_CMD_LAYER_GET_PRIO |
|
priority | Get priority layers (layers from the bottom to the top priority from low to high). | |
DISP_CMD_LAYER_SET_SMOOTH |
|
0 | errno | Set the layer of smooth (the layer must scaler layers). |
DISP_CMD_LAYER_GET_SMOOTH |
|
smooth (__disp_video_smooth_t) | Get the layers smooth (the layer must scaler layer). | |
DISP_CMD_LAYER_SET_BRIGHT |
|
0 | errno | Set the brightness of the scaler layer. |
DISP_CMD_LAYER_GET_BRIGHT |
|
brightness level | Get scaler layers brightness. | |
DISP_CMD_LAYER_SET_CONTRAST |
|
0 | errno | Set scaler layer's contrast. |
DISP_CMD_LAYER_GET_CONTRAST |
|
0 | errno | Get scaler layers contrast. |
DISP_CMD_LAYER_SET_SATURATION |
|
0 | errno | Set scaler layers saturation |
DISP_CMD_LAYER_GET_SATURATION |
|
0 | errno | Set the layer of smooth (the layer must scaler layers). |
DISP_CMD_LAYER_SET_HUE |
|
0 | errno | Set scaler layers tone/hue. |
DISP_CMD_LAYER_GET_HUE |
|
tone/hue value | Get scaler layers tone/hue. | |
DISP_CMD_LAYER_ENHANCE_ON |
|
0 | errno | Enable scaler layers enhance function. |
DISP_CMD_LAYER_ENHANCE_OFF |
|
0 | errno | Disable scaler layers enhance function. |
DISP_CMD_LAYER_GET_ENHANCE_EN |
|
|
Query whether a scaler layers enhance function is enabled. | |
DISP_CMD_LAYER_VPP_ON |
|
0 | errno | Enable video post-processing functions (only for scaler layers). |
DISP_CMD_LAYER_VPP_OFF |
|
0 | errno | Disable video post-processing functions. |
DISP_CMD_LAYER_GET_VPP_EN |
|
|
Query whether a layers vpp function is enabled. | |
DISP_CMD_LAYER_SET_LUMA_SHARP_LEVEL |
|
0 | errno | Set luminance sharpening level. |
DISP_CMD_LAYER_GET_LUMA_SHARP_LEVEL |
|
Luminance sharpening level | Get luminance sharpening level. | |
DISP_CMD_LAYER_SET_CHROMA_SHARP_LEVEL |
|
0 | errno | Set hue sharpening level. |
DISP_CMD_LAYER_GET_CHROMA_SHARP_LEVEL |
|
hue sharpening level | Get hue sharpening level. | |
DISP_CMD_LAYER_SET_WHITE_EXTEN_LEVEL |
|
0 | errno | Set white level expansion value. |
DISP_CMD_LAYER_GET_WHITE_EXTEN_LEVEL |
|
white level expansion value | Get white level expansion value. | |
DISP_CMD_LAYER_SET_BLACK_EXTEN_LEVEL |
|
0 | errno | Set black level expansion value. |
DISP_CMD_LAYER_GET_BLACK_EXTEN_LEVEL |
|
black level expansion value | Get black level expansion value. |
Scaler IOCTLs
IOCTL | Args | Success | Failed | Description |
---|---|---|---|---|
DISP_CMD_SCALER_REQUEST |
|
scaler handle | NULL | Application scaler is used to write-back. |
DISP_CMD_SCALER_RELEASE |
|
0 | errno | Release scaler. |
DISP_CMD_SCALER_EXECUTE |
|
0 | errno | Perform scaler. |
HWC IOCTLs
DISP_CMD_HWC_OPEN |
|
0 | errno | Open hw cursor. |
DISP_CMD_HWC_CLOSE |
|
0 | errno | Close hw cursor. |
DISP_CMD_HWC_SET_POS |
|
0 | errno | Set starting coordinates of the hw cursor on the screen. |
DISP_CMD_HWC_GET_POS |
|
0 | errno | Get starting coordinates of the hw cursor on the screen. |
DISP_CMD_HWC_SET_FB |
|
0 | errno | Set hw cursor framebuffer information. |
DISP_CMD_HWC_SET_PALETTE_TABLE |
|
0 | errno | Set palette table for hw cursor. |
Video IOCTLs
DISP_CMD_VIDEO_START |
|
0 | errno | Start video playback. |
DISP_CMD_VIDEO_STOP |
|
0 | errno | Stop video playback. |
DISP_CMD_VIDEO_SET_FB |
|
0 | errno | Set video framebuffer information. |
DISP_CMD_VIDEO_GET_DIT_INFO |
|
deinterlace information | The deinterlace information for video display. | |
DISP_CMD_VIDEO_GET_FRAME_ID |
|
framebuffer id | errno | Get currently being displayed framebuffer id. |
LCD IOCTLs
DISP_CMD_LCD_ON |
|
0 | errno | Enable LCD. |
DISP_CMD_LCD_OFF |
|
0 | errno | Disable LCD. |
DISP_CMD_LCD_SET_BRIGHTNESS |
|
0 | errno | Set LCD brightness. |
DISP_CMD_LCD_GET_BRIGHTNESS |
|
LCD brightness (__disp_lcd_bright_t) | Get LCD brightness. | |
DISP_CMD_LCD_SET_SRC |
|
0 | errno | Set source for LCD. |
TV IOCTLs
DISP_CMD_TV_ON |
|
0 | errno | Enable TV display. |
DISP_CMD_TV_OFF |
|
0 | errno | Disable TV display. |
DISP_CMD_TV_SET_MODE |
|
0 | errno | Set the mode on the TV display. |
DISP_CMD_TV_GET_MODE |
|
mode (__disp_tv_mode_t) | Get current TV mode. | |
DISP_CMD_TV_GET_INTERFACE |
|
interface (disp_tv_output_t) | errno | Get TV interface. |
DISP_CMD_TV_SET_SRC |
|
0 | errno | Set TV source. |
HDMI IOCTLs
DISP_CMD_HDMI_ON |
|
0 | errno | Enable HDMI display. |
DISP_CMD_HDMI_OFF |
|
0 | errno | Disable HDMI display. |
DISP_CMD_HDMI_SET_MODE |
|
0 | errno | Set HDMI mode. |
DISP_CMD_HDMI_GET_MODE |
|
mode (__disp_tv_mode_t) | Get current HDMI mode. | |
DISP_CMD_HDMI_SUPPORT_MODE |
|
|
Query whether a mode is supported on hdmi. | |
DISP_CMD_HDMI_GET_HPD_STATUS |
|
|
Query the current hdmi hpd status. | |
DISP_CMD_HDMI_SET_SRC |
|
0 | errno | Set hdmi source. |
VGA IOCTLs
DISP_CMD_VGA_ON |
|
0 | errno | Enable VGA display. |
DISP_CMD_VGA_OFF |
|
0 | errno | Disable VGA display. |
DISP_CMD_VGA_SET_MODE |
|
0 | errno | Set VGA mode. |
DISP_CMD_VGA_GET_MODE |
|
mode (__disp_vga_mode_t) | Get current VGA mode. | |
DISP_CMD_VGA_SET_SRC |
|
0 | errno | Set source of vga display. |
Sprite IOCTLs
DISP_CMD_SPRITE_OPEN |
|
0 | errno | Global switch to open the sprite, sprite, each the sprite block of switch can be set. |
DISP_CMD_SPRITE_CLOSE |
|
0 | errno | Close sprite. |
DISP_CMD_SPRITE_SET_FORMAT |
|
0 | errno | Set the format of the sprite Note only sprite block format is the same, so the format is valid for all block, each block can no longer separate set its format. |
DISP_CMD_SPRITE_GLOBAL_ALPHA_ENABLE |
|
0 | errno | Enable global alpha on sprite. |
DISP_CMD_SPRITE_GLOBAL_ALPHA_DISABLE |
|
0 | errno | Disable global alpha on sprite. |
DISP_CMD_SPRITE_GET_GLOBAL_ALPHA_ENABLE |
|
|
Query the current state of global alpha on the sprite. | |
DISP_CMD_SPRITE_SET_GLOBAL_ALPHA_VALUE |
|
0 | errno | Set the value of global alpha on the sprite. |
DISP_CMD_SPRITE_GET_GLOBAL_ALPHA_VALUE |
|
global alpha value | Get the value of global alpha on the sprite. | |
DISP_CMD_SPRITE_SET_ORDER |
|
0 | errno | A block to the front of the target block. |
DISP_CMD_SPRITE_GET_TOP_BLOCK |
|
block handle | Get the handle of the top block. | |
DISP_CMD_SPRITE_GET_BOTTOM_BLOCK |
|
block handle | Get the handle of the bottom block. | |
DISP_CMD_SPRITE_SET_PALETTE_TBL |
|
0 | errno | Set sprite palette table. |
DISP_CMD_SPRITE_GET_BLOCK_NUM |
|
Number of blocks used. | Get the number of blocks in use. | |
DISP_CMD_SPRITE_BLOCK_REQUEST |
|
0 | errno | Request a sprite block. |
DISP_CMD_SPRITE_BLOCK_RELEASE |
|
0 | errno | Release a sprite block. |
DISP_CMD_SPRITE_BLOCK_OPEN |
|
0 | errno | Open a sprite block. |
DISP_CMD_SPRITE_BLOCK_CLOSE |
|
0 | errno | Close a sprite block. |
DISP_CMD_SPRITE_BLOCK_SET_SOURCE_WINDOW |
|
0 | errno | Set the sprite block the source window, because the sprite block without
scaling function, driven only concerned with x and y, while the width and height of the width and height of the screen window. |
DISP_CMD_SPRITE_BLOCK_GET_SOURCE_WINDOW |
|
0 | errno | Get the source window of a sprite block. |
DISP_CMD_SPRITE_BLOCK_SET_SCREEN_WINDOW |
|
0 | errno | Set screen window of a sprite block. |
DISP_CMD_SPRITE_BLOCK_GET_SCREEN_WINDOW |
|
0 | errno | Get screen window of a sprite block. |
DISP_CMD_SPRITE_BLOCK_SET_FB |
|
0 | errno | Set the framebuffer information for the sprite block, only cares about the
address and line width. |
DISP_CMD_SPRITE_BLOCK_GET_FB |
|
0 | errno | Get framebuffer information of a sprite block. |
DISP_CMD_SPRITE_BLOCK_SET_PARA |
|
0 | errno | Set sprite block parameters. |
DISP_CMD_SPRITE_BLOCK_GET_PARA |
|
0 | errno | Get sprite block parameters |
DISP_CMD_SPRITE_BLOCK_SET_TOP |
|
0 | errno | Move the sprite block to the top. |
DISP_CMD_SPRITE_BLOCK_SET_BOTTOM |
|
0 | errno | Move the sprite block to the bottom. |
DISP_CMD_SPRITE_BLOCK_GET_PREV_BLOCK |
|
block handle | Get the previous sprite block handle. | |
DISP_CMD_SPRITE_BLOCK_GET_NEXT_BLOCK |
|
block handle | errno | Get the next block handle. |
DISP_CMD_SPRITE_BLOCK_GET_PRIO |
|
block priority | Get the ordering of the sprite block (from bottom to top). |