FBIOPUT_VSCREENINFO
The
The
Description
Sets the variable information about the Framebuffer screen, including the resolution and pixel format.
Restrictions
- The sum of the visible screen width (xres) and width offset (xoffset) cannot exceed the virtual resolution width (xres_virtual). The same rule applies to yres.
- The virtual resolution must be within the range restricted by the display buffer of the current graphics layer. (For details about the maximum and minimum resolutions and display buffer of each graphics layer, see Table 1.) The formula for calculating the display buffer required by the virtual resolution is as follows:

- Ensure that the sum of the actual resolution and offset is within the virtual resolution range. Otherwise, the system automatically adjusts the actual resolution to fit the virtual resolution range.
- Before using the HiFB API, you need to call hi_mpi_vo_enable to enable the VO device.
- This API does not support multiple processes or multiple threads.
Prototype
int ioctl (int fd, FBIOPUT_VSCREENINFO, fb_var_screeninfo *var)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
fd |
Input |
File descriptor of an FB device. When open("/dev/fbx") is called in the application, the file descriptor of the FB device corresponding to the current VO device is returned. |
|
FBIOPUT_VSCREENINFO |
Input |
ioctl number. |
|
var |
Input |
Pointer to the variable information structure. |
Returns
- 0: success
- Other values: failure
Parent topic: HiFB for Managing Overlaid Graphics Layers