Skip to main content

TrainingConfig

Struct TrainingConfig 

Source
#[non_exhaustive]
pub struct TrainingConfig { pub ffe_levels: FfeLevels, pub flt_ready_polls: u32, pub ltp_polls: u32, pub frl_start_polls: u32, pub no_timeout_poll_cap: u32, pub max_retrains: u32, pub exit_to_tmds_on_error: bool, }
Expand description

Per-attempt training configuration.

Construct via TrainingConfig::default and override fields as needed. Poll limits are exact counts: N means exactly N polls before the state gives up. The defaults assume one poll every 2 ms.

One train call makes at most `flt_ready_polls + (n_rates + max_retrains) × ltp_polls

  • (max_retrains + 1) × frl_start_pollspolls, each limit replaced byno_timeout_poll_capwhile the sink setsFLT_no_timeout: 850 to 1350 polls with the defaults for one to six rates, 4500 to 7000 under FLT_no_timeout`.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§ffe_levels: FfeLevels

Highest TxFFE level the source supports, written to Config_1 (limited per rate). Default 3, as the AMD and Intel drivers advertise: the sink can then request up to three TxFFE raises per lane. Set it to 0 for a PHY that cannot apply TxFFE, so the source does not advertise levels it cannot deliver; requests to raise a level are then not acted on.

§flt_ready_polls: u32

Poll limit for FLT_ready in LTS:2. Default 50 (100 ms at 2 ms per poll).

§ltp_polls: u32

Poll limit for LTS:3. Default 100 (200 ms at 2 ms per poll).

§frl_start_polls: u32

Poll limit for FRL_start in LTS:P. Default 100 (200 ms at 2 ms per poll, the FRL_start wait of the AMD and Intel drivers).

§no_timeout_poll_cap: u32

The LTS:2, LTS:3 and LTS:P poll limit while the sink sets FLT_no_timeout. When it runs out the attempt ends with TrainingOutcome::NoTimeoutHold, leaving the link as it is. Default 500 (1 s at 2 ms per poll, the AMD driver’s cap).

§max_retrains: u32

How many times one train call returns from LTS:P to LTS:3 when the sink requests retraining (FLT_update). The next request after that ends the attempt with FallbackReason::RetrainsExhausted; 0 falls back on the first one. Default 3, the number of retries the AMD driver allows a failed procedure (it reruns the whole procedure rather than LTS:3).

Unlike the poll limits, this bound holds under FLT_no_timeout as well: it is what guarantees that the LTS:P ↔ LTS:3 cycle ends, so exhausting it falls back rather than ending in TrainingOutcome::NoTimeoutHold. A compliance test that needs more retrains raises it.

§exit_to_tmds_on_error: bool

Whether an SCDC or PHY error is followed by LTS:L, returning both ends to TMDS as a fallback does. Default true. Turn it off to leave the sink and PHY as the error left them, for example to inspect the sink’s registers; TrainingError then reports TmdsExit::Skipped. While the sink sets FLT_no_timeout an error never leads to LTS:L (TmdsExit::HeldUnderTest).

Trait Implementations§

Source§

impl Clone for TrainingConfig

Source§

fn clone(&self) -> TrainingConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TrainingConfig

Source§

impl Debug for TrainingConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TrainingConfig

Source§

fn default() -> TrainingConfig

Returns the “default value” for a type. Read more
Source§

impl Eq for TrainingConfig

Source§

impl PartialEq for TrainingConfig

Source§

fn eq(&self, other: &TrainingConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TrainingConfig

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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.