pub struct Config {
pub format_costs: Option<Vec<FormatCostEntry>>,
/* private fields */
}
Expand description
This type is fidl::Persist()’ed in the sysmem_config.persistent_fidl file within the sysmem domain config by the assembly tool, and read by the sysmem driver.
Normally json[5] would be preferable for config, but we generate this config in rust using FIDL types (to avoid repetition and to take advantage of FIDL rust codegen), and there’s no json schema for FIDL types.
Currently there is no mechanism to change anything in this config at runtime or from boot to boot. This config is static per run of the assembly tool.
See src/lib/assembly/config_schema/src/platform_config/sysmem_config.rs for aspects of sysmem config which are specified directly inline in board info or assembly platform config. The two parts of sysmem config don’t (currently) overlap. The config here is for aspects of sysmem config which would be too verbose for direct inclusion in board info or assembly platform config. In addition, some/most of the pixel format cost entries are programmatically generated (as of this comment).
Prior to aggregation by assembly tool, there are multiple .persistent_fidl files each storing its own Config instance. The board info and assembly platform config lists the input persistent_fidl files, with board info logically before assembly platform config. The overall list of files is processed, which allows later files to override/replace info in prior files.
Because this type is only intended for use with persistent fidl, where the length of a serialized instance isn’t bounded, we don’t bound the internal vector element counts.
Fields§
§format_costs: Option<Vec<FormatCostEntry>>
This is the ordered list of FormatCost entries which will be considered by sysmem when breaking ties among formats supported by all participants of a buffer collection.
During config aggregation, if a later entry has matching FormatCostKey, the earlier entry is omitted/removed. This allows later files to override entries in earlier files, and allows files specified in assembly platform config to override entries in files specified in the board info.
This vector will normally not have any two entries with matching pixel_format, pixel_format_modifier, and buffer_usage_bits in the Config instance loaded from sysmem_config.persistent_fidl by sysmem. If somehow two entries do match in those fields, sysmem can ignore all but one of the entries chosen arbitrarily.
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Config, D> for Config
impl<D: ResourceDialect> Decode<Config, D> for Config
Source§impl TypeMarker for Config
impl TypeMarker for Config
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Config
impl ValueTypeMarker for Config
impl Persistable for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)