pub enum CoordinatorRequest {
Show 28 variants ImportImage { image_metadata: ImageMetadata, buffer_id: BufferId, image_id: ImageId, responder: CoordinatorImportImageResponder, }, ReleaseImage { image_id: ImageId, control_handle: CoordinatorControlHandle, }, ImportEvent { event: Event, id: EventId, control_handle: CoordinatorControlHandle, }, ReleaseEvent { id: EventId, control_handle: CoordinatorControlHandle, }, CreateLayer { responder: CoordinatorCreateLayerResponder, }, DestroyLayer { layer_id: LayerId, control_handle: CoordinatorControlHandle, }, SetDisplayMode { display_id: DisplayId, mode: Mode, control_handle: CoordinatorControlHandle, }, SetDisplayColorConversion { display_id: DisplayId, preoffsets: [f32; 3], coefficients: [f32; 9], postoffsets: [f32; 3], control_handle: CoordinatorControlHandle, }, SetDisplayLayers { display_id: DisplayId, layer_ids: Vec<LayerId>, control_handle: CoordinatorControlHandle, }, SetLayerPrimaryConfig { layer_id: LayerId, image_metadata: ImageMetadata, control_handle: CoordinatorControlHandle, }, SetLayerPrimaryPosition { layer_id: LayerId, transform: Transform, src_frame: Frame, dest_frame: Frame, control_handle: CoordinatorControlHandle, }, SetLayerPrimaryAlpha { layer_id: LayerId, mode: AlphaMode, val: f32, control_handle: CoordinatorControlHandle, }, SetLayerColorConfig { layer_id: LayerId, pixel_format: PixelFormat, color_bytes: Vec<u8>, control_handle: CoordinatorControlHandle, }, SetLayerImage { layer_id: LayerId, image_id: ImageId, wait_event_id: EventId, signal_event_id: EventId, control_handle: CoordinatorControlHandle, }, CheckConfig { discard: bool, responder: CoordinatorCheckConfigResponder, }, ApplyConfig { control_handle: CoordinatorControlHandle, }, GetLatestAppliedConfigStamp { responder: CoordinatorGetLatestAppliedConfigStampResponder, }, ApplyConfig2 { signal_fences: Vec<Event>, control_handle: CoordinatorControlHandle, }, EnableVsync { enable: bool, control_handle: CoordinatorControlHandle, }, AcknowledgeVsync { cookie: u64, control_handle: CoordinatorControlHandle, }, SetVirtconMode { mode: VirtconMode, control_handle: CoordinatorControlHandle, }, ImportBufferCollection { buffer_collection_id: BufferCollectionId, buffer_collection_token: ClientEnd<BufferCollectionTokenMarker>, responder: CoordinatorImportBufferCollectionResponder, }, ReleaseBufferCollection { buffer_collection_id: BufferCollectionId, control_handle: CoordinatorControlHandle, }, SetBufferCollectionConstraints { buffer_collection_id: BufferCollectionId, buffer_usage: ImageBufferUsage, responder: CoordinatorSetBufferCollectionConstraintsResponder, }, IsCaptureSupported { responder: CoordinatorIsCaptureSupportedResponder, }, StartCapture { signal_event_id: EventId, image_id: ImageId, responder: CoordinatorStartCaptureResponder, }, SetMinimumRgb { minimum_rgb: u8, responder: CoordinatorSetMinimumRgbResponder, }, SetDisplayPower { display_id: DisplayId, power_on: bool, responder: CoordinatorSetDisplayPowerResponder, },
}
Expand description

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.

Variants§

§

ImportImage

Imports a Buffer-Collection backed image.

image_metadata must be compatible with the arguments passed to [fuchsia.hardware.display/Coordinator.SetBufferCollectionConstraints] on the buffer_collection_id.

Returns ZX_ERR_NOT_SUPPORTED if the display hardware doesn’t support image_config. Returns ZX_ERR_ALREADY_EXISTS if image_id was used in a successful ImportImage() without a corresponding ReleaseImage().

Fields

