From 9370bb92b2d16684ee45cf24e879c93c509162da Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Thu, 19 Dec 2024 01:47:39 +0000 Subject: [PATCH] add wifi6 8852be driver --- kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.c | 25 ++++++------------------- 1 files changed, 6 insertions(+), 19 deletions(-) diff --git a/kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.c b/kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.c index d02d5f1..ce0bce8 100644 --- a/kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.c +++ b/kernel/drivers/media/platform/mtk-vcodec/venc_drv_if.c @@ -1,18 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2016 MediaTek Inc. * Author: Daniel Hsiao <daniel.hsiao@mediatek.com> * Jungchang Tsao <jungchang.tsao@mediatek.com> * Tiffany Lin <tiffany.lin@mediatek.com> - * - * This program is free software; you can redistribute it and/or - * modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #include <linux/interrupt.h> @@ -24,10 +15,6 @@ #include "mtk_vcodec_enc.h" #include "mtk_vcodec_enc_pm.h" -#include "mtk_vpu.h" - -const struct venc_common_if *get_h264_enc_comm_if(void); -const struct venc_common_if *get_vp8_enc_comm_if(void); int venc_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) { @@ -35,10 +22,10 @@ switch (fourcc) { case V4L2_PIX_FMT_VP8: - ctx->enc_if = get_vp8_enc_comm_if(); + ctx->enc_if = &venc_vp8_if; break; case V4L2_PIX_FMT_H264: - ctx->enc_if = get_h264_enc_comm_if(); + ctx->enc_if = &venc_h264_if; break; default: return -EINVAL; @@ -46,7 +33,7 @@ mtk_venc_lock(ctx); mtk_vcodec_enc_clock_on(&ctx->dev->pm); - ret = ctx->enc_if->init(ctx, (unsigned long *)&ctx->drv_handle); + ret = ctx->enc_if->init(ctx); mtk_vcodec_enc_clock_off(&ctx->dev->pm); mtk_venc_unlock(ctx); @@ -98,7 +85,7 @@ { int ret = 0; - if (ctx->drv_handle == 0) + if (!ctx->drv_handle) return 0; mtk_venc_lock(ctx); @@ -107,7 +94,7 @@ mtk_vcodec_enc_clock_off(&ctx->dev->pm); mtk_venc_unlock(ctx); - ctx->drv_handle = 0; + ctx->drv_handle = NULL; return ret; } -- Gitblit v1.6.2