vdec: reduce and adjust amvdec canvas num. [2/2]
authorshihong.zheng <shihong.zheng@amlogic.com>
Mon, 20 Jul 2020 07:04:48 +0000 (15:04 +0800)
committerShihong Zheng <shihong.zheng@amlogic.com>
Mon, 10 Aug 2020 12:05:11 +0000 (05:05 -0700)
PD#SWPL-29996

Problem:
canvas saving in video decoder.

Solution:
reduce and adjust the range of amvdec canvas index.

Verify:
S905X2

Change-Id: I82b251191fda4fa729e225b2973a85b8230916e6
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
drivers/frame_provider/decoder/utils/vdec.c

index 537092703e96aaeb11a1a0fc2bedb8f89bf112c3..5d819f8f28dee65338f357d9a715eed62692d44d 100644 (file)
@@ -516,9 +516,6 @@ static int get_canvas_ex(int type, int id)
        flags = vdec_canvas_lock(vdec_core);
 
        for (i = 0; i < CANVAS_MAX_SIZE; i++) {
-               /*0x10-0x15 has been used by rdma*/
-               if ((i >= 0x10) && (i <= 0x15))
-                               continue;
                if ((canvas_stat[i].type == type) &&
                        (canvas_stat[i].id & (1 << id)) == 0) {
                        canvas_stat[i].canvas_used_flag++;
@@ -534,9 +531,6 @@ static int get_canvas_ex(int type, int id)
        }
 
        for (i = 0; i < CANVAS_MAX_SIZE; i++) {
-               /*0x10-0x15 has been used by rdma*/
-               if ((i >= 0x10) && (i <= 0x15))
-                               continue;
                if (canvas_stat[i].type == 0) {
                        canvas_stat[i].type = type;
                        canvas_stat[i].canvas_used_flag = 1;