diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2012-08-21 13:05:32 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-02 18:58:04 +0200 |
commit | f9f715a95d07d3868bb30aeb20252b6b05d35d8f (patch) | |
tree | 53a684372a77a28412e06ad66855a6f9c747f000 /drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | |
parent | [media] m5mols: Protect driver data with a mutex (diff) | |
download | linux-f9f715a95d07d3868bb30aeb20252b6b05d35d8f.tar.xz linux-f9f715a95d07d3868bb30aeb20252b6b05d35d8f.zip |
[media] s5p-mfc: added support for end of stream handling in MFC encoder
s5p-mfc encoder after receiving V4L2_ENC_CMD_STOP command
will instruct MFC device to release all encoded frames.
After dequeuing last encoded frame driver will generate
V4L2_EVENT_EOS event.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c index 992303d76b11..0deba6bc687c 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c @@ -98,7 +98,11 @@ int s5p_mfc_alloc_and_load_firmware(struct s5p_mfc_dev *dev) release_firmware(fw_blob); return -EIO; } - dev->bank2 = bank2_base_phys; + /* Valid buffers passed to MFC encoder with LAST_FRAME command + * should not have address of bank2 - MFC will treat it as a null frame. + * To avoid such situation we set bank2 address below the pool address. + */ + dev->bank2 = bank2_base_phys - (1 << MFC_BASE_ALIGN_ORDER); memcpy(s5p_mfc_bitproc_virt, fw_blob->data, fw_blob->size); wmb(); release_firmware(fw_blob); |