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 zx/status

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 zx/status

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 zx/status
image_id uint64

ImportImage

Request

NameType
image_config ImageConfig
collection_id uint64
index uint32

Response

NameType
res zx/status
image_id uint64

ReleaseImage

Request

NameType
image_id uint64

ImportEvent

Imports an event into the driver and associates it with the given id.

It is illegal for id to be equal to invalidId, and it is undefined to import one event with two different ids or to import two different events with the same id (note that ids map well to koids).

If a client is reusing events, they must clear the signal before referencing the id again.

Request

NameType
event handle<event>
id uint64

ReleaseEvent

Releases the event imported with the given id.

If any images are currently using the given event, the event will still be waited up or signaled as appropriate before its resources are released. It is an error to reuse an ID while the active config has references to it.

Request

NameType
id uint64

CreateLayer

Request

NameType

Response

NameType
res zx/status
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

ImportBufferCollection

Request

NameType
collection_id uint64
collection_token fuchsia.sysmem/BufferCollectionToken

Response

NameType
res zx/status

ReleaseBufferCollection

Request

NameType
collection_id uint64

SetBufferCollectionConstraints

Request

NameType
collection_id uint64
config ImageConfig

Response

NameType
res zx/status

GetSingleBufferFramebuffer

Request

NameType

Response

NameType
res zx/status
vmo handle<vmo>?
stride uint32

IsCaptureSupported

Returns true if Capture is supported on the platform.

Request

NameType

Response

NameType
result Controller_IsCaptureSupported_Result

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_IsCaptureSupported_Response

generated

NameTypeDescriptionDefault
supported bool No default

Controller_ImportImageForCapture_Response

generated

NameTypeDescriptionDefault
image_id uint64 No default

Controller_StartCapture_Response

generated

NameTypeDescriptionDefault

Controller_ReleaseCapture_Response

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_IsCaptureSupported_Result

generated

NameTypeDescription
response Controller_IsCaptureSupported_Response
err zx/status

Controller_ImportImageForCapture_Result

generated

NameTypeDescription
response Controller_ImportImageForCapture_Response
err zx/status

Controller_StartCapture_Result

generated

NameTypeDescription
response Controller_StartCapture_Response
err zx/status

Controller_ReleaseCapture_Result

generated

NameTypeDescription
response Controller_ReleaseCapture_Response
err zx/status

CONSTANTS

NameValueTypeDescription
invalidId 0 uint64
modeInterlaced 1 int32
identifierMaxLen 128 uint32
typeSimple 0 uint32
typeCapture 10 uint32