aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Osciak <posciak@chromium.org>2014-10-21 07:07:07 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-28 13:54:11 -0400
commitf2035364ccbf357ae23bddd6ebf67b35ecdc6a67 (patch)
treee925b74b860b2dd0ff8cb81061ba4c0c7383213f
parent9841dde5d965963cb9d0548054bc2f408cf7d8d5 (diff)
[media] s5p-mfc: fix a race in interrupt flags handling
Interrupt result flags have to be cleared before a hardware job is run. Otherwise, if they are cleared asynchronously, we may end up clearing them after the interrupt for which we wanted to wait has already arrived, thus overwriting the job results that we intended to wait for. To prevent this, clear the flags only under hw_lock and before running a hardware job. Signed-off-by: Pawel Osciak <posciak@chromium.org> Signed-off-by: Kiran AVND <avnd.kiran@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c2
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_dec.c3
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_enc.c1
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c13
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c12
5 files changed, 4 insertions, 27 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
index 6308150e638f..40d8a03a141d 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
@@ -468,7 +468,6 @@ int s5p_mfc_open_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
468 } 468 }
469 469
470 set_work_bit_irqsave(ctx); 470 set_work_bit_irqsave(ctx);
471 s5p_mfc_clean_ctx_int_flags(ctx);
472 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev); 471 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev);
473 if (s5p_mfc_wait_for_done_ctx(ctx, 472 if (s5p_mfc_wait_for_done_ctx(ctx,
474 S5P_MFC_R2H_CMD_OPEN_INSTANCE_RET, 0)) { 473 S5P_MFC_R2H_CMD_OPEN_INSTANCE_RET, 0)) {
@@ -494,7 +493,6 @@ void s5p_mfc_close_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
494{ 493{
495 ctx->state = MFCINST_RETURN_INST; 494 ctx->state = MFCINST_RETURN_INST;
496 set_work_bit_irqsave(ctx); 495 set_work_bit_irqsave(ctx);
497 s5p_mfc_clean_ctx_int_flags(ctx);
498 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev); 496 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev);
499 /* Wait until instance is returned or timeout occurred */ 497 /* Wait until instance is returned or timeout occurred */
500 if (s5p_mfc_wait_for_done_ctx(ctx, 498 if (s5p_mfc_wait_for_done_ctx(ctx,
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index de90465dbc7a..74bcec8228ee 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -334,7 +334,6 @@ static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
334 MFCINST_RES_CHANGE_END)) { 334 MFCINST_RES_CHANGE_END)) {
335 /* If the MFC is parsing the header, 335 /* If the MFC is parsing the header,
336 * so wait until it is finished */ 336 * so wait until it is finished */
337 s5p_mfc_clean_ctx_int_flags(ctx);
338 s5p_mfc_wait_for_done_ctx(ctx, S5P_MFC_R2H_CMD_SEQ_DONE_RET, 337 s5p_mfc_wait_for_done_ctx(ctx, S5P_MFC_R2H_CMD_SEQ_DONE_RET,
339 0); 338 0);
340 } 339 }
@@ -746,7 +745,6 @@ static int s5p_mfc_dec_g_v_ctrl(struct v4l2_ctrl *ctrl)
746 return -EINVAL; 745 return -EINVAL;
747 } 746 }
748 /* Should wait for the header to be parsed */ 747 /* Should wait for the header to be parsed */
749 s5p_mfc_clean_ctx_int_flags(ctx);
750 s5p_mfc_wait_for_done_ctx(ctx, 748 s5p_mfc_wait_for_done_ctx(ctx,
751 S5P_MFC_R2H_CMD_SEQ_DONE_RET, 0); 749 S5P_MFC_R2H_CMD_SEQ_DONE_RET, 0);
752 if (ctx->state >= MFCINST_HEAD_PARSED && 750 if (ctx->state >= MFCINST_HEAD_PARSED &&
@@ -1058,7 +1056,6 @@ static void s5p_mfc_stop_streaming(struct vb2_queue *q)
1058 if (IS_MFCV6_PLUS(dev) && (ctx->state == MFCINST_RUNNING)) { 1056 if (IS_MFCV6_PLUS(dev) && (ctx->state == MFCINST_RUNNING)) {
1059 ctx->state = MFCINST_FLUSH; 1057 ctx->state = MFCINST_FLUSH;
1060 set_work_bit_irqsave(ctx); 1058 set_work_bit_irqsave(ctx);
1061 s5p_mfc_clean_ctx_int_flags(ctx);
1062 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev); 1059 s5p_mfc_hw_call_void(dev->mfc_ops, try_run, dev);
1063 if (s5p_mfc_wait_for_done_ctx(ctx, 1060 if (s5p_mfc_wait_for_done_ctx(ctx,
1064 S5P_MFC_R2H_CMD_DPB_FLUSH_RET, 0)) 1061 S5P_MFC_R2H_CMD_DPB_FLUSH_RET, 0))
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 6a1c890a390d..7f919e42b279 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1663,7 +1663,6 @@ static int s5p_mfc_enc_g_v_ctrl(struct v4l2_ctrl *ctrl)
1663 return -EINVAL; 1663 return -EINVAL;
1664 } 1664 }
1665 /* Should wait for the header to be produced */ 1665 /* Should wait for the header to be produced */
1666 s5p_mfc_clean_ctx_int_flags(ctx);
1667 s5p_mfc_wait_for_done_ctx(ctx, 1666 s5p_mfc_wait_for_done_ctx(ctx,
1668 S5P_MFC_R2H_CMD_SEQ_DONE_RET, 0); 1667 S5P_MFC_R2H_CMD_SEQ_DONE_RET, 0);
1669 if (ctx->state >= MFCINST_HEAD_PARSED && 1668 if (ctx->state >= MFCINST_HEAD_PARSED &&
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 7cf07963187d..0c4fcf2dfd09 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -1178,7 +1178,6 @@ static void s5p_mfc_run_res_change(struct s5p_mfc_ctx *ctx)
1178 1178
1179 s5p_mfc_set_dec_stream_buffer_v5(ctx, 0, 0, 0); 1179 s5p_mfc_set_dec_stream_buffer_v5(ctx, 0, 0, 0);
1180 dev->curr_ctx = ctx->num; 1180 dev->curr_ctx = ctx->num;
1181 s5p_mfc_clean_ctx_int_flags(ctx);
1182 s5p_mfc_decode_one_frame_v5(ctx, MFC_DEC_RES_CHANGE); 1181 s5p_mfc_decode_one_frame_v5(ctx, MFC_DEC_RES_CHANGE);
1183} 1182}
1184 1183
@@ -1192,7 +1191,6 @@ static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame)
1192 last_frame = MFC_DEC_LAST_FRAME; 1191 last_frame = MFC_DEC_LAST_FRAME;
1193 s5p_mfc_set_dec_stream_buffer_v5(ctx, 0, 0, 0); 1192 s5p_mfc_set_dec_stream_buffer_v5(ctx, 0, 0, 0);
1194 dev->curr_ctx = ctx->num; 1193 dev->curr_ctx = ctx->num;
1195 s5p_mfc_clean_ctx_int_flags(ctx);
1196 s5p_mfc_decode_one_frame_v5(ctx, last_frame); 1194 s5p_mfc_decode_one_frame_v5(ctx, last_frame);
1197 return 0; 1195 return 0;
1198 } 1196 }
@@ -1212,7 +1210,6 @@ static int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx, int last_frame)
1212 ctx->consumed_stream, temp_vb->b->v4l2_planes[0].bytesused); 1210 ctx->consumed_stream, temp_vb->b->v4l2_planes[0].bytesused);
1213 spin_unlock_irqrestore(&dev->irqlock, flags); 1211 spin_unlock_irqrestore(&dev->irqlock, flags);
1214 dev->curr_ctx = ctx->num; 1212 dev->curr_ctx = ctx->num;
1215 s5p_mfc_clean_ctx_int_flags(ctx);
1216 if (temp_vb->b->v4l2_planes[0].bytesused == 0) { 1213 if (temp_vb->b->v4l2_planes[0].bytesused == 0) {
1217 last_frame = MFC_DEC_LAST_FRAME; 1214 last_frame = MFC_DEC_LAST_FRAME;
1218 mfc_debug(2, "Setting ctx->state to FINISHING\n"); 1215 mfc_debug(2, "Setting ctx->state to FINISHING\n");
@@ -1273,7 +1270,6 @@ static int s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx)
1273 s5p_mfc_set_enc_stream_buffer_v5(ctx, dst_addr, dst_size); 1270 s5p_mfc_set_enc_stream_buffer_v5(ctx, dst_addr, dst_size);
1274 spin_unlock_irqrestore(&dev->irqlock, flags); 1271 spin_unlock_irqrestore(&dev->irqlock, flags);
1275 dev->curr_ctx = ctx->num; 1272 dev->curr_ctx = ctx->num;
1276 s5p_mfc_clean_ctx_int_flags(ctx);
1277 mfc_debug(2, "encoding buffer with index=%d state=%d\n", 1273 mfc_debug(2, "encoding buffer with index=%d state=%d\n",
1278 src_mb ? src_mb->b->v4l2_buf.index : -1, ctx->state); 1274 src_mb ? src_mb->b->v4l2_buf.index : -1, ctx->state);
1279 s5p_mfc_encode_one_frame_v5(ctx); 1275 s5p_mfc_encode_one_frame_v5(ctx);
@@ -1297,7 +1293,6 @@ static void s5p_mfc_run_init_dec(struct s5p_mfc_ctx *ctx)
1297 0, temp_vb->b->v4l2_planes[0].bytesused); 1293 0, temp_vb->b->v4l2_planes[0].bytesused);
1298 spin_unlock_irqrestore(&dev->irqlock, flags); 1294 spin_unlock_irqrestore(&dev->irqlock, flags);
1299 dev->curr_ctx = ctx->num; 1295 dev->curr_ctx = ctx->num;
1300 s5p_mfc_clean_ctx_int_flags(ctx);
1301 s5p_mfc_init_decode_v5(ctx); 1296 s5p_mfc_init_decode_v5(ctx);
1302} 1297}
1303 1298
@@ -1317,7 +1312,6 @@ static void s5p_mfc_run_init_enc(struct s5p_mfc_ctx *ctx)
1317 s5p_mfc_set_enc_stream_buffer_v5(ctx, dst_addr, dst_size); 1312 s5p_mfc_set_enc_stream_buffer_v5(ctx, dst_addr, dst_size);
1318 spin_unlock_irqrestore(&dev->irqlock, flags); 1313 spin_unlock_irqrestore(&dev->irqlock, flags);
1319 dev->curr_ctx = ctx->num; 1314 dev->curr_ctx = ctx->num;
1320 s5p_mfc_clean_ctx_int_flags(ctx);
1321 s5p_mfc_init_encode_v5(ctx); 1315 s5p_mfc_init_encode_v5(ctx);
1322} 1316}
1323 1317
@@ -1352,7 +1346,6 @@ static int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx)
1352 0, temp_vb->b->v4l2_planes[0].bytesused); 1346 0, temp_vb->b->v4l2_planes[0].bytesused);
1353 spin_unlock_irqrestore(&dev->irqlock, flags); 1347 spin_unlock_irqrestore(&dev->irqlock, flags);
1354 dev->curr_ctx = ctx->num; 1348 dev->curr_ctx = ctx->num;
1355 s5p_mfc_clean_ctx_int_flags(ctx);
1356 ret = s5p_mfc_set_dec_frame_buffer_v5(ctx); 1349 ret = s5p_mfc_set_dec_frame_buffer_v5(ctx);
1357 if (ret) { 1350 if (ret) {
1358 mfc_err("Failed to alloc frame mem\n"); 1351 mfc_err("Failed to alloc frame mem\n");
@@ -1396,6 +1389,8 @@ static void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev)
1396 * Now obtaining frames from MFC buffer 1389 * Now obtaining frames from MFC buffer
1397 */ 1390 */
1398 s5p_mfc_clock_on(); 1391 s5p_mfc_clock_on();
1392 s5p_mfc_clean_ctx_int_flags(ctx);
1393
1399 if (ctx->type == MFCINST_DECODER) { 1394 if (ctx->type == MFCINST_DECODER) {
1400 s5p_mfc_set_dec_desc_buffer(ctx); 1395 s5p_mfc_set_dec_desc_buffer(ctx);
1401 switch (ctx->state) { 1396 switch (ctx->state) {
@@ -1406,12 +1401,10 @@ static void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev)
1406 ret = s5p_mfc_run_dec_frame(ctx, MFC_DEC_FRAME); 1401 ret = s5p_mfc_run_dec_frame(ctx, MFC_DEC_FRAME);
1407 break; 1402 break;
1408 case MFCINST_INIT: 1403 case MFCINST_INIT:
1409 s5p_mfc_clean_ctx_int_flags(ctx);
1410 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd, 1404 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd,
1411 ctx); 1405 ctx);
1412 break; 1406 break;
1413 case MFCINST_RETURN_INST: 1407 case MFCINST_RETURN_INST:
1414 s5p_mfc_clean_ctx_int_flags(ctx);
1415 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd, 1408 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd,
1416 ctx); 1409 ctx);
1417 break; 1410 break;
@@ -1444,12 +1437,10 @@ static void s5p_mfc_try_run_v5(struct s5p_mfc_dev *dev)
1444 ret = s5p_mfc_run_enc_frame(ctx); 1437 ret = s5p_mfc_run_enc_frame(ctx);
1445 break; 1438 break;
1446 case MFCINST_INIT: 1439 case MFCINST_INIT:
1447 s5p_mfc_clean_ctx_int_flags(ctx);
1448 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd, 1440 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd,
1449 ctx); 1441 ctx);
1450 break; 1442 break;
1451 case MFCINST_RETURN_INST: 1443 case MFCINST_RETURN_INST:
1452 s5p_mfc_clean_ctx_int_flags(ctx);
1453 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd, 1444 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd,
1454 ctx); 1445 ctx);
1455 break; 1446 break;
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
index 7b1cf736843c..9aea179943ce 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
@@ -1394,7 +1394,6 @@ static inline void s5p_mfc_set_flush(struct s5p_mfc_ctx *ctx, int flush)
1394 1394
1395 if (flush) { 1395 if (flush) {
1396 dev->curr_ctx = ctx->num; 1396 dev->curr_ctx = ctx->num;
1397 s5p_mfc_clean_ctx_int_flags(ctx);
1398 writel(ctx->inst_no, mfc_regs->instance_id); 1397 writel(ctx->inst_no, mfc_regs->instance_id);
1399 s5p_mfc_hw_call_void(dev->mfc_cmds, cmd_host2risc, dev, 1398 s5p_mfc_hw_call_void(dev->mfc_cmds, cmd_host2risc, dev,
1400 S5P_FIMV_H2R_CMD_FLUSH_V6, NULL); 1399 S5P_FIMV_H2R_CMD_FLUSH_V6, NULL);
@@ -1535,7 +1534,6 @@ static inline void s5p_mfc_run_dec_last_frames(struct s5p_mfc_ctx *ctx)
1535 1534
1536 s5p_mfc_set_dec_stream_buffer_v6(ctx, 0, 0, 0); 1535 s5p_mfc_set_dec_stream_buffer_v6(ctx, 0, 0, 0);
1537 dev->curr_ctx = ctx->num; 1536 dev->curr_ctx = ctx->num;
1538 s5p_mfc_clean_ctx_int_flags(ctx);
1539 s5p_mfc_decode_one_frame_v6(ctx, MFC_DEC_LAST_FRAME); 1537 s5p_mfc_decode_one_frame_v6(ctx, MFC_DEC_LAST_FRAME);
1540} 1538}
1541 1539
@@ -1572,7 +1570,6 @@ static inline int s5p_mfc_run_dec_frame(struct s5p_mfc_ctx *ctx)
1572 spin_unlock_irqrestore(&dev->irqlock, flags); 1570 spin_unlock_irqrestore(&dev->irqlock, flags);
1573 1571
1574 dev->curr_ctx = ctx->num; 1572 dev->curr_ctx = ctx->num;
1575 s5p_mfc_clean_ctx_int_flags(ctx);
1576 if (temp_vb->b->v4l2_planes[0].bytesused == 0) { 1573 if (temp_vb->b->v4l2_planes[0].bytesused == 0) {
1577 last_frame = 1; 1574 last_frame = 1;
1578 mfc_debug(2, "Setting ctx->state to FINISHING\n"); 1575 mfc_debug(2, "Setting ctx->state to FINISHING\n");
@@ -1629,7 +1626,6 @@ static inline int s5p_mfc_run_enc_frame(struct s5p_mfc_ctx *ctx)
1629 spin_unlock_irqrestore(&dev->irqlock, flags); 1626 spin_unlock_irqrestore(&dev->irqlock, flags);
1630 1627
1631 dev->curr_ctx = ctx->num; 1628 dev->curr_ctx = ctx->num;
1632 s5p_mfc_clean_ctx_int_flags(ctx);
1633 s5p_mfc_encode_one_frame_v6(ctx); 1629 s5p_mfc_encode_one_frame_v6(ctx);
1634 1630
1635 return 0; 1631 return 0;
@@ -1651,7 +1647,6 @@ static inline void s5p_mfc_run_init_dec(struct s5p_mfc_ctx *ctx)
1651 temp_vb->b->v4l2_planes[0].bytesused); 1647 temp_vb->b->v4l2_planes[0].bytesused);
1652 spin_unlock_irqrestore(&dev->irqlock, flags); 1648 spin_unlock_irqrestore(&dev->irqlock, flags);
1653 dev->curr_ctx = ctx->num; 1649 dev->curr_ctx = ctx->num;
1654 s5p_mfc_clean_ctx_int_flags(ctx);
1655 s5p_mfc_init_decode_v6(ctx); 1650 s5p_mfc_init_decode_v6(ctx);
1656} 1651}
1657 1652
@@ -1671,7 +1666,6 @@ static inline void s5p_mfc_run_init_enc(struct s5p_mfc_ctx *ctx)
1671 s5p_mfc_set_enc_stream_buffer_v6(ctx, dst_addr, dst_size); 1666 s5p_mfc_set_enc_stream_buffer_v6(ctx, dst_addr, dst_size);
1672 spin_unlock_irqrestore(&dev->irqlock, flags); 1667 spin_unlock_irqrestore(&dev->irqlock, flags);
1673 dev->curr_ctx = ctx->num; 1668 dev->curr_ctx = ctx->num;
1674 s5p_mfc_clean_ctx_int_flags(ctx);
1675 s5p_mfc_init_encode_v6(ctx); 1669 s5p_mfc_init_encode_v6(ctx);
1676} 1670}
1677 1671
@@ -1691,7 +1685,6 @@ static inline int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx)
1691 } 1685 }
1692 1686
1693 dev->curr_ctx = ctx->num; 1687 dev->curr_ctx = ctx->num;
1694 s5p_mfc_clean_ctx_int_flags(ctx);
1695 ret = s5p_mfc_set_dec_frame_buffer_v6(ctx); 1688 ret = s5p_mfc_set_dec_frame_buffer_v6(ctx);
1696 if (ret) { 1689 if (ret) {
1697 mfc_err("Failed to alloc frame mem.\n"); 1690 mfc_err("Failed to alloc frame mem.\n");
@@ -1706,7 +1699,6 @@ static inline int s5p_mfc_run_init_enc_buffers(struct s5p_mfc_ctx *ctx)
1706 int ret; 1699 int ret;
1707 1700
1708 dev->curr_ctx = ctx->num; 1701 dev->curr_ctx = ctx->num;
1709 s5p_mfc_clean_ctx_int_flags(ctx);
1710 ret = s5p_mfc_set_enc_ref_buffer_v6(ctx); 1702 ret = s5p_mfc_set_enc_ref_buffer_v6(ctx);
1711 if (ret) { 1703 if (ret) {
1712 mfc_err("Failed to alloc frame mem.\n"); 1704 mfc_err("Failed to alloc frame mem.\n");
@@ -1755,6 +1747,8 @@ static void s5p_mfc_try_run_v6(struct s5p_mfc_dev *dev)
1755 * Now obtaining frames from MFC buffer */ 1747 * Now obtaining frames from MFC buffer */
1756 1748
1757 s5p_mfc_clock_on(); 1749 s5p_mfc_clock_on();
1750 s5p_mfc_clean_ctx_int_flags(ctx);
1751
1758 if (ctx->type == MFCINST_DECODER) { 1752 if (ctx->type == MFCINST_DECODER) {
1759 switch (ctx->state) { 1753 switch (ctx->state) {
1760 case MFCINST_FINISHING: 1754 case MFCINST_FINISHING:
@@ -1764,12 +1758,10 @@ static void s5p_mfc_try_run_v6(struct s5p_mfc_dev *dev)
1764 ret = s5p_mfc_run_dec_frame(ctx); 1758 ret = s5p_mfc_run_dec_frame(ctx);
1765 break; 1759 break;
1766 case MFCINST_INIT: 1760 case MFCINST_INIT:
1767 s5p_mfc_clean_ctx_int_flags(ctx);
1768 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd, 1761 ret = s5p_mfc_hw_call(dev->mfc_cmds, open_inst_cmd,
1769 ctx); 1762 ctx);
1770 break; 1763 break;
1771 case MFCINST_RETURN_INST: 1764 case MFCINST_RETURN_INST:
1772 s5p_mfc_clean_ctx_int_flags(ctx);
1773 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd, 1765 ret = s5p_mfc_hw_call(dev->mfc_cmds, close_inst_cmd,
1774 ctx); 1766 ctx);
1775 break; 1767 break;