linux_dsm_epyc7002/drivers/media/platform/s5p-mfc
Pawel Osciak a0517f5d4d [media] s5p-mfc: Copy timestamps only when a frame is produced
Timestamps for destination buffers are assigned by copying them from
corresponding source buffers when the decode operation results in a frame
being outputted to a destination buffer. But the decision when to do this, i.e.
whether the decode operation on current source buffer produced a destination
frame, is wrongly based on "display status". Display status reflects the status
of the destination buffer, not source.

This used to work for firmwares version <= 6, because in addition to the above,
we'd check the decoded frame type register, which was set to "skipped" if
a destination frame was not produced, exiting early from
s5p_mfc_handle_frame_new().
Firmware >=7 does not set the frame type register for frames that were not
decoded anymore though, which results in us wrongly overwriting timestamps of
previously decoded buffers (firmware reports the same destination buffer address
as previously decoded one if a frame wasn't decoded during current operation).

To do it properly, we should be basing our decision to copy the timestamp on the
status of the source buffer, i.e. "decode status". The decode status register
values are confusing, because in its case "display" means "a frame has been
outputted to a destination buffer". We should copy if "decode and display"
is returned in it. This also works on <= v6 firmware, which behaves in the same
way with regards to decode status register.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
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 <m.chehab@samsung.com>
2014-05-23 14:58:40 -03:00
..
Makefile [media] s5p makefiles: don't override other selections on obj-[ym] 2013-06-20 05:46:00 -03:00
regs-mfc-v6.h [media] s5p-mfc: Add Horizontal and Vertical MV Search Range 2014-02-28 15:18:00 -03:00
regs-mfc-v7.h [media] s5p-mfc: Update driver for v7 firmware 2013-08-18 07:12:31 -03:00
regs-mfc.h [media] media_tree: Fix spelling errors 2013-11-29 14:43:50 -02:00
s5p_mfc_cmd_v5.c [media] media: Remove unnecessary semicolons 2013-10-17 05:51:57 -03:00
s5p_mfc_cmd_v5.h [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_cmd_v6.c [media] media: Remove unnecessary semicolons 2013-10-17 05:51:57 -03:00
s5p_mfc_cmd_v6.h [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x 2012-10-05 23:08:31 -03:00
s5p_mfc_cmd.c [media] s5p-mfc: Rename IS_MFCV6 macro 2013-08-18 07:08:34 -03:00
s5p_mfc_cmd.h [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_common.h [media] s5p-mfc: Add Horizontal and Vertical MV Search Range 2014-02-28 15:18:00 -03:00
s5p_mfc_ctrl.c [media] s5p-mfc: remove meaningless memory bank assignment 2014-03-11 10:29:09 -03:00
s5p_mfc_ctrl.h [media] s5p-mfc: Move firmware allocation point to avoid allocation problems 2013-01-06 09:57:57 -02:00
s5p_mfc_debug.h [media] s5p-mfc: added missing end-of-lines in debug messages 2013-06-03 15:56:54 -03:00
s5p_mfc_dec.c [media] vb2: stop_streaming should return void 2014-04-23 10:12:51 -03:00
s5p_mfc_dec.h [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_enc.c [media] s5p-mfc: fix encoder crash after VIDIOC_STREAMOFF 2014-05-23 14:56:34 -03:00
s5p_mfc_enc.h [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_intr.c [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_intr.h
s5p_mfc_opr_v5.c [media] media: Remove unnecessary semicolons 2013-10-17 05:51:57 -03:00
s5p_mfc_opr_v5.h [media] s5p-mfc: Update MFCv5 driver for callback based architecture 2012-10-05 22:53:37 -03:00
s5p_mfc_opr_v6.c [media] s5p-mfc: Add Horizontal and Vertical MV Search Range 2014-02-28 15:18:00 -03:00
s5p_mfc_opr_v6.h [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x 2012-10-05 23:08:31 -03:00
s5p_mfc_opr.c [media] s5p-mfc: Rename IS_MFCV6 macro 2013-08-18 07:08:34 -03:00
s5p_mfc_opr.h [media] s5p-mfc: Change internal buffer allocation from vb2 ops to dma_alloc_coherent 2013-01-06 09:59:02 -02:00
s5p_mfc_pm.c [media] s5p-mfc: added missing end-of-lines in debug messages 2013-06-03 15:56:54 -03:00
s5p_mfc_pm.h
s5p_mfc.c [media] s5p-mfc: Copy timestamps only when a frame is produced 2014-05-23 14:58:40 -03:00