osd: fix release dma buf error when vout1&2 run at same time.

PD #SWPL-6027

Problem:
dmabuf panic when vout1,vout2 run at same time.

Solution:
When do pandisplay, only release the dma buf displayed
on current vout pipeline.

Verify:
Verify on macroni.

Change-Id: I8951d55f9f56cbfa509bcbe2906a108c5f50dbfe
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
This commit is contained in:
sky zhou
2019-04-06 19:35:34 +08:00
committed by Luan Yuan
parent ad7a5ae992
commit d01180980e

View File

@@ -4753,20 +4753,17 @@ out:
} else
osd_timeline_increase(output_index);
}
/*clear last displayed buffer.*/
for (i = 0; i < HW_OSD_COUNT; i++) {
/* clear osd layer's order */
for (i = start_index; i < osd_count; i++) {
layer_map = &fence_map->layer_map[i];
if (displayed_bufs[i]) {
fput(displayed_bufs[i]);
displayed_bufs[i] = NULL;
}
}
/* clear osd layer's order */
for (i = start_index; i < osd_count; i++) {
layer_map = &fence_map->layer_map[i];
if (layer_map->buf_file)
displayed_bufs[i] = layer_map->buf_file;
if (layer_map->in_fence)
osd_put_fenceobj(layer_map->in_fence);
osd_put_fenceobj(layer_map->in_fence);
osd_hw.order[i] = 0;
}
}