§image_metadata: ImageMetadata
§buffer_id: BufferId
§image_id: ImageId
§

ReleaseImage

Releases an imported image.

image_id must be already imported by [fuchsia.hardware.display/Coordinator.ImportImage].

The image must not be the capture target of an ongoing capture specified in [fuchsia.hardware.display/Coordinator.StartCapture].

When an image is released, it is immediately removed from any pending or active configurations, and any fences associated with the image are dropped. The resources associated with the image will be released as soon as the image is no longer in use.

Fields

§image_id: ImageId
§

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.

Fields

§event: Event
§

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.

Fields

§

CreateLayer

§

DestroyLayer

Fields

§layer_id: LayerId
§

SetDisplayMode

Fields

§display_id: DisplayId
§mode: Mode
§

SetDisplayColorConversion

Fields

§display_id: DisplayId
§preoffsets: [f32; 3]
§coefficients: [f32; 9]
§postoffsets: [f32; 3]
§

SetDisplayLayers

Fields

§display_id: DisplayId
§layer_ids: Vec<LayerId>
§

SetLayerPrimaryConfig

Fields

§layer_id: LayerId
§image_metadata: ImageMetadata
§

SetLayerPrimaryPosition

Fields

§layer_id: LayerId
§transform: Transform
§src_frame: Frame
§dest_frame: Frame
§

SetLayerPrimaryAlpha

Fields

§layer_id: LayerId
§val: f32
§

SetLayerColorConfig

Fields

§layer_id: LayerId
§pixel_format: PixelFormat
§color_bytes: Vec<u8>
§

SetLayerImage

Fields

§layer_id: LayerId
§image_id: ImageId
§wait_event_id: EventId
§signal_event_id: EventId
§

CheckConfig

Fields

§discard: bool
§

ApplyConfig

Fields

§

GetLatestAppliedConfigStamp

Gets the stamp provided with the latest configuration the client submitted (by calling ApplyConfig()) and the display core driver accepted; the display configuration may not have been rendered yet because of pending image availability or pending layer changes. If no configuration was applied before, returns INVALID_CONFIG_STAMP_VALUE.

§

ApplyConfig2

Applies any pending changes to the current configuration. This will not apply pending changes to layers which are not on any display.

For each event in signal_fences, once the pending configuration is applied to and contents are displayed on all the displays connected to the Coordinator, it will be signaled immediately.

Arguments

signal_fences: Stores all fence events that will be signaled once the configuration is applied.

Error handling

If the input is invalid, for example:
    - `signal_fences` contains invalid events
or the pending configuration cannot be applied, this call will
silently fail, so the client should ensure its configuration is
valid with CheckConfig().

Fields

§signal_fences: Vec<Event>
§

EnableVsync

Fields

§enable: bool
§

AcknowledgeVsync

Fields

§cookie: u64
§

SetVirtconMode

Sets the visibility behavior of the virtcon.

This must only be called from the Virtcon client.

Fields

§

ImportBufferCollection

Fields

§buffer_collection_id: BufferCollectionId
§buffer_collection_token: ClientEnd<BufferCollectionTokenMarker>
§

ReleaseBufferCollection

Fields

§buffer_collection_id: BufferCollectionId
§

SetBufferCollectionConstraints

§

IsCaptureSupported

Returns true if Capture is supported on the platform.

§

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 coordinator does not support capture

Fields

§signal_event_id: EventId
§image_id: ImageId
§

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.

Unlike other calls in this API, SetMiniumRgb is applied immediately, and does not wait for ApplyConfig(). It is, however, still stateful.

Fields

§minimum_rgb: u8
§

SetDisplayPower

Power off/on the display panel.

This function takes effect immediately. Clients don’t need to call ApplyConfig() to commit this command.

Once a display is turned off, it will not deliver vsync events, which may include the vsync event for the most recently applied config.

Staged display control commands (e.g. SetDisplayLayer) will not be affected. They are still applied to the display device when client calls ApplyConfig(), but the contents will be shown on display panel only after client powers on the display again.

