|
@@ -1507,30 +1507,6 @@ static int s5p_mfc_encode_one_frame_v6(struct s5p_mfc_ctx *ctx)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static inline int s5p_mfc_get_new_ctx(struct s5p_mfc_dev *dev)
|
|
|
|
-{
|
|
|
|
- unsigned long flags;
|
|
|
|
- int new_ctx;
|
|
|
|
- int cnt;
|
|
|
|
-
|
|
|
|
- spin_lock_irqsave(&dev->condlock, flags);
|
|
|
|
- mfc_debug(2, "Previous context: %d (bits %08lx)\n", dev->curr_ctx,
|
|
|
|
- dev->ctx_work_bits);
|
|
|
|
- new_ctx = (dev->curr_ctx + 1) % MFC_NUM_CONTEXTS;
|
|
|
|
- cnt = 0;
|
|
|
|
- while (!test_bit(new_ctx, &dev->ctx_work_bits)) {
|
|
|
|
- new_ctx = (new_ctx + 1) % MFC_NUM_CONTEXTS;
|
|
|
|
- cnt++;
|
|
|
|
- if (cnt > MFC_NUM_CONTEXTS) {
|
|
|
|
- /* No contexts to run */
|
|
|
|
- spin_unlock_irqrestore(&dev->condlock, flags);
|
|
|
|
- return -EAGAIN;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- spin_unlock_irqrestore(&dev->condlock, flags);
|
|
|
|
- return new_ctx;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static inline void s5p_mfc_run_dec_last_frames(struct s5p_mfc_ctx *ctx)
|
|
static inline void s5p_mfc_run_dec_last_frames(struct s5p_mfc_ctx *ctx)
|
|
{
|
|
{
|
|
struct s5p_mfc_dev *dev = ctx->dev;
|
|
struct s5p_mfc_dev *dev = ctx->dev;
|