diff options
author | Ming Qian | 2022-03-11 06:16:34 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2022-03-18 07:31:05 +0100 |
commit | 05a03eff34ba7de2d3e50a92961850d5e0f14f34 (patch) | |
tree | 73ffa347519d55e4eb7ff10bdc12d89356389dcf /drivers/media/platform/amphion/vdec.c | |
parent | f445014a2291fbee864754dfec8df42e2a44eb91 (diff) |
media: amphion: fix some error related with undefined reference to __divdi3
1. use ns_to_timespec64 instead of division method
2. use timespec64_to_ns instead of custom macro
3. remove unused custom macro
4. don't modify minus timestamp
5. remove some unused debug timestamp information
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/amphion/vdec.c')
-rw-r--r-- | drivers/media/platform/amphion/vdec.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c index 24ce5ea8ebf7..8f8dfd6ce2c6 100644 --- a/drivers/media/platform/amphion/vdec.c +++ b/drivers/media/platform/amphion/vdec.c @@ -65,9 +65,6 @@ struct vdec_t { u32 drain; u32 ts_pre_count; u32 frame_depth; - s64 ts_start; - s64 ts_input; - s64 timestamp; }; static const struct vpu_format vdec_formats[] = { @@ -693,7 +690,6 @@ static void vdec_buf_done(struct vpu_inst *inst, struct vpu_frame_info *frame) v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_DONE); vpu_inst_lock(inst); - vdec->timestamp = frame->timestamp; vdec->display_frame_count++; vpu_inst_unlock(inst); dev_dbg(inst->dev, "[%d] decoded : %d, display : %d, sequence : %d\n", @@ -713,9 +709,6 @@ static void vdec_stop_done(struct vpu_inst *inst) vdec->params.end_flag = 0; vdec->drain = 0; vdec->ts_pre_count = 0; - vdec->timestamp = VPU_INVALID_TIMESTAMP; - vdec->ts_start = VPU_INVALID_TIMESTAMP; - vdec->ts_input = VPU_INVALID_TIMESTAMP; vdec->params.frame_count = 0; vdec->decoded_frame_count = 0; vdec->display_frame_count = 0; @@ -1228,7 +1221,6 @@ static int vdec_process_output(struct vpu_inst *inst, struct vb2_buffer *vb) struct vdec_t *vdec = inst->priv; struct vb2_v4l2_buffer *vbuf; struct vpu_rpc_buffer_desc desc; - s64 timestamp; u32 free_space; int ret; @@ -1252,12 +1244,6 @@ static int vdec_process_output(struct vpu_inst *inst, struct vb2_buffer *vb) if (free_space < vb2_get_plane_payload(vb, 0) + 0x40000) return -ENOMEM; - timestamp = vb->timestamp; - if (timestamp >= 0 && vdec->ts_start < 0) - vdec->ts_start = timestamp; - if (vdec->ts_input < timestamp) - vdec->ts_input = timestamp; - ret = vpu_iface_input_frame(inst, vb); if (ret < 0) return -ENOMEM; @@ -1333,9 +1319,6 @@ static void vdec_abort(struct vpu_inst *inst) vdec->params.end_flag = 0; vdec->drain = 0; vdec->ts_pre_count = 0; - vdec->timestamp = VPU_INVALID_TIMESTAMP; - vdec->ts_start = VPU_INVALID_TIMESTAMP; - vdec->ts_input = VPU_INVALID_TIMESTAMP; vdec->params.frame_count = 0; vdec->decoded_frame_count = 0; vdec->display_frame_count = 0; @@ -1550,21 +1533,6 @@ static int vdec_get_debug_info(struct vpu_inst *inst, char *str, u32 size, u32 i vdec->codec_info.frame_rate.numerator, vdec->codec_info.frame_rate.denominator); break; - case 10: - { - s64 timestamp = vdec->timestamp; - s64 ts_start = vdec->ts_start; - s64 ts_input = vdec->ts_input; - - num = scnprintf(str, size, "timestamp = %9lld.%09lld(%9lld.%09lld, %9lld.%09lld)\n", - timestamp / NSEC_PER_SEC, - timestamp % NSEC_PER_SEC, - ts_start / NSEC_PER_SEC, - ts_start % NSEC_PER_SEC, - ts_input / NSEC_PER_SEC, - ts_input % NSEC_PER_SEC); - } - break; default: break; } @@ -1599,9 +1567,6 @@ static void vdec_init(struct file *file) vdec = inst->priv; vdec->frame_depth = VDEC_FRAME_DEPTH; - vdec->timestamp = VPU_INVALID_TIMESTAMP; - vdec->ts_start = VPU_INVALID_TIMESTAMP; - vdec->ts_input = VPU_INVALID_TIMESTAMP; memset(&f, 0, sizeof(f)); f.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; |