hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
....@@ -1,23 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * Author: PC Chen <pc.chen@mediatek.com>
45 * Tiffany Lin <tiffany.lin@mediatek.com>
5
-*
6
-* This program is free software; you can redistribute it and/or modify
7
-* it under the terms of the GNU General Public License version 2 as
8
-* published by the Free Software Foundation.
9
-*
10
-* This program is distributed in the hope that it will be useful,
11
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
-* GNU General Public License for more details.
146 */
157
168 #include <linux/module.h>
179
1810 #include "mtk_vcodec_drv.h"
1911 #include "mtk_vcodec_util.h"
20
-#include "mtk_vpu.h"
2112
2213 /* For encoder, this will enable logs in venc/*/
2314 bool mtk_vcodec_dbg;
....@@ -50,14 +41,11 @@
5041 struct device *dev = &ctx->dev->plat_dev->dev;
5142
5243 mem->va = dma_alloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL);
53
-
5444 if (!mem->va) {
5545 mtk_v4l2_err("%s dma_alloc size=%ld failed!", dev_name(dev),
5646 size);
5747 return -ENOMEM;
5848 }
59
-
60
- memset(mem->va, 0, size);
6149
6250 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va);
6351 mtk_v4l2_debug(3, "[%d] - dma = 0x%lx", ctx->id,