fuchsia.hardware.display

PROTOCOLS

Provider

Defined in fuchsia.hardware.display/display-controller.fidl

Provider for display controllers.

The driver supports two simultaneous clients - a primary client and a virtcon client.

OpenVirtconController

Open a virtcon client. device should be a handle to one endpoint of a channel that (on success) will become an open connection to a new instance of a display client device. A protocol request controller provides an interface to the Controller for the new device. Closing the connection to device will also close the controller interface. If the display device already has a virtcon controller then this method will return ZX_ERR_ALREADY_BOUND.

Request

NameType
device handle<channel>
controller request<Controller>

Response

NameType
s int32

OpenController

Open a primary client. device should be a handle to one endpoint of a channel that (on success) will become an open connection to a new instance of a display client device. A protocol request controller provides an interface to the Controller for the new device. Closing the connection to device will also close the controller interface. If the display device already has a primary controller then this method will return ZX_ERR_ALREADY_BOUND.

Request

NameType
device handle<channel>
controller request<Controller>

Response

NameType
s int32

Controller

Defined in fuchsia.hardware.display/display-controller.fidl

Interface for accessing the display hardware.

A display configuration can be separated into two parts: the layer layout and the layer contents. The layout includes all parts of a configuration other than the image handles. The active configuration is composed of the most recently applied layout and an active image from each layer - see SetLayerImage for details on how the active image is defined. Note the requirement that each layer has an active image. Whenever a new active configuration is available, it is immediately given to the hardware. This allows the layout and each layer's contents to advance independently when possible.

Performing illegal actions on the interface will result in the interface being closed.

DisplaysChanged

Response

NameType
added vector<Info>
removed vector<uint64>

ImportVmoImage

Request

NameType
image_config ImageConfig
vmo handle<vmo>
offset int32

Response

NameType
res int32
image_id uint64

ImportImage

Request

NameType
image_config ImageConfig
collection_id uint64
index uint32

Response

NameType
res int32
image_id uint64

ReleaseImage

Request

NameType
image_id uint64

ImportEvent

Request

NameType
event handle<event>
id uint64

ReleaseEvent

Request

NameType
id uint64

CreateLayer

Request

NameType

Response

NameType
res int32
layer_id uint64

DestroyLayer

Request

NameType
layer_id uint64

SetDisplayMode

Request

NameType
display_id uint64
mode Mode

SetDisplayColorConversion

Request

NameType
display_id uint64
preoffsets float32[3]
coefficients float32[9]
postoffsets float32[3]

SetDisplayLayers

Request

NameType
display_id uint64
layer_ids vector<uint64>

SetLayerPrimaryConfig

Request

NameType
layer_id uint64
image_config ImageConfig

SetLayerPrimaryPosition

Request

NameType
layer_id uint64
transform Transform
src_frame Frame
dest_frame Frame

SetLayerPrimaryAlpha

Request

NameType
layer_id uint64
mode AlphaMode
val float32

SetLayerCursorConfig

Request

NameType
layer_id uint64
image_config ImageConfig

SetLayerCursorPosition

Request

NameType
layer_id uint64
x int32
y int32

SetLayerColorConfig

Request

NameType
layer_id uint64
pixel_format uint32
color_bytes vector<uint8>

SetLayerImage

Request

NameType
layer_id uint64
image_id uint64
wait_event_id uint64
signal_event_id uint64

CheckConfig

Request

NameType
discard bool

Response

NameType
res ConfigResult
ops vector<ClientCompositionOp>

ApplyConfig

Request

NameType

EnableVsync

Request

NameType
enable bool

Vsync

Response

NameType
display_id uint64
timestamp uint64
images vector<uint64>

SetVirtconMode

Request

NameType
mode uint8

ClientOwnershipChange

Response

NameType
has_ownership bool

ComputeLinearImageStride

Request

NameType
width uint32
pixel_format uint32

Response

NameType
stride uint32

AllocateVmo

Request

NameType
size uint64

Response

NameType
res int32
vmo handle<vmo>?

ImportBufferCollection

Request

NameType
collection_id uint64
collection_token fuchsia.sysmem/BufferCollectionToken

Response

NameType
res int32

ReleaseBufferCollection

Request

NameType
collection_id uint64

SetBufferCollectionConstraints

Request

NameType
collection_id uint64
config ImageConfig

Response

NameType
res int32

GetSingleBufferFramebuffer

Request

NameType

Response

NameType
res int32
vmo handle<vmo>?
stride uint32

ImportImageForCapture

