disp: msm: sde: destroy framebuffers after plane cleanup
Add framebuffer destroy immediately following plane cleanup during secure display transition. Set state's fb to NULL after destroying to avoid attempting to destroy fb again during plane state destroy. Previously, framebuffer destroy is happening after the context is detached while plane states are being destroyed. Change-Id: I273ce5b85c30962ea7e0a738a366487c9c85d4df Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

父節點
d8cabe36c1
當前提交
793d2a33d7
@@ -4043,6 +4043,28 @@ static void sde_plane_destroy(struct drm_plane *plane)
|
||||
}
|
||||
}
|
||||
|
||||
void sde_plane_destroy_fb(struct drm_plane_state *state)
|
||||
{
|
||||
struct sde_plane_state *pstate;
|
||||
|
||||
if (!state) {
|
||||
SDE_ERROR("invalid arg state %d\n", !state);
|
||||
return;
|
||||
}
|
||||
|
||||
pstate = to_sde_plane_state(state);
|
||||
|
||||
if (sde_plane_get_property(pstate, PLANE_PROP_FB_TRANSLATION_MODE) ==
|
||||
SDE_DRM_FB_SEC) {
|
||||
/* remove ref count for frame buffers */
|
||||
if (state->fb) {
|
||||
drm_framebuffer_put(state->fb);
|
||||
state->fb = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void sde_plane_destroy_state(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
{
|
||||
|
Reference in New Issue
Block a user