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>
此提交包含在:
Samantha Tran
2019-12-06 14:52:06 -08:00
提交者 Gerrit - the friendly Code Review server
父節點 d8cabe36c1
當前提交 793d2a33d7
共有 3 個檔案被更改,包括 33 行新增1 行删除

查看文件

@@ -602,6 +602,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms,
{
struct drm_crtc *crtc;
struct drm_crtc_state *old_crtc_state;
struct drm_plane_state *old_plane_state, *new_plane_state;
struct drm_plane *plane;
struct drm_plane_state *plane_state;
@@ -663,6 +664,9 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms,
if (ops & SDE_KMS_OPS_CLEANUP_PLANE_FB) {
SDE_DEBUG("cleanup planes\n");
drm_atomic_helper_cleanup_planes(dev, state);
for_each_oldnew_plane_in_state(state, plane,
old_plane_state, new_plane_state, i)
sde_plane_destroy_fb(old_plane_state);
}
if (ops & SDE_KMS_OPS_SECURE_STATE_CHANGE) {
SDE_DEBUG("secure ctrl\n");