forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/media/platform/mtk-mdp/mtk_mdp_vpu.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2015-2016 MediaTek Inc.
34 * Author: Houlong Wei <houlong.wei@mediatek.com>
45 * Ming Hsiu Tsai <minghsiu.tsai@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 "mtk_mdp_core.h"
....@@ -23,7 +15,7 @@
2315 return container_of(vpu, struct mtk_mdp_ctx, vpu);
2416 }
2517
26
-static void mtk_mdp_vpu_handle_init_ack(struct mdp_ipi_comm_ack *msg)
18
+static void mtk_mdp_vpu_handle_init_ack(const struct mdp_ipi_comm_ack *msg)
2719 {
2820 struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)
2921 (unsigned long)msg->ap_inst;
....@@ -34,10 +26,11 @@
3426 vpu->inst_addr = msg->vpu_inst_addr;
3527 }
3628
37
-static void mtk_mdp_vpu_ipi_handler(void *data, unsigned int len, void *priv)
29
+static void mtk_mdp_vpu_ipi_handler(const void *data, unsigned int len,
30
+ void *priv)
3831 {
39
- unsigned int msg_id = *(unsigned int *)data;
40
- struct mdp_ipi_comm_ack *msg = (struct mdp_ipi_comm_ack *)data;
32
+ const struct mdp_ipi_comm_ack *msg = data;
33
+ unsigned int msg_id = msg->msg_id;
4134 struct mtk_mdp_vpu *vpu = (struct mtk_mdp_vpu *)
4235 (unsigned long)msg->ap_inst;
4336 struct mtk_mdp_ctx *ctx;