gdc: reset alloc flag when free dma buffer [2/2]
authorJian Cao <jian.cao@amlogic.com>
Tue, 22 Jan 2019 09:16:17 +0000 (17:16 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 25 Jan 2019 08:39:30 +0000 (00:39 -0800)
PD#SWPL-4354

Problem:
alloc flag is not correct when free dma buffer

Solution:
reset alloc flag when free dma buffer

Verify:
test pass on g12a-u200

Change-Id: Idfc0be5b394d18799232f6239b3f6c6df9181ce0
Signed-off-by: Jian Cao <jian.cao@amlogic.com>
drivers/amlogic/media/gdc/app/gdc_dmabuf.c

index 2f4fe59..1ade0e4 100644 (file)
@@ -418,6 +418,7 @@ int gdc_dma_buffer_free(struct aml_dma_buffer *buffer, int index)
                return (-EINVAL);
        }
        aml_dma_put(buf);
+       buffer->gd_buffer[index].alloc = 0;
        return 0;
 }