Newly added displays are turned on by default.

Returns ZX_ERR_NOT_FOUND if display_id is invalid when Coordinator handles this method. Returns ZX_ERR_NOT_SUPPORTED if the display driver IC doesn’t support turning on/off displays.

Fields

§display_id: DisplayId
§power_on: bool

Implementations§

source§

impl CoordinatorRequest

source

pub fn into_import_image( self ) -> Option<(ImageMetadata, BufferId, ImageId, CoordinatorImportImageResponder)>

source

pub fn into_release_image(self) -> Option<(ImageId, CoordinatorControlHandle)>

source

pub fn into_import_event( self ) -> Option<(Event, EventId, CoordinatorControlHandle)>

source

pub fn into_release_event(self) -> Option<(EventId, CoordinatorControlHandle)>

source

pub fn into_create_layer(self) -> Option<CoordinatorCreateLayerResponder>

source

pub fn into_destroy_layer(self) -> Option<(LayerId, CoordinatorControlHandle)>

source

pub fn into_set_display_mode( self ) -> Option<(DisplayId, Mode, CoordinatorControlHandle)>

source

pub fn into_set_display_color_conversion( self ) -> Option<(DisplayId, [f32; 3], [f32; 9], [f32; 3], CoordinatorControlHandle)>

source

pub fn into_set_display_layers( self ) -> Option<(DisplayId, Vec<LayerId>, CoordinatorControlHandle)>

source

pub fn into_set_layer_primary_config( self ) -> Option<(LayerId, ImageMetadata, CoordinatorControlHandle)>

source

pub fn into_set_layer_primary_position( self ) -> Option<(LayerId, Transform, Frame, Frame, CoordinatorControlHandle)>

source

pub fn into_set_layer_primary_alpha( self ) -> Option<(LayerId, AlphaMode, f32, CoordinatorControlHandle)>

source

pub fn into_set_layer_color_config( self ) -> Option<(LayerId, PixelFormat, Vec<u8>, CoordinatorControlHandle)>

source

pub fn into_set_layer_image( self ) -> Option<(LayerId, ImageId, EventId, EventId, CoordinatorControlHandle)>

source

pub fn into_check_config( self ) -> Option<(bool, CoordinatorCheckConfigResponder)>

source

pub fn into_apply_config(self) -> Option<CoordinatorControlHandle>

source

pub fn into_get_latest_applied_config_stamp( self ) -> Option<CoordinatorGetLatestAppliedConfigStampResponder>

source

pub fn into_apply_config2( self ) -> Option<(Vec<Event>, CoordinatorControlHandle)>

source

pub fn into_enable_vsync(self) -> Option<(bool, CoordinatorControlHandle)>

source

pub fn into_acknowledge_vsync(self) -> Option<(u64, CoordinatorControlHandle)>

source

pub fn into_set_virtcon_mode( self ) -> Option<(VirtconMode, CoordinatorControlHandle)>

source

pub fn into_import_buffer_collection( self ) -> Option<(BufferCollectionId, ClientEnd<BufferCollectionTokenMarker>, CoordinatorImportBufferCollectionResponder)>

source

pub fn into_release_buffer_collection( self ) -> Option<(BufferCollectionId, CoordinatorControlHandle)>

source

pub fn into_set_buffer_collection_constraints( self ) -> Option<(BufferCollectionId, ImageBufferUsage, CoordinatorSetBufferCollectionConstraintsResponder)>

source

pub fn into_is_capture_supported( self ) -> Option<CoordinatorIsCaptureSupportedResponder>

source

pub fn into_start_capture( self ) -> Option<(EventId, ImageId, CoordinatorStartCaptureResponder)>

source

pub fn into_set_minimum_rgb( self ) -> Option<(u8, CoordinatorSetMinimumRgbResponder)>

source

pub fn into_set_display_power( self ) -> Option<(DisplayId, bool, CoordinatorSetDisplayPowerResponder)>

source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

Trait Implementations§

source§

impl Debug for CoordinatorRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more