disp: msm: dp: free DP sim ports during DP sim disable

DP sim ports created during DP sim enable aren't cleared
during disable path. This would retain the last status of
the DP sim port or the connector. This would impact the
next iteration of DP sim test, if done without device
reset. This change will set the port number to 0 during
DP sim disable and clear the memory allocated for these
ports.

Change-Id: I386a62e87fcaf006db8dd18e5751b33bbe70fc9b
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Tento commit je obsažen v:
Sandeep Gangadharaiah
2022-08-29 14:28:31 -07:00
rodič 001fa8da90
revize 2e9d68e174
3 změnil soubory, kde provedl 14 přidání a 5 odebrání

Zobrazit soubor

@@ -342,6 +342,10 @@ int dp_sim_update_port_num(struct dp_aux_bridge *bridge, u32 port_num)
return -EINVAL;
sim_dev = to_dp_sim_dev(bridge);
DP_INFO("Update port count from %d to %d\n", port_num, sim_dev->port_num);
if (sim_dev->port_num > port_num && sim_dev->ports)
sim_dev->port_num = port_num;
if (port_num > sim_dev->port_num) {
ports = devm_kzalloc(sim_dev->dev,