forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
34 *
45 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
56 * http://www.samsung.com/
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
117 */
128
139 #include <linux/delay.h>
....@@ -51,7 +47,7 @@
5147 struct firmware *fw_blob;
5248 int i, err = -EINVAL;
5349
54
- /* Firmare has to be present as a separate file or compiled
50
+ /* Firmware has to be present as a separate file or compiled
5551 * into kernel. */
5652 mfc_debug_enter();
5753
....@@ -472,8 +468,10 @@
472468 s5p_mfc_hw_call(dev->mfc_ops, try_run, dev);
473469 /* Wait until instance is returned or timeout occurred */
474470 if (s5p_mfc_wait_for_done_ctx(ctx,
475
- S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET, 0))
471
+ S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET, 0)){
472
+ clear_work_bit_irqsave(ctx);
476473 mfc_err("Err returning instance\n");
474
+ }
477475
478476 /* Free resources */
479477 s5p_mfc_hw_call(dev->mfc_ops, release_codec_buffers, ctx);