1
0

disp: msm: sde: update input fence after plane state destroy

In few cases, even though input fence is freed, it might
get accessed through debugfs node while dumping fence list.
This change updates input fence to NULL in plane state
destroy once it is freed to prevent accessing it further.

Change-Id: I1a3799249e6a177af87653e17d014d1dad7ca638
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Este cometimento está contido em:
Yashwanth
2020-08-26 16:32:38 +05:30
ascendente 5100a8e9e9
cometimento 312bd53656
2 ficheiros modificados com 2 adições e 0 eliminações

Ver ficheiro

@@ -6150,6 +6150,7 @@ static int _sde_debugfs_fence_status_show(struct seq_file *s, void *data)
pstate->stage);
fence = pstate->input_fence;
SDE_EVT32(DRMID(crtc), fence);
if (fence)
sde_fence_list_dump(fence, &s);
}

Ver ficheiro

@@ -4166,6 +4166,7 @@ static void sde_plane_destroy_state(struct drm_plane *plane,
/* remove ref count for fence */
if (pstate->input_fence)
sde_sync_put(pstate->input_fence);
pstate->input_fence = 0;
/* destroy value helper */
msm_property_destroy_state(&psde->property_info, pstate,