forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/qcom/venus/hfi_msgs.c
....@@ -1,16 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
34 * Copyright (C) 2017 Linaro Ltd.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 and
7
- * only version 2 as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
145 */
156 #include <linux/hash.h>
167 #include <linux/list.h>
....@@ -147,7 +138,7 @@
147138 struct hfi_msg_event_notify_pkt *pkt)
148139 {
149140 if (pkt)
150
- dev_dbg(core->dev,
141
+ dev_dbg(core->dev, VDBGH
151142 "sys error (session id:%x, data1:%x, data2:%x)\n",
152143 pkt->shdr.session_id, pkt->event_data1,
153144 pkt->event_data2);
....@@ -161,7 +152,7 @@
161152 {
162153 struct device *dev = core->dev;
163154
164
- dev_dbg(dev, "session error: event id:%x, session id:%x\n",
155
+ dev_dbg(dev, VDBGH "session error: event id:%x, session id:%x\n",
165156 pkt->event_data1, pkt->shdr.session_id);
166157
167158 if (!inst)
....@@ -256,7 +247,7 @@
256247 /* bad packet */
257248 return;
258249
259
- dev_dbg(dev, "F/W version: %s\n", (u8 *)&pkt->data[1]);
250
+ dev_dbg(dev, VDBGL "F/W version: %s\n", (u8 *)&pkt->data[1]);
260251 }
261252
262253 static void hfi_sys_property_info(struct venus_core *core,
....@@ -266,7 +257,7 @@
266257 struct device *dev = core->dev;
267258
268259 if (!pkt->num_properties) {
269
- dev_dbg(dev, "%s: no properties\n", __func__);
260
+ dev_dbg(dev, VDBGL "no properties\n");
270261 return;
271262 }
272263
....@@ -275,7 +266,7 @@
275266 sys_get_prop_image_version(dev, pkt);
276267 break;
277268 default:
278
- dev_dbg(dev, "%s: unknown property data\n", __func__);
269
+ dev_dbg(dev, VDBGL "unknown property data\n");
279270 break;
280271 }
281272 }
....@@ -306,7 +297,7 @@
306297 static void hfi_sys_idle_done(struct venus_core *core, struct venus_inst *inst,
307298 void *packet)
308299 {
309
- dev_dbg(core->dev, "sys idle\n");
300
+ dev_dbg(core->dev, VDBGL "sys idle\n");
310301 }
311302
312303 static void hfi_sys_pc_prepare_done(struct venus_core *core,
....@@ -314,7 +305,8 @@
314305 {
315306 struct hfi_msg_sys_pc_prep_done_pkt *pkt = packet;
316307
317
- dev_dbg(core->dev, "pc prepare done (error %x)\n", pkt->error_type);
308
+ dev_dbg(core->dev, VDBGL "pc prepare done (error %x)\n",
309
+ pkt->error_type);
318310 }
319311
320312 static unsigned int
....@@ -396,8 +388,7 @@
396388 case HFI_PROPERTY_CONFIG_VDEC_ENTROPY:
397389 break;
398390 default:
399
- dev_dbg(dev, "%s: unknown property id:%x\n", __func__,
400
- pkt->data[0]);
391
+ dev_dbg(dev, VDBGM "unknown property id:%x\n", pkt->data[0]);
401392 return;
402393 }
403394
....@@ -448,6 +439,8 @@
448439
449440 inst->error = pkt->error_type;
450441 complete(&inst->done);
442
+ if (inst->ops->flush_done)
443
+ inst->ops->flush_done(inst);
451444 }
452445
453446 static void hfi_session_etb_done(struct venus_core *core,