Imports a buffer collection backed VMO into the display controller. The VMO will be used by display controller to capture the image being displayed. Returns ZX_OK along with an image_id. image_id must be used by the client to start capture and/or release resources allocated for capture. Returns ZX_ERR_NOT_SUPPORTED if controller does not support capture

Request

NameType
image_config ImageConfig
collection_id uint64
index uint32

Response

NameType
result Controller_ImportImageForCapture_Result

StartCapture

Starts capture. Client must provide a valid signal_event_id and image_id. signal_event_id must have been imported into the driver using ImportEvent FIDL API. Image_id is the id from ImportImageForCapture. The client will get notified once capture is complete via signal_event_id. Returns ZX_ERR_NOT_SUPPORTED if controller does not support capture

Request

NameType
signal_event_id uint64
image_id uint64

Response

NameType
result Controller_StartCapture_Result

ReleaseCapture

Releases resources allocated for capture. Returns ZX_ERR_NOT_SUPPORTED if controller does not support capture

Request

NameType
image_id uint64

Response

NameType
result Controller_ReleaseCapture_Result

STRUCTS

Controller_ImportImageForCapture_Response

Defined in fuchsia.hardware.display/generated

NameTypeDescriptionDefault
image_id uint64 No default

Controller_StartCapture_Response

Defined in fuchsia.hardware.display/generated

NameTypeDescriptionDefault

Controller_ReleaseCapture_Response

Defined in fuchsia.hardware.display/generated

NameTypeDescriptionDefault

Mode

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
horizontal_resolution uint32 No default
vertical_resolution uint32 No default
refresh_rate_e2 uint32 No default
flags uint32 No default

CursorInfo

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
width uint32 No default
height uint32 No default
pixel_format uint32 No default

Info

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
id uint64 No default
modes vector<Mode> No default
pixel_format vector<uint32> No default
cursor_configs vector<CursorInfo> No default
manufacturer_name string[128] No default
monitor_name string[128] No default
monitor_serial string[128] No default

ImagePlane

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
byte_offset uint32 No default
bytes_per_row uint32 No default

ImageConfig

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
width uint32 No default
height uint32 No default
pixel_format uint32 No default
type uint32 typeSimple
planes [4] No default

Frame

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
x_pos uint32 No default
y_pos uint32 No default
width uint32 No default
height uint32 No default

ClientCompositionOp

Defined in fuchsia.hardware.display/display-controller.fidl

NameTypeDescriptionDefault
display_id uint64 No default
layer_id uint64 No default
opcode ClientCompositionOpcode No default

ENUMS

VirtconMode

Type: uint8

Defined in fuchsia.hardware.display/display-controller.fidl

NameValueDescription
INACTIVE 0
FALLBACK 1
FORCED 2

Transform

Type: uint8

Defined in fuchsia.hardware.display/display-controller.fidl

NameValueDescription
IDENTITY 0
REFLECT_X 1
REFLECT_Y 2
ROT_90 3
ROT_180 4
ROT_270 5
ROT_90_REFLECT_X 6
ROT_90_REFLECT_Y 7

AlphaMode

Type: uint8

Defined in fuchsia.hardware.display/display-controller.fidl

NameValueDescription
DISABLE 0
PREMULTIPLIED 1
HW_MULTIPLY 2

ClientCompositionOpcode

Type: uint8

Defined in fuchsia.hardware.display/display-controller.fidl

NameValueDescription
CLIENT_USE_PRIMARY 0
CLIENT_MERGE_BASE 1
CLIENT_MERGE_SRC 2
CLIENT_FRAME_SCALE 3
CLIENT_SRC_FRAME 4
CLIENT_TRANSFORM 5
CLIENT_COLOR_CONVERSION 6
CLIENT_ALPHA 7

ConfigResult

Type: uint32

Defined in fuchsia.hardware.display/display-controller.fidl

NameValueDescription
OK 0
INVALID_CONFIG 1
UNSUPPORTED_CONFIG 2
TOO_MANY_DISPLAYS 3
UNSUPPORTED_DISPLAY_MODES 4

UNIONS

Controller_ImportImageForCapture_Result

Defined in fuchsia.hardware.display/generated

NameTypeDescription
response Controller_ImportImageForCapture_Response
err int32

Controller_StartCapture_Result

Defined in fuchsia.hardware.display/generated

NameTypeDescription
response Controller_StartCapture_Response
err int32

Controller_ReleaseCapture_Result

Defined in fuchsia.hardware.display/generated

NameTypeDescription
response Controller_ReleaseCapture_Response
err int32

CONSTANTS

NameValueType
invalidId 0 uint64
modeInterlaced 1 int32
identifierMaxLen 128 uint32
typeSimple 0 uint32