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

This reverts commit 2e9d68e174.

Change-Id: I02602dd6e1add1ac1a2ec474625a44880c0f45d7
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Signed-off-by: V S Ganga VaraPrasad (VARA) Adabala <quic_vadabala@quicinc.com>
This commit is contained in:
V S Ganga VaraPrasad (VARA) Adabala
2022-09-24 23:03:41 +05:30
parent 543b4d62d4
commit 65216e3693
3 changed files with 5 additions and 14 deletions

View File

@@ -121,8 +121,6 @@ static void dp_debug_disable_sim_mode(struct dp_debug_private *debug,
debug->sim_mode &= ~mode_mask;
dp_sim_set_sim_mode(debug->sim_bridge, debug->sim_mode);
dp_sim_update_port_num(debug->sim_bridge, 0);
/* switch to normal mode */
if (!debug->sim_mode)
debug->aux->set_sim_mode(debug->aux, NULL);

View File

@@ -342,10 +342,6 @@ 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,

View File

@@ -1086,15 +1086,13 @@ int dp_mst_sim_update(void *mst_sim_context, u32 port_num,
kfree(ctx->ports);
ctx->port_num = 0;
if (port_num) {
ctx->ports = kcalloc(port_num, sizeof(*ports), GFP_KERNEL);
if (!ctx->ports) {
rc = -ENOMEM;
goto fail;
}
ctx->port_num = port_num;
}
ctx->port_num = port_num;
for (i = 0; i < port_num; i++) {
ctx->ports[i] = ports[i];
if (ports[i].edid_size) {
@@ -1120,7 +1118,6 @@ fail:
for (i = 0; i < ctx->port_num; i++)
kfree(ctx->ports[i].edid);
kfree(ctx->ports);
ctx->port_num = 0;
}
mutex_unlock(&ctx->session_lock);