From: Cao Jian Date: Wed, 16 Jun 2021 05:51:44 +0000 (+0800) Subject: picdec: skip putting vframe if current buffer is being in used [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1e8e4174361ed553171538e05bd9fe9f114852e6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git picdec: skip putting vframe if current buffer is being in used [1/1] PD#SWPL-52807 Problem: GIF pictures flicker after quickly switching pictures Solution: skip putting vframe if current buffer is being in used Verify: on t5 Change-Id: Id1366ead409967a6055d5de5413f16774407c778 Signed-off-by: Cao Jian --- diff --git a/drivers/amlogic/media/video_processor/pic_dev/picdec.c b/drivers/amlogic/media/video_processor/pic_dev/picdec.c index edeb424ffae2..0d2825248092 100644 --- a/drivers/amlogic/media/video_processor/pic_dev/picdec.c +++ b/drivers/amlogic/media/video_processor/pic_dev/picdec.c @@ -199,6 +199,10 @@ static void picdec_vf_put(struct vframe_s *vf, void *op_arg) if (!vf) return; INCPTR(putting_ptr); + if (putting_ptr == fill_ptr) { + aml_pr_info(1, "buffer%d is being in use, skip\n", fill_ptr); + return; + } for (i = 0; i < VF_POOL_SIZE; i++) { canvas_addr = index2canvas(i); if (vf->canvas0Addr == canvas_addr) {