FBIOGET_VSCREENINFO

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

☓

Atlas A3 training products/Atlas A3 inference products

☓

Atlas A2 training products/Atlas A2 inference products

☓

Atlas 200I/500 A2 inference products

√

Atlas inference products

☓

Atlas training products

☓

Function

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

Prototype

int ioctl (int fd, FBIOGET_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 Framebuffer corresponding to the current VO device is returned.

FBIOGET_VSCREENINFO

Input

ioctl number.

var

Output

Pointer to the variable information structure.

Returns

  • 0: success
  • Other values: failure. The error code of the Linux kernel is returned. For details, click here.

Restrictions

  • The default resolution of the HD graphics layer is 1920 × 1080, the default resolution of the cursor layer is 256 × 256, the default resolution of the SD graphics layer is 720 × 576, and the default pixel format is ARGB8888.
  • 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.