Commit graph

15 commits

Author SHA1 Message Date
Arun Kumar K 3a9677063f [media] s5p-mfc: Add support for VP8 encoder
MFC v7 supports VP8 encoding and this patch adds support
for it in the driver.

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>
2013-08-18 07:14:23 -03:00
Arun Kumar K 5441e9dafd [media] s5p-mfc: Core support for MFC v7
Adds variant data and core support for the MFC v7 firmware

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>
2013-08-18 07:09:49 -03:00
Arun Kumar K 722b979e55 [media] s5p-mfc: Rename IS_MFCV6 macro
The MFC v6 specific code holds good for MFC v7 also as
the v7 version is a superset of v6 and the HW interface
remains more or less similar. This patch renames the macro
IS_MFCV6() to IS_MFCV6_PLUS() so that it can be used
for v7 also.

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>
2013-08-18 07:08:34 -03:00
Andrzej Hajda ac5f867fbf [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
This patch fixes a bug which caused overwriting h264 codec
parameters by mpeg4 parameters during V4L2 control setting.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-03 15:56:21 -03:00
Arun Kumar K fc906b6d18 [media] s5p-mfc: Remove special clock usage in driver
MFC uses two clocks - MFC gate clock and special clock
which is named as "sclk_mfc" in exynos4 and "aclk_333" in
exynos5 SoC. The driver was doing just a clk_prepare on
this special clock without a clk_enable call. As this
sclk is the parent of gate clock, it gets prepared and
enabled along with the gate clock. So there is no need
for the driver to use this sclk. This patch removes the
sclk usage from driver.

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@redhat.com>
2013-06-03 15:52:33 -03:00
Arun Kumar K e9d98ddc0a [media] s5p-mfc: Update v6 encoder buffer alloc
MFC v6 needs minimum number of output buffers to be queued
for encoder depending on the stream type and profile.
The patch modifies the driver so that encoding cannot be
started with lesser number of OUTPUT buffers than required.
This also fixes the crash happeninig during multi instance
encoder-decoder simultaneous run due to memory allocation
happening from interrupt context.

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@redhat.com>
2013-06-03 15:17:07 -03:00
Kamil Debski 317b4ca498 [media] s5p-mfc: Change internal buffer allocation from vb2 ops to dma_alloc_coherent
Change internal buffer allocation from vb2 memory ops call to direct
calls of dma_alloc_coherent. This change shortens the code and makes it
much more readable.

Signed-off-by: Kamil Debski <k.debski@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>
2013-01-06 09:59:02 -02:00
Kamil Debski 2e731e443f [media] s5p-mfc: Move firmware allocation point to avoid allocation problems
Move firmware allocation from open to probe to avoid problems
when using CMA for allocation. In certain circumstances CMA may allocate
buffer that is not in the beginning of the MFC memory area.

Signed-off-by: Kamil Debski <k.debski@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>
2013-01-06 09:57:57 -02:00
Arun Kumar K 8f23cc0222 [media] s5p-mfc: Flush DPB buffers during stream off
Flushing of delay DPB buffers have to be done during stream off.
In MFC v6, it is done with a risc to host command.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:54:55 -02:00
Jeongtae Park f96f3cfa0b [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x
Multi Format Codec 6.x is a hardware video coding acceleration
module present in new Exynos5 SoC series. It is capable of
handling several new video codecs for decoding and encoding.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Signed-off-by: Jaeryul Oh <jaeryul.oh@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 23:08:31 -03:00
Arun Kumar K 8f532a7fec [media] s5p-mfc: Add MFC variant data to device context
MFC variant data replaces various macros used in the driver
which will change in a different version of MFC hardware.
Also does a cleanup of MFC context structure and common files.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Signed-off-by: Jaeryul Oh <jaeryul.oh@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:57:25 -03:00
Arun Kumar K 43a1ea1f90 [media] s5p-mfc: Update MFCv5 driver for callback based architecture
Modifies the driver to use a callback based architecture
for hardware dependent calls. This architecture is suitable
for supporting co-existence with newer versions of MFC hardware.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:53:37 -03:00
Andrzej Hajda 7fb89eca0f [media] s5p-mfc: optimized code related to working contextes
All code setting/clearing working context bits has been moved
to separate functions. set_bit/clear_bit have been replaced by
non-atomic variants - variable is already guarded by spin_lock.

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>
2012-10-02 13:58:40 -03:00
Andrzej Hajda f9f715a95d [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>
2012-10-02 13:58:04 -03:00
Mauro Carvalho Chehab 2c3fb08b3f [media] rename drivers/media/video as .../platform
The remaining drivers are mostly platform drivers. Name the
dir to reflect it.

It makes sense to latter break it into a few other dirs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:43:09 -03:00
Renamed from drivers/media/video/s5p-mfc/s5p_mfc_common.h (Browse further)