PROTOCOLS
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.
AcknowledgeVsync
Request
ApplyConfig
Request
CheckConfig
Request
Response
CreateLayer
Request
Response
DestroyLayer
Request
EnableVsync
Request
GetSingleBufferFramebuffer
Request
Response
Name | Type |
res |
zx/status
|
vmo |
handle<vmo>?
|
stride |
uint32
|
ImportBufferCollection
Request
Response
ImportEvent
Imports an event into the driver and associates it with the given id.
It is illegal for id to be equal to INVALID_DISP_ID, 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
Name | Type |
event |
handle<event>
|
id |
uint64
|
ImportGammaTable
Import a gamma table for display calibration.
Each array is a quantized representation of the gamma curve for a single
color channel. An input luminance in [0.0, 1.0] is mapped to an index
between 0-255, and the value in the array is used as the output
luminance. Rounding behavior is hardware-specific, and most often it
will floor(input * 255.0), requiring an input luminance of 1.0 to get
the max output luminance.
It is an error to use output luminances outside of [0.0, 1.0]. Hardware
drivers may either clamp such values or disconnect a client that
provides invalid tables.
Request
Name | Type |
gamma_table_id |
uint64
|
r |
float32[256]
|
g |
float32[256]
|
b |
float32[256]
|
ImportImage
Request
Name | Type |
image_config |
ImageConfig
|
collection_id |
uint64
|
index |
uint32
|
Response
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
Name | Type |
image_config |
ImageConfig
|
collection_id |
uint64
|
index |
uint32
|
Response
ImportVmoImage
Request
Name | Type |
image_config |
ImageConfig
|
vmo |
handle<vmo>
|
offset |
int32
|
Response
IsCaptureSupported
Returns true if Capture is supported on the platform.
Request
Response
OnClientOwnershipChange
Response
Name | Type |
has_ownership |
bool
|
OnDisplaysChanged
Response
Name | Type |
added |
vector<Info>
|
removed |
vector<uint64>
|
OnVsync
Response
Name | Type |
display_id |
uint64
|
timestamp |
uint64
|
images |
vector<uint64>
|
cookie |
uint64
|
ReleaseBufferCollection
Request
Name | Type |
collection_id |
uint64
|
ReleaseCapture
Releases resources allocated for capture.
Returns ZX_ERR_NOT_SUPPORTED if controller does not support capture
Request
Response
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
ReleaseGammaTable
Release an imported gamma table.
Subsequent calls to SetDisplayGammaTable cannot reference this
table. It is legal to re-use the gamma_table_id after making
this call. Releasing a table while it is set on a display is
safe, and will not modify the output of the display.
Request
Name | Type |
gamma_table_id |
uint64
|
ReleaseImage
Request
SetBufferCollectionConstraints
Request
Response
SetDisplayColorConversion
Request
Name | Type |
display_id |
uint64
|
preoffsets |
float32[3]
|
coefficients |
float32[9]
|
postoffsets |
float32[3]
|
SetDisplayGammaTable
Set the gamma correction table for a display.
gamma_table_id must be a table registered with ImportGammaTable. It is
safe to release a gamma table after using it here, and will not modify
display output.
Request
Name | Type |
display_id |
uint64
|
gamma_table_id |
uint64
|
SetDisplayLayers
Request
Name | Type |
display_id |
uint64
|
layer_ids |
vector<uint64>
|
SetDisplayMode
Request
Name | Type |
display_id |
uint64
|
mode |
Mode
|
SetLayerColorConfig
Request
Name | Type |
layer_id |
uint64
|
pixel_format |
uint32
|
color_bytes |
vector<uint8>
|
SetLayerCursorConfig
Request
SetLayerCursorPosition
Request
Name | Type |
layer_id |
uint64
|
x |
int32
|
y |
int32
|
SetLayerImage
Request
Name | Type |
layer_id |
uint64
|
image_id |
uint64
|
wait_event_id |
uint64
|
signal_event_id |
uint64
|
SetLayerPrimaryAlpha
Request
Name | Type |
layer_id |
uint64
|
mode |
AlphaMode
|
val |
float32
|
SetLayerPrimaryConfig
Request
SetLayerPrimaryPosition
Request
SetMinimumRgb
Set the minimum value of rgb channels. Valid range [0 255] inclusive. Returns
ZX_ERR_NOT_SUPPORTED when the display hardware does not support this feature.
This API is meant to address backlight bleeding that may occur on some hardware
that have a specific type of panel and hardware assembly. The evolution of this
API is highly hardware and product dependant and therefore as products evolve, this
API may change or support for this API may become non-existent. Therefore, this
API should be used with caution.
Request
Name | Type |
minimum_rgb |
uint8
|
Response
SetVirtconMode
Request
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
Name | Type |
signal_event_id |
uint64
|
image_id |
uint64
|
Response
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. In some cases, the provider service may provide access to only one or
the other; if the client tries to open the other then ZX_ERR_NOT_SUPPORTED
will
be returned.
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
Name | Type |
device |
handle<channel>
|
controller |
request<Controller>
|
Response
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
Name | Type |
device |
handle<channel>
|
controller |
request<Controller>
|
Response
STRUCTS
ClientCompositionOp
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
display_id |
uint64
|
display_id and layer_id uniquely identify the subject of the
opcode.
|
No default |
layer_id |
uint64
|
layer_id is 0 for whole-display issues like unsupported color
conversion and gamma tables.
|
No default |
opcode |
ClientCompositionOpcode
|
|
No default |
Controller_ImportImageForCapture_Response
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
image_id |
uint64
|
|
No default |
Controller_IsCaptureSupported_Response
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
supported |
bool
|
|
No default |
Controller_ReleaseCapture_Response
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
Controller_SetMinimumRgb_Response
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
Controller_StartCapture_Response
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
CursorInfo
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
width |
uint32
|
|
No default |
height |
uint32
|
|
No default |
pixel_format |
uint32
|
|
No default |
Frame
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
x_pos |
uint32
|
|
No default |
y_pos |
uint32
|
|
No default |
width |
uint32
|
|
No default |
height |
uint32
|
|
No default |
ImageConfig
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
width |
uint32
|
|
No default |
height |
uint32
|
|
No default |
pixel_format |
uint32
|
|
No default |
type |
uint32
|
|
TYPE_SIMPLE |
Info
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
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 |
horizontal_size_mm |
uint32
|
Physical horizontal size in millimeters.
If this value is not available, set to a best guess value and set the flag
|
No default |
vertical_size_mm |
uint32
|
Physical vertical size in millimeters
If this value is not available, set to a best guess value and set the flag
|
No default |
using_fallback_size |
bool
|
This flag is set if fallback horizontal and vertical sizes were used as opposed
to actual values reported by the display.
|
No default |
Mode
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Type | Description | Default |
---|
horizontal_resolution |
uint32
|
|
No default |
vertical_resolution |
uint32
|
|
No default |
refresh_rate_e2 |
uint32
|
|
No default |
flags |
uint32
|
|
No default |
ENUMS
AlphaMode
Type: uint8
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Value | Description |
---|
DISABLE |
0 |
|
PREMULTIPLIED |
1 |
|
HW_MULTIPLY |
2 |
|
ClientCompositionOpcode
Type: uint8
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Value | Description |
---|
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 |
|
CLIENT_GAMMA |
8 |
|
ConfigResult
Type: uint32
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Value | Description |
---|
OK |
0 |
|
INVALID_CONFIG |
1 |
|
UNSUPPORTED_CONFIG |
2 |
|
TOO_MANY_DISPLAYS |
3 |
|
UNSUPPORTED_DISPLAY_MODES |
4 |
|
Type: uint8
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Value | Description |
---|
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 |
|
VirtconMode
Type: uint8
Defined in fuchsia.hardware.display/display-controller.fidl
Name | Value | Description |
---|
INACTIVE |
0 |
|
FALLBACK |
1 |
|
FORCED |
2 |
|
UNIONS
Controller_ImportImageForCapture_Result
Defined in fuchsia.hardware.display/display-controller.fidl
Controller_IsCaptureSupported_Result
Defined in fuchsia.hardware.display/display-controller.fidl
Controller_ReleaseCapture_Result
Defined in fuchsia.hardware.display/display-controller.fidl
Controller_SetMinimumRgb_Result
Defined in fuchsia.hardware.display/display-controller.fidl
Controller_StartCapture_Result
Defined in fuchsia.hardware.display/display-controller.fidl
CONSTANTS