/* Below structure is to describe the HW support for mem layout, extend support
range to match what OS could handle in the roadmap */ struct lut3d_caps {
uint32_t dma_3d_lut : 1; /*< DMA mode support for 3D LUT */ struct {
uint32_t swizzle_3d_rgb : 1;
uint32_t swizzle_3d_bgr : 1;
uint32_t linear_1d : 1;
} mem_layout_support; struct {
uint32_t unorm_12msb : 1;
uint32_t unorm_12lsb : 1;
uint32_t float_fp1_5_10 : 1;
} mem_format_support; struct {
uint32_t order_rgba : 1;
uint32_t order_bgra : 1;
} mem_pixel_order_support; /*< size options are 9, 17, 33, 45, 65 */ struct {
uint32_t dim_9 : 1; /* 3D LUT support for 9x9x9 */
uint32_t dim_17 : 1; /* 3D LUT support for 17x17x17 */
uint32_t dim_33 : 1; /* 3D LUT support for 33x33x33 */
uint32_t dim_45 : 1; /* 3D LUT support for 45x45x45 */
uint32_t dim_65 : 1; /* 3D LUT support for 65x65x65 */
} lut_dim_caps;
};
struct dc_dcc_setting { unsignedint max_compressed_blk_size; unsignedint max_uncompressed_blk_size; bool independent_64b_blks; //These bitfields to be used starting with DCN 3.0 struct {
uint32_t dcc_256_64_64 : 1;//available in ASICs before DCN 3.0 (the worst compression case)
uint32_t dcc_128_128_uncontrained : 1; //available in ASICs before DCN 3.0
uint32_t dcc_256_128_128 : 1; //available starting with DCN 3.0
uint32_t dcc_256_256_unconstrained : 1; //available in ASICs before DCN 3.0 (the best compression case)
uint32_t dcc_256_256 : 1; //available in ASICs starting with DCN 4.0x (the best compression case)
uint32_t dcc_256_128 : 1; //available in ASICs starting with DCN 4.0x
uint32_t dcc_256_64 : 1; //available in ASICs starting with DCN 4.0x (the worst compression case)
} dcc_controls;
};
/* Surface update type is used by dc_update_surfaces_and_stream *Theupdatetypeisdeterminedattheverybeginningofthefunctionbased *onparameterspassedinanddecideshowmuchprogramming(orupdating)is *goingtobedoneduringthecall. * *UPDATE_TYPE_FASTisusedforreallyfastupdatesthatdonotrequiremuch *logicalcalculationsorhardwareregisterprogramming.ThisupdateMUSTbe *ISRsafeonwindows.Currentlyfastupdatewillonlybeusedtoflipsurface *address. * *UPDATE_TYPE_MEDisusedforslowerupdateswhichrequiresignificanthw *re-programminghoweverdonotaffectbandwidthconsumptionorclock *requirements.Atpresent,thisisthelevelatwhichfrontendupdates *thatdonotrequireustorunbw_calcshappen.Thesearein/outtransferfunc *updates,viewportoffsetchanges,recoutsizechangesandpixeldepthchanges. *ThisupdatecanbedoneatISR,butwewanttominimizehowoftenthishappens. * *UPDATE_TYPE_FULLisslow.Reallyslow.Thisrequiresustorecalculateour *bandwidthandclocks,possiblyrearrangesomepipesandreprogramanythingfront *endrelated.Anytimeviewportdimensions,recoutdimensions,scalingratiosor *gammaneedtobeadjustedorpipeneedstobeturnedon(ordisconnected)wedo *afullupdate.ThiscannotbedoneatISRlevelandshouldbearareevent. *Unlesssomeoneisstresstestingmpoenter/exit,playingwithcolouroradjusting *underscanwedon'texpecttoseethiscallatall.
*/
enum surface_update_type {
UPDATE_TYPE_FAST, /* super fast, safe to execute in isr */
UPDATE_TYPE_MED, /* ISR safe, most of programming needed, no bw/clk change*/
UPDATE_TYPE_FULL, /* may need to shuffle resources */
};
/* *structdc_clocks-DCpipeclocks * *Foranyclocksthatmaydifferperpipeonlythemaxisstoredinthis *structure
*/ struct dc_clocks { int dispclk_khz; int actual_dispclk_khz; int dppclk_khz; int actual_dppclk_khz; int disp_dpp_voltage_level_khz; int dcfclk_khz; int socclk_khz; int dcfclk_deep_sleep_khz; int fclk_khz; int phyclk_khz; int dramclk_khz; bool p_state_change_support; enum dcn_zstate_support_state zstate_support; bool dtbclk_en; int ref_dtbclk_khz; bool fclk_p_state_change_support; enum dcn_pwr_state pwr_state; /* *Elementsbelowarenotcomparedforthepurposesof *optimizationrequired
*/ bool prev_p_state_change_support; bool fclk_prev_p_state_change_support; int num_ways; int host_router_bw_kbps[MAX_HOST_ROUTERS_NUM];
/* *@fw_based_mclk_switching * *DChasamechanismthatleveragethevariablerefreshratetoswitch *memoryclockincasesthatwehavealargelatencytoachievethe *memoryclockchangeandashortvblankwindow.DChassome *requirementstoenablethisfeature,andthisfielddescribesifthe *systemsupportornotsuchafeature.
*/ bool fw_based_mclk_switching; bool fw_based_mclk_switching_shut_down; int prev_num_ways; enum dtm_pstate dtm_level; int max_supported_dppclk_khz; int max_supported_dispclk_khz; int bw_dppclk_khz; /*a copy of dppclk_khz*/ int bw_dispclk_khz; int idle_dramclk_khz; int idle_fclk_khz; int subvp_prefetch_dramclk_khz; int subvp_prefetch_fclk_khz;
};
struct dc_bounding_box_overrides { int sr_exit_time_ns; int sr_enter_plus_exit_time_ns; int sr_exit_z8_time_ns; int sr_enter_plus_exit_z8_time_ns; int urgent_latency_ns; int percent_of_ideal_drambw; int dram_clock_change_latency_ns; int dummy_clock_change_latency_ns; int fclk_clock_change_latency_ns; /* This forces a hard min on the DCFCLK we use *forDML.Unlikethedebugoptionforforcing *DCFCLK,thisoverrideaffectswatermarkcalculations
*/ int min_dcfclk_mhz;
};
/* Generic structure that can be used to query properties of DC. More fields *canbeaddedasrequired.
*/ struct dc_current_properties { unsignedint cursor_size_limit;
};
struct dc *dc_create(conststruct dc_init_data *init_params); void dc_hardware_init(struct dc *dc);
int dc_get_vmid_use_vector(struct dc *dc); void dc_setup_vm_context(struct dc *dc, struct dc_virtual_addr_space_config *va_config, int vmid); /* Returns the number of vmids supported */ int dc_setup_system_context(struct dc *dc, struct dc_phy_addr_space_config *pa_config); void dc_init_callbacks(struct dc *dc, conststruct dc_callback_init *init_params); void dc_deinit_callbacks(struct dc *dc); void dc_destroy(struct dc **dc);
/* Surface Interfaces */
enum {
TRANSFER_FUNC_POINTS = 1025
};
struct dc_hdr_static_metadata { /* display chromaticities and white point in units of 0.00001 */ unsignedint chromaticity_green_x; unsignedint chromaticity_green_y; unsignedint chromaticity_blue_x; unsignedint chromaticity_blue_y; unsignedint chromaticity_red_x; unsignedint chromaticity_red_y; unsignedint chromaticity_white_point_x; unsignedint chromaticity_white_point_y;
struct dc_transfer_func { struct kref refcount; enum dc_transfer_func_type type; enum dc_transfer_func_predefined tf; /* FP16 1.0 reference level in nits, default is 80 nits, only for PQ*/
uint32_t sdr_ref_white_level; union { struct pwl_params pwl; struct dc_transfer_func_distributed_points tf_pts;
};
};
union dc_3dlut_state { struct {
uint32_t initialized:1; /*if 3dlut is went through color module for initialization */
uint32_t rmu_idx_valid:1; /*if mux settings are valid*/
uint32_t rmu_mux_num:3; /*index of mux to use*/
uint32_t mpc_rmu0_mux:4; /*select mpcc on mux, one of the following : mpcc0, mpcc1, mpcc2, mpcc3*/
uint32_t mpc_rmu1_mux:4;
uint32_t mpc_rmu2_mux:4;
uint32_t reserved:15;
} bits;
uint32_t raw;
};
struct dc_scratch_space { /* used to temporarily backup plane states of a stream during *dcupdate.Thereasonisthatplanestatesareoverwritten *withsurfaceupdatesindcupdate.Oncetheyareoverwritten *currentstateisnolongervalid.Wewanttotemporarily *storecurrentvalueinplanestatessowecanstillrecover *avalidcurrentstateduringdcupdate.
*/ struct dc_plane_state plane_states[MAX_SURFACES];
/** *@link_state_valid: * *Ifthereisnolinkandlocalsink,thisvariableshouldbesetto *false.Otherwise,itshouldbesettotrue;usually,thefunction *core_link_enable_streamsetsthisfieldtotrue.
*/ bool link_state_valid; bool aux_access_disabled; bool sync_lt_in_progress; bool skip_stream_reenable; bool is_internal_display; /** @todo Rename. Flag an endpoint as having a programmable mapping to a DIG encoder. */ bool is_dig_mapping_flexible; bool hpd_status; /* HPD status of link without physical HPD pin. */ bool is_hpd_pending; /* Indicates a new received hpd */
/* USB4 DPIA links skip verifying link cap, instead performing the fallback method *foreverylinktraining.ThisisincompatiblewithDPLLcomplianceautomation, *whichexpectsthesamelinksettingstobeusedeveryretryonalinkloss. *Thisflagisusedtoskipthefallbackwhenlinklossoccursduringautomation.
*/ bool skip_fallback_on_link_loss;
bool edp_sink_present;
struct dp_trace dp_trace;
/* caps is the same as reported_link_cap. link_traing use *reported_link_cap.Willcleanup.TODO
*/ struct dc_link_settings reported_link_cap; struct dc_link_settings verified_link_cap; struct dc_link_settings cur_link_settings; struct dc_lane_settings cur_lane_setting[LANE_COUNT_DP_MAX]; struct dc_link_settings preferred_link_setting; /* preferred_training_settings are override values that *comefromDM.DMisresponsibleforthememory *managementoftheoverridepointers.
*/ struct dc_link_training_overrides preferred_training_settings; struct dp_audio_test_data audio_test_data;
uint8_t ddc_hw_inst;
uint8_t hpd_src;
uint8_t link_enc_hw_inst; /* DIG link encoder ID. Used as index in link encoder resource pool. *ForlinkswithfixedmappingtoDIG,thisisnotchangedafterdc_link *objectcreation.
*/ enum engine_id eng_id; enum engine_id dpia_preferred_eng_id;
bool test_pattern_enabled; /* Pending/Current test pattern are only used to perform and track *FIXED_VSretimertestpattern/laneadjustmentoverridestate. *PendingallowslinkHWSStodifferentiatePHYvsnon-PHYpattern, *toperformspecificlaneadjustoverridesbeforesettingcertain *PHYtestpatterns.Incaseswhenlaneadjustandsettestpattern *callsarenotperformedatomically(i.e.performinglinktraining), *pending_test_patternwillbeinvalidorcontainanon-PHYtestpattern *andcurrent_test_patternwillcontainrequiredcontextforanyfuture *setpattern/setlaneadjusttotransitionbetweenoverridestate(s).
* */ enum dp_test_pattern current_test_pattern; enum dp_test_pattern pending_test_pattern;
union compliance_test_state compliance_test_state;
void *priv;
struct ddc_service *ddc;
enum dp_panel_mode panel_mode; bool aux_mode;
/* Private to DC core */
conststruct dc *dc;
struct dc_context *ctx;
struct panel_cntl *panel_cntl; struct link_encoder *link_enc; struct graphics_object_id link_id; /* Endpoint type distinguishes display endpoints which do not have entries *intheBIOSconnectortablefromthosethatdo.Helpswhentrackinglink *encodertodisplayendpointassignments.
*/ enum display_endpoint_type ep_type; union ddi_channel_mapping ddi_channel_mapping; struct connector_device_tag_info device_tag; struct dpcd_caps dpcd_caps;
uint32_t dongle_max_pix_clk; unsignedshort chip_caps; unsignedint dpcd_sink_count; struct hdcp_caps hdcp_caps; enum edp_revision edp_revision; union dpcd_sink_ext_caps dpcd_sink_ext_caps;
/* MST record stream using this link */ struct link_flags { bool dp_keep_receiver_powered; bool dp_skip_DID2; bool dp_skip_reset_segment; bool dp_skip_fs_144hz; bool dp_mot_reset_segment; /* Some USB4 docks do not handle turning off MST DSC once it has been enabled. */ bool dpia_mst_dsc_always_on; /* Forced DPIA into TBT3 compatibility mode. */ bool dpia_forced_tbt3_mode; bool dongle_mode_timing_override; bool blank_stream_on_ocs_change; bool read_dpcd204h_on_irq_hpd; bool force_dp_ffe_preset; bool skip_phy_ssc_reduction;
} wa_flags; union dc_dp_ffe_preset forced_dp_ffe_preset; struct link_mst_stream_allocation_table mst_stream_alloc_table;
struct gpio *hpd_gpio; enum dc_link_fec_state fec_state; bool is_dds; bool is_display_mux_present; bool link_powered_externally; // Used to bypass hardware sequencing delays when panel is powered down forcibly
/* Scratch memory */ struct { struct { /* *Formatchingclock_limitstableindriverwithtable *fromPMFW.
*/ struct _vcs_dpi_voltage_scaling_st clock_limits[DC__VOLTAGE_STATES];
} update_bw_bounding_box; struct dc_scratch_space current_state; struct dc_scratch_space new_state; struct dc_stream_state temp_stream; // Used so we don't need to allocate stream on the stack struct dc_link temp_link; bool pipes_to_unlock_first[MAX_PIPES]; /* Any of the pipes indicated here should be unlocked first */
} scratch;
/* The function returns minimum bandwidth required to drive a given timing *return-minimumrequiredtimingbandwidthinkbps.
*/
uint32_t dc_bandwidth_in_kbps_from_timing( conststruct dc_crtc_timing *timing, constenum dc_link_encoding_format link_encoding);
/* Link Interfaces */ /* Return an enumerated dc_link. *dc_linkorderisconstantanddeterminedat *boottime.Theycannotbecreatedordestroyed. *Usedc_get_caps()togetnumberoflinks.
*/ struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index);
/* Return instance id of the edp link. Inst 0 is primary edp link. */ bool dc_get_edp_link_panel_inst(conststruct dc *dc, conststruct dc_link *link, unsignedint *inst_out);
/* Return an array of link pointers to edp links. */ void dc_get_edp_links(conststruct dc *dc, struct dc_link **edp_links, int *edp_num);
void dc_set_edp_power(conststruct dc *dc, struct dc_link *edp_link, bool powerOn);
/* The function initiates detection handshake over the given link. It first *determinesiftherearedisplayconnectionsoverthelink.Ifsoitinitiates *detectionprotocolssupportedbytheconnectedreceiverdevice.Thefunction *containsprotocolspecifichandshakesequenceswhicharesometimesmandatory *toestablishaproperconnectionbetweenTXandRX.Soitisalways *recommendedtocallthisfunctionasthefirstlinkoperationuponHPDevent *orpowerupevent.Uponcompletion,thefunctionwillupdatelinkstructure *inplacebasedonlatestRXcapabilities.Thefunctionmayalsocausedpms *toberesettooffforallcurrentlyenabledstreamstothelink.ItisDM's *responsibilitytoserializedetectionandDPMSupdates. * *@reason-Indicatewhicheventtriggersthisdetection.dcmaycustomize *detectionflowdependingonthetriggeringevents. *returnfalse-ifdetectionisnotfullycompleted.Thiscouldhappenwhen *thereisanunrecoverableerrorduringdetectionordetectionispartially *completed(detectionhasbeendelegatedtodmmstmanagerie. *link->connection_type==dc_connection_mst_branchwhenreturningfalse). *returntrue-detectioniscompleted,linkhasbeenfullyupdatedwithlatest *detectionresult.
*/ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason);
struct dc_sink_init_data;
/* When link connection type is dc_connection_mst_branch, remote sink can be *addedtothelink.Theinterfacecreatesaremotesinkandassociatesitwith *currentlink.Thesinkwillberetainedbylinkuntilremoveremotesinkis *called. * *@dc_link-linktheremotesinkwillbeaddedto. *@edid-bytearrayofEDIDrawdata. *@len-sizeoftheedidinbyte *@init_data-
*/ struct dc_sink *dc_link_add_remote_sink( struct dc_link *dc_link, const uint8_t *edid, int len, struct dc_sink_init_data *init_data);
/* Remove remote sink from a link with dc_connection_mst_branch connection type. *@link-linkthesinkshouldberemovedfrom *@sink-sinktoberemoved.
*/ void dc_link_remove_remote_sink( struct dc_link *link, struct dc_sink *sink);
/* Enable HPD interrupt handler for a given link */ void dc_link_enable_hpd(conststruct dc_link *link);
/* Disable HPD interrupt handler for a given link */ void dc_link_disable_hpd(conststruct dc_link *link);
/* determine if there is a sink connected to the link * *@type-dc_connection_singleifconnected,dc_connection_noneotherwise. *return-falseifanunexpectederroroccurs,trueotherwise. * *NOTE:Thisfunctiondoesn'tdetectdownstreamsinkconnectionsi.e *dc_connection_mst_branch,dc_connection_sst_branch.Inthiscase,itwill *returndc_connection_singleifthebranchdeviceisconnecteddespiteof *downstreamsink'sconnectionstatus.
*/ bool dc_link_detect_connection_type(struct dc_link *link, enum dc_connection_type *type);
/* query current hpd pin value *return-trueHPDisasserted(HPDhigh),falseotherwise(HPDlow) *
*/ bool dc_link_get_hpd_state(struct dc_link *link);
/* Getter for cached link status from given link */ conststruct dc_link_status *dc_link_get_status(conststruct dc_link *link);
/* submit i2c read/write payloads through oem channel *@link_index-indextoalinkwithddcini2cmode *@cmd-i2ccommandstructure *return-trueifsuccess,falseotherwise.
*/ bool dc_submit_i2c_oem( struct dc *dc, struct i2c_command *cmd);
enum aux_return_code_type; /* Attempt to transfer the given aux payload. This function does not perform *retriesorhandleerrorstates.Thereplyisreturnedinthepayload->reply *andtheresultthroughoperation_result.Returnsthenumberofbytes *transferred,or-1onafailure.
*/ int dc_link_aux_transfer_raw(struct ddc_service *ddc, struct aux_payload *payload, enum aux_return_code_type *operation_result);
struct ddc_service *
dc_get_oem_i2c_device(struct dc *dc);
bool dc_is_oem_i2c_device_present( struct dc *dc,
size_t slave_address
);
/* return true if the connected receiver supports the hdcp version */ bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal); bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal);
/* handle DP Link loss sequence and try to recover RX link loss with best *effort
*/ void dc_link_dp_handle_link_loss(struct dc_link *link);
/* Determine if hpd rx irq should be handled or ignored *returntrue-hpdrxirqshouldbehandled. *returnfalse-itissafetoignorehpdrxirqevent
*/ bool dc_link_dp_allow_hpd_rx_irq(conststruct dc_link *link);
/* Determine if link loss is indicated with a given hpd_irq_dpcd_data. *@link-linkthehpdirqdataassociatedwith *@hpd_irq_dpcd_data-inputhpdirqdata *return-trueifhpdirqdataindicatesalinklost
*/ bool dc_link_check_link_loss_status(struct dc_link *link, union hpd_irq_data *hpd_irq_dpcd_data);
/* Read hpd rx irq data from a given link *@link-linkwherethehpdirqdatashouldbereadfrom *@irq_data-outputhpdirqdata *return-DC_OKifhpdirqdataisreadsuccessfully,otherwisehpdirqdata *readhasfailed.
*/ enum dc_status dc_link_dp_read_hpd_rx_irq_data( struct dc_link *link, union hpd_irq_data *irq_data);
/* The function clears recorded DP RX states in the link. DM should call this *functionwhenitisresumingfromS3powerstatetopreviouslyconnectedlinks. * *TODO-inthefutureweshouldconsidertoexpandlinkresumeinterfaceto *supportclearingpreviousrxstates.Sowedon'thavetorelyondmtocall *thisinterfaceexplicitly.
*/ void dc_link_clear_dprx_states(struct dc_link *link);
/* Destruct the mst topology of the link and reset the allocated payload table * *NOTE:thisshouldonlybecalledifDMchoosesnottocalldc_link_detectbut
* still wants to reset MST topology on an unplug event */ bool dc_link_reset_cur_dp_mst_topology(struct dc_link *link);
/* The function calculates effective DP link bandwidth when a given link is *usingthegivenlinksettings. * *return-totaleffectivelinkbandwidthinkbps.
*/
uint32_t dc_link_bandwidth_kbps( conststruct dc_link *link, conststruct dc_link_settings *link_setting);
/* The function calculates the minimum size of hblank (in bytes) needed to *supportthespecifiedchannelcountandsampleratecombination,giventhe *linkencodingandtimingtobeused.Thiscalculationisnotsupported *for8b/10bSST. * *return-minhblanksizeinbytes,0if8b/10bSST.
*/
uint32_t dc_link_required_hblank_size_bytes( conststruct dc_link *link, struct dp_audio_bandwidth_params *audio_params);
/* The function takes a snapshot of current link resource allocation state *@dc:pointertodcofthedmcallingthis *@map:adclinkresourcesnapshotdefinedinternallytodc. * *DMneedstocaptureasnapshotofcurrentlinkresourceallocationmapping *andstoreitinitspersistentstorage. * *Someofthelinkresourceisusingfirstcomefirstservepolicy. *Theallocationmappingdependsonoriginalhotplugorder.Thisinformation *islostafterdriverisloadednexttime.Thesnapshotisusedinorderto *restorelinkresourcetoitspreviousstatesouserwillgetconsistent *linkcapabilityallocationacrossreboot. *
*/ void dc_get_cur_link_res_map(conststruct dc *dc, uint32_t *map);
/* This function restores link resource allocation state from a snapshot *@dc:pointertodcofthedmcallingthis *@map:adclinkresourcesnapshotdefinedinternallytodc. * *DMneedstocallthisfunctionafterinitiallinkdetectiononbootand *beforefirstcommitstreamstorestorelinkresourceallocationstate *frompreviousbootsession. * *Someofthelinkresourceisusingfirstcomefirstservepolicy. *Theallocationmappingdependsonoriginalhotplugorder.Thisinformation *islostafterdriverisloadednexttime.Thesnapshotisusedinorderto *restorelinkresourcetoitspreviousstatesouserwillgetconsistent *linkcapabilityallocationacrossreboot. *
*/ void dc_restore_link_res_map(conststruct dc *dc, uint32_t *map);
/* TODO: this is not meant to be exposed to DM. Should switch to stream update *interfacei.estream_update->dsc_config
*/ bool dc_link_update_dsc_config(struct pipe_ctx *pipe_ctx);
/* translate a raw link rate data to bandwidth in kbps */
uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(conststruct dc *dc, uint8_t bw);
/* determine the optimal bandwidth given link and required bw. *@link-currentdetectedlink *@req_bw-requestedbandwidthinkbps *@link_settings-returnedmostoptimallinksettingsthatcanfitthe *requestedbandwidth *return-falseiflinkcan'tsupportrequestedbandwidth,trueiflink *settingsisfound.
*/ bool dc_link_decide_edp_link_settings(struct dc_link *link, struct dc_link_settings *link_settings,
uint32_t req_bw);
/* return the max dp link settings can be driven by the link without considering *connectedRXdeviceanditscapability
*/ bool dc_link_dp_get_max_link_enc_cap(conststruct dc_link *link, struct dc_link_settings *max_link_enc_cap);
/* determine when the link is driving MST mode, what DP link channel coding *formatwillbeused.ThedecisionwillremainunchangeduntilnextHPDevent. * *@link-alinkwithDPRXconnection *return-ifstreamiscommittedtothislinkwithMSTsignaltype,typeof *channelcodingformatdcwillchoose.
*/ enum dp_link_encoding dc_link_dp_mst_decide_link_encoding_format( conststruct dc_link *link);
/* get max dp link settings the link can enable with all things considered. (i.e *TX/RX/Cablecapabilitiesanddpoverridepolicies. * *@link-alinkwithDPRXconnection *return-maxdplinksettingsthelinkcanenable. *
*/ conststruct dc_link_settings *dc_link_get_link_cap(conststruct dc_link *link);
/* Get the highest encoding format that the link supports; highest meaning the *encodingformatwhichsupportsthemaximumbandwidth. * *@link-alinkwithDPRXconnection *return-highestencodingformatlinksupports.
*/ enum dc_link_encoding_format dc_link_get_highest_encoding_format(conststruct dc_link *link);
/* Check if a RX (ex. DP sink, MST hub, passive or active dongle) is connected *toalinkwithdpconnectorsignaltype. *@link-alinkwithdpconnectorsignaltype *return-trueifconnected,falseotherwise
*/ bool dc_link_is_dp_sink_present(struct dc_link *link);
/* Force DP lane settings update to main-link video signal and notify the change *toDPRXviaDPCD.Thisisadebuginterfaceusedforvideosignalintegrity *tuningpurpose.TheinterfaceassumeslinkhasalreadybeenenabledwithDP *signal. * *@lt_settings-acontainerstructurewithdesiredhw_lane_settings
*/ void dc_link_set_drive_settings(struct dc *dc, struct link_training_settings *lt_settings, struct dc_link *link);
/* Enable a test pattern in Link or PHY layer in an active link for compliance *testordebuggingpurpose.Thetestpatternwillremainuntilnextun-plug. * *@link-activelinkwithDPsignaloutputenabled. *@test_pattern-desiredtestpatterntooutput. *NOTE:settoDP_TEST_PATTERN_VIDEO_MODEtodisableprevioustestpattern. *@test_pattern_color_space-forvideotestpatternchooseadesiredcolor *space. *@p_link_settings-ForPHYpatternchooseadesiredlinksettings *@p_custom_pattern-sometestpatternwillrequireacustominputto *customizesomepatterndetails.OtherwisekeepittoNULL. *@cust_pattern_size-sizeofthecustompatterninput. *
*/ bool dc_link_dp_set_test_pattern( struct dc_link *link, enum dp_test_pattern test_pattern, enum dp_test_pattern_color_space test_pattern_color_space, conststruct link_training_settings *p_link_settings, constunsignedchar *p_custom_pattern, unsignedint cust_pattern_size);
/* Force DP link settings to always use a specific value until reboot to a *specificlink.Iflinkhasalreadybeenenabled,theinterfacewillalso *switchtodesiredlinksettingsimmediately.Thisisadebuginterfaceto *genericdpissuetroubleshooting.
*/ void dc_link_set_preferred_link_settings(struct dc *dc, struct dc_link_settings *link_setting, struct dc_link *link);
/* Force DP link to customize a specific link training behavior by overriding to *standardDPspecsdefinedprotocol.Thisisadebuginterfacetotroubleshoot *displayspecificlinktrainingissuesorapplysomedisplayspecific *workaroundinlinktraining. * *@link_settings-ifnotNULL,forcepreferredlinksettingstothelink. *@lt_override-asetofoverridepointers.IfanypointerisnoneNULL,dc *willapplythisparticularoverrideinfuturelinktraining.IfNULLis *passedin,dcresetspreviousoverrides. *NOTE:DMmustkeepthememoryfromoverridepointersuntilDMresetspreferred *trainingsettings.
*/ void dc_link_set_preferred_training_settings(struct dc *dc, struct dc_link_settings *link_setting, struct dc_link_training_overrides *lt_overrides, struct dc_link *link, bool skip_immediate_retrain);
/* return - true if FEC is supported with connected DP RX, false otherwise */ bool dc_link_is_fec_supported(conststruct dc_link *link);
/* query FEC enablement policy to determine if FEC will be enabled by dc during *linkenablement. *return-trueifFECshouldbeenabled,falseotherwise.
*/ bool dc_link_should_enable_fec(conststruct dc_link *link);
/* determine lttpr mode the current link should be enabled with a specific link *settings.
*/ enum lttpr_mode dc_link_decide_lttpr_mode(struct dc_link *link, struct dc_link_settings *link_setting);
/* Force DP RX to update its power state. *NOTE:thisinterfacedoesn'tupdatedpmain-link.Callingthisfunctionwill *causeDPTXmain-linkandDPRXpowerstatesoutofsync.DMhastorestore *RXpowerstatebackuponfinishDMspecificexecutionrequiringDPRXina *specificpowerstate. *@on-truetosetDPRXinD0powerstate,falsetosetDPRXinD3power *state.
*/ void dc_link_dp_receiver_power_ctrl(struct dc_link *link, bool on);
/* Force link to read base dp receiver caps from dpcd 000h - 00Fh and overwrite *currentvaluereadfromextendedreceivercapfrom02200h-0220Fh. *SomeDPRXhasproblemsofprovidingaccurateDPreceivercapsfromextended *field,thisinterfaceisaworkaroundtorevertlinkbacktousebasecaps.
*/ void dc_link_overwrite_extended_receiver_cap( struct dc_link *link);
/* On eDP links this function call will stall until T12 has elapsed. *Ifthepanelisnotinpoweroffstate,thisfunctionwillreturn *immediately.
*/ bool dc_link_wait_for_t12(struct dc_link *link);
/* Determine if dp trace has been initialized to reflect upto date result * *return-trueiftraceisinitializedandhasvaliddata.Falsedptrace *doesn'thavevalidresult.
*/ bool dc_dp_trace_is_initialized(struct dc_link *link);
/* Query a dp trace flag to indicate if the current dp trace data has been *loggedbefore
*/ bool dc_dp_trace_is_logged(struct dc_link *link, bool in_detection);
/* Set dp trace flag to indicate whether DM has already logged the current dp *tracedata.DMcansetis_loggedtotrueuponloggingandcheck *dc_dp_trace_is_loggedbeforeloggingtoavoidloggingthesameresulttwice.
*/ void dc_dp_trace_set_is_logged_flag(struct dc_link *link, bool in_detection, bool is_logged);
/* Obtain driver time stamp for last dp link training end. The time stamp is *formattedbasedondm_get_timestampDMfunction. *@in_detection-truetogetlinktrainingendtimestampoflastlink *trainingindetectionsequence.falsetogetlinktrainingendtimestamp *oflastlinktrainingincommit(dpms)sequence
*/ unsignedlonglong dc_dp_trace_get_lt_end_timestamp(struct dc_link *link, bool in_detection);
/* Get how many link training attempts dc has done with latest sequence. *@in_detection-truetogetlinktrainingcountoflastlink *trainingindetectionsequence.falsetogetlinktrainingcountoflastlink *trainingincommit(dpms)sequence
*/ conststruct dp_trace_lt_counts *dc_dp_trace_get_lt_counts(struct dc_link *link, bool in_detection);
/* Get how many link loss has happened since last link training attempts */ unsignedint dc_dp_trace_get_link_loss_count(struct dc_link *link);
/* Sink Interfaces - A sink corresponds to a display output device */
struct dc_container_id { // 128bit GUID in binary form unsignedchar guid[16]; // 8 byte port ID -> ELD.PortID unsignedint portId[2]; // 128bit GUID in binary formufacturer name -> ELD.ManufacturerName unsignedshort manufacturerName; // 2 byte product code -> ELD.ProductCode unsignedshort productCode;
};
struct dc_sink_dsc_caps { // 'true' if these are virtual DPCD's DSC caps (immediately upstream of sink in MST topology), // 'false' if they are sink's DSC caps bool is_virtual_dpcd_dsc; // 'true' if MST topology supports DSC passthrough for sink // 'false' if MST topology does not support DSC passthrough bool is_dsc_passthrough_supported; struct dsc_dec_dpcd_caps dsc_dec_caps;
};
struct dc_sink_hblank_expansion_caps { // 'true' if these are virtual DPCD's HBlank expansion caps (immediately upstream of sink in MST topology), // 'false' if they are sink's HBlank expansion caps bool is_virtual_dpcd_hblank_expansion; struct hblank_expansion_dpcd_caps dpcd_caps;
};
/* private to DC core */ struct dc_link *link; struct dc_context *ctx;
uint32_t sink_id;
/* private to dc_sink.c */ // refcount must be the last member in dc_sink, since we want the // sink structure to be logically cloneable up to (but not including) // refcount struct kref refcount;
};
bool dc_is_cursor_limit_pending(struct dc *dc); bool dc_can_clear_cursor_limit(struct dc *dc);
#endif/* DC_INTERFACE_H_ */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.90Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.