```mermaid
graph TB
    Start[系统启动] --> Init[TypeC/PD初始化]
    Init --> CCDetect[CC检测状态机]

subgraph CC状态机
    CCDetect --> Unattached[Unattached]
    Unattached --> AttachWait[AttachWait]
    AttachWait --> Attached[Attached]
    
    Attached --> PDInit[PD通信初始化]
end

subgraph PD通信
    PDInit --> Capability[Source/Sink Capability交换]
    Capability --> Contract[建立显式合同]
    Contract --> DataRole[数据角色确定]
    
    DataRole --> VDMInit[VDM初始化]
end

subgraph VDM交互 
    VDMInit --> DiscoverID[发现身份]
    DiscoverID --> SVIDs[获取SVID]
    SVIDs --> Modes[发现Mode]
    Modes --> EnterMode[进入Mode]
end

subgraph DisplayPort功能
    EnterMode --> DPStatus[DP状态更新]
    DPStatus --> DPConfig[DP配置]
    DPConfig --> HPDHandle[HPD处理]
    HPDHandle --> Display[视频显示]
end

subgraph 错误处理
    CCDetect --> ErrorRecovery[错误恢复]
    PDInit --> HardReset[Hard Reset]
    VDMInit --> ExitMode[退出Mode]
end

subgraph 电源管理
    Attached --> VbusCtrl[VBUS控制]
    VbusCtrl --> PowerRole[电源角色]
    PowerRole --> VCONNCtrl[VCONN控制]
end
```