Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5625500 authored by Siva Yarravarapu's avatar Siva Yarravarapu Committed by Ujwal Patel
Browse files

mdss: mdp: secure buffer is unmaped without iommu attached



For secure content/buffers, it is a requirement that IOMMU is attached
before un-mapping can be called, otherwise the scm call to unmap the
buffer will not be successful. In the current implementation it is
possible to unmap buffer while going into suspend without IOMMU being
attached which leads to secure playback failures in subsequent sessions.
Fix this by ensuring IOMMU is attached before buffer is freed/unmapped.

Change-Id: I29cdce834356b45f05fc75ec07d1c6fa0fcf2d69
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
Signed-off-by: default avatarSiva Yarravarapu <sivay@codeaurora.org>
parent 3a82db8d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -714,9 +714,10 @@ void mdss_mdp_data_free(struct mdss_mdp_data *data)
{
	int i;

	mdss_iommu_ctrl(1);
	for (i = 0; i < data->num_planes && data->p[i].len; i++)
		mdss_mdp_put_img(&data->p[i]);

	mdss_iommu_ctrl(0);
	data->num_planes = 0;
}