FBIOPUT_VSCREENINFO

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Functions

Sets the variable information about the Framebuffer screen, including the resolution and pixel format.

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

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 display buffer of the current graphics layer. For details about the maximum and minimum resolution 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.