msm: mdss: reset the skip buffer flag to avoid memory leak
Pan display path can call buffer alloc and use one of the buffer. It will enable the skip detach enabled for that buffer. This buffer moves to free queue when atomic api stage next set of layers. It can lead to memory leak when atomic API path reuse the same buffer without resetting the detach flag. Ideally, it should be reset for each attach call. Change-Id: I96e2c030669539d8e5dc7205abc233ecc7118bdb Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
parent
8b9bb877e8
commit
c6e6724120
1 changed files with 2 additions and 1 deletions
|
@ -1035,6 +1035,7 @@ static int mdss_mdp_get_img(struct msmfb_data *img,
|
|||
data->addr = 0;
|
||||
data->len = 0;
|
||||
data->mapped = false;
|
||||
data->skip_detach = false;
|
||||
/* return early, mapping will be done later */
|
||||
|
||||
return 0;
|
||||
|
@ -1151,7 +1152,7 @@ int mdss_mdp_data_map(struct mdss_mdp_data *data, bool rotator, int dir)
|
|||
{
|
||||
int i, rc = 0;
|
||||
|
||||
if (!data || !data->num_planes)
|
||||
if (!data || !data->num_planes || data->num_planes > MAX_PLANES)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < data->num_planes; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue