ppmgr: rotate to exit with garbage. [1/1]

PD#SWPL-35488

Problem:
rotate to exit with garbage.

Solution:
after unreg is over, the buffer of ppmgr is released.

Verify:
on X301

Change-Id: I40cd59db0dee442fde034ccfb1c3f1afe86eb3ff
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
This commit is contained in:
renjiang.han
2020-11-03 16:04:20 +08:00
committed by Chris
parent af20988661
commit 49eba5bef4
2 changed files with 11 additions and 6 deletions

View File

@@ -701,6 +701,11 @@ void vf_ppmgr_unreg_provider(void)
vf_unreg_provider(&ppmgr_vf_prov);
#ifdef PPMGR_TB_DETECT
tb_buffer_uninit();
#endif
ppmgr_buffer_uninit();
dec_vfp = NULL;
ppmgr_device.started = 0;
@@ -2977,10 +2982,6 @@ SKIP_DETECT:
}
destroy_ge2d_work_queue(context);
#ifdef PPMGR_TB_DETECT
tb_buffer_uninit();
#endif
ppmgr_buffer_uninit();
while (!kthread_should_stop()) {
/* may not call stop, wait..
* it is killed by SIGTERM,eixt on down_interruptible

View File

@@ -157,7 +157,8 @@ static int ge2d_store_frame_S_YUV444(u32 cur_index)
canvas_read(ydupindex, &cd);
src_index = y_index;
des_index = ydupindex;
if (cs.addr == cd.addr)
return 1;
pr_info("ge2d_canvas_dup ADDR srcy[0x%lx] des[0x%lx] des_index[0x%x]\n",
cs.addr, cd.addr, des_index);
@@ -617,6 +618,7 @@ static void ge2d_keeplastframe_block(int cur_index, int format)
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
u32 y_index2, u_index2, v_index2;
#endif
int ret = -1;
video_module_lock();
@@ -640,7 +642,9 @@ static void ge2d_keeplastframe_block(int cur_index, int format)
switch (format) {
case GE2D_FORMAT_S24_YUV444:
pr_info("GE2D_FORMAT_S24_YUV444\n");
ge2d_store_frame_S_YUV444(cur_index);
ret = ge2d_store_frame_S_YUV444(cur_index);
if (ret > 0)
break;
canvas_update_addr(y_index, keep_phy_addr(keep_y_addr));
#ifdef CONFIG_AMLOGIC_MEDIA_VSYNC_RDMA
canvas_update_addr(y_index2, keep_phy_addr(keep_y_addr));