Samsung Exynos MFC driver update
Hi Mauro,
The following changes since commit 34a6b7d093d8fe738ada191b36648d00bc18b7eb:
[media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler
(2012-10-01 17:07:07 -0300)
are available in the git repository at:
git://git.infradead.org/users/kmpark/linux-2.6-samsung v4l_mfc_for_mauro
for you to fetch changes up to 8312d9d2d254ab289a322fcfdba1d1ecf5e36256:
s5p-mfc: Update MFC v4l2 driver to support MFC6.x (2012-10-02 15:28:42 +0200)
This is an update of the s5p-mfc driver and related V4L2 API additions to support the Multi Format Codec device on the Exynos5 SoC series.
----------------------------------------------------------------
Arun Kumar K (4):
v4l: Add fourcc definitions for new formats
v4l: Add control definitions for new H264 encoder features
s5p-mfc: Update MFCv5 driver for callback based architecture
s5p-mfc: Add MFC variant data to device context
Jeongtae Park (2):
s5p-mfc: MFCv6 register definitions
s5p-mfc: Update MFC v4l2 driver to support MFC6.x
Documentation/DocBook/media/v4l/controls.xml | 268 ++-
Documentation/DocBook/media/v4l/pixfmt-nv12m.xml | 17 +-
Documentation/DocBook/media/v4l/pixfmt.xml | 10 +
drivers/media/platform/Kconfig | 4 +-
drivers/media/platform/s5p-mfc/Makefile | 7 +-
drivers/media/platform/s5p-mfc/regs-mfc-v6.h | 408 ++++
drivers/media/platform/s5p-mfc/regs-mfc.h | 41 +
drivers/media/platform/s5p-mfc/s5p_mfc.c | 296 +--
drivers/media/platform/s5p-mfc/s5p_mfc_cmd.c | 109 +-
drivers/media/platform/s5p-mfc/s5p_mfc_cmd.h | 15 +-
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | 166 ++
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.h | 20 +
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c | 156 ++
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.h | 20 +
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 191 +-
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 194 +-
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.h | 1 +
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 258 ++-
drivers/media/platform/s5p-mfc/s5p_mfc_dec.h | 1 +
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 239 ++-
drivers/media/platform/s5p-mfc/s5p_mfc_enc.h | 1 +
drivers/media/platform/s5p-mfc/s5p_mfc_intr.c | 11 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 1386 +-------------
drivers/media/platform/s5p-mfc/s5p_mfc_opr.h | 133 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 1763 ++++++++++++++++++
.../s5p-mfc/{s5p_mfc_shm.h => s5p_mfc_opr_v5.h} | 41 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 1956 ++++++++++++++++++++
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h | 50 +
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 3 +-
drivers/media/platform/s5p-mfc/s5p_mfc_shm.c | 47 -
drivers/media/v4l2-core/v4l2-ctrls.c | 42 +
include/linux/v4l2-controls.h | 41 +
include/linux/videodev2.h | 4 +
33 files changed, 5873 insertions(+), 2026 deletions(-)
create mode 100644 drivers/media/platform/s5p-mfc/regs-mfc-v6.h
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.h
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.h
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
rename drivers/media/platform/s5p-mfc/{s5p_mfc_shm.h => s5p_mfc_opr_v5.h} (76%)
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
create mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.h
delete mode 100644 drivers/media/platform/s5p-mfc/s5p_mfc_shm.c---
Thank you,
Sylwester Nawrocki
Samsung Poland R&D Center
Em Tue, 02 Oct 2012 18:58:47 +0200
Sylwester Nawrocki <[email protected]> escreveu:
Quoted 15 lines
Hi Mauro,
The following changes since commit
34a6b7d093d8fe738ada191b36648d00bc18b7eb:[media] v4l2-ctrls: add a filter function to
v4l2_ctrl_add_handler
(2012-10-01 17:07:07 -0300)are available in the git repository at:
git://git.infradead.org/users/kmpark/linux-2.6-samsungv4l_mfc_for_maurofor you to fetch changes up to
8312d9d2d254ab289a322fcfdba1d1ecf5e36256:s5p-mfc: Update MFC v4l2 driver to support MFC6.x (2012-10-02 15:28:42 +0200)
Quoted 7 lines
This is an update of the s5p-mfc driver and related V4L2 API additions to support the Multi Format Codec device on the Exynos5 SoC series.
----------------------------------------------------------------
Arun Kumar K (4):
v4l: Add fourcc definitions for new formats
v4l: Add control definitions for new H264 encoder features
OK.
Quoted 1 line
s5p-mfc: Update MFCv5 driver for callback based architecture
This one doesn't apply:
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@@ -496,11 -499,14 +498,20 @@@ static int vidioc_reqbufs(struct file *
s5p_mfc_clock_off();
return -ENOMEM;
}++<<<<<<< HEAD
+ if (s5p_mfc_ctx_ready(ctx))
+ set_work_bit_irqsave(ctx);
+ s5p_mfc_try_run(dev);
++=======
+ if (s5p_mfc_ctx_ready(ctx)) {
+ spin_lock_irqsave(&dev->condlock, flags); + set_bit(ctx->num, &dev->ctx_work_bits); + spin_unlock_irqrestore(&dev->condlock, flags);
+ }
+ s5p_mfc_hw_call(dev->mfc_ops, try_run, dev);
++>>>>>>> e67ff71... s5p-mfc: Update MFCv5 driver for callback based architecture
...
@@@ -582,18 -589,24 +593,30 @@@ static int vidioc_streamon(struct file
ctx->src_bufs_cnt = 0;
ctx->capture_state = QUEUE_FREE;
ctx->output_state = QUEUE_FREE;
++<<<<<<< HEAD
+ s5p_mfc_alloc_instance_buffer(ctx);
+ s5p_mfc_alloc_dec_temp_buffers(ctx);
+ set_work_bit_irqsave(ctx);++=======
+ s5p_mfc_hw_call(dev->mfc_ops, alloc_instance_buffer,
+ ctx);
+ s5p_mfc_hw_call(dev->mfc_ops, alloc_dec_temp_buffers,
+ ctx);
+ spin_lock_irqsave(&dev->condlock, flags); + set_bit(ctx->num, &dev->ctx_work_bits); + spin_unlock_irqrestore(&dev->condlock, flags);
++>>>>>>> e67ff71... s5p-mfc: Update MFCv5 driver for callback based architecture
and more...
Also, there are too many changes on this patch, making it harder for review, especially since there are also some code renames and function rearrangements.
The better is to split it into smaller and more logical changes, instead of what it sounds like a driver replacement.
Signature · 2 lines
Regards, Mauro
Quoted 70 lines · Mauro Carvalho Chehab
Em Tue, 02 Oct 2012 18:58:47 +0200
Sylwester Nawrocki<[email protected]> escreveu:Quoted 15 lines
Hi Mauro,
The following changes since commit
34a6b7d093d8fe738ada191b36648d00bc18b7eb:[media] v4l2-ctrls: add a filter function to
v4l2_ctrl_add_handler
(2012-10-01 17:07:07 -0300)are available in the git repository at:
git://git.infradead.org/users/kmpark/linux-2.6-samsungv4l_mfc_for_maurofor you to fetch changes up to
8312d9d2d254ab289a322fcfdba1d1ecf5e36256:s5p-mfc: Update MFC v4l2 driver to support MFC6.x (2012-10-02 15:28:42 +0200)Quoted 7 lines
This is an update of the s5p-mfc driver and related V4L2 API additions to support the Multi Format Codec device on the Exynos5 SoC series.
----------------------------------------------------------------
Arun Kumar K (4):
v4l: Add fourcc definitions for new formats
v4l: Add control definitions for new H264 encoder featuresOK.
Quoted 1 line
s5p-mfc: Update MFCv5 driver for callback based architecture
This one doesn't apply:
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +19
-0@@@ -496,11 -499,14 +498,20 @@@ static int vidioc_reqbufs(struct file *s5p_mfc_clock_off ();return -ENOMEM ; } ++<<<<<<< HEAD + if (s5p_mfc_ctx_ready(ctx)) +set_work_bit_irqsave (ctx); +s5p_mfc_try_run (dev); ++======= +if (s5p_mfc_ctx_ready (ctx)) { +spin_lock_irqsave (&dev->condlock, flags); +set_bit (ctx->num,&dev->ctx_work_bits); +spin_unlock_irqrestore (&dev->condlock, flags); + } +s5p_mfc_hw_call (dev->mfc_ops, try_run, dev); ++>>>>>>> e67ff71... s5p-mfc: Update MFCv5 driver for callback based architecture@@@ -582,18 -589,24 +593,30 @@@ static int vidioc_streamon(struct file ctx->src_bufs_cnt =0 ; ctx->capture_state =QUEUE_FREE ; ctx->output_state =QUEUE_FREE ; ++<<<<<<< HEAD +s5p_mfc_alloc_instance_buffer (ctx); +s5p_mfc_alloc_dec_temp_buffers (ctx); +set_work_bit_irqsave (ctx); ++======= +s5p_mfc_hw_call (dev->mfc_ops, alloc_instance_buffer, + ctx); +s5p_mfc_hw_call (dev->mfc_ops, alloc_dec_temp_buffers, + ctx); +spin_lock_irqsave (&dev->condlock, flags); +set_bit (ctx->num,&dev->ctx_work_bits); +spin_unlock_irqrestore (&dev->condlock, flags); ++>>>>>>> e67ff71... s5p-mfc: Update MFCv5 driver for callback based architecture
Quoted 1 line
and more...
Sorry, my bad :/ Should have better coordinated those patches from multiple developers.
Quoted 6 lines
Also, there are too many changes on this patch, making it harder for review, especially since there are also some code renames and function rearrangements.
The better is to split it into smaller and more logical changes, instead of what it sounds like a driver replacement.
Indeed it looks like big blob patch. I think this reflects how these patches were created, were one person creates practically new driver for new device revision, with not much care about the old one, and then somebody else is trying to make it a step by step process and ensuring support for all H/W revisions is properly maintained.
Anyway, Arun, can you please rebase your patch series onto latest linuxtv for_v3.7 branch and try to split this above patch. AFAICS there are following things done there that could be separated:
1. Move contents of file s5p_mfc_opr.c to new file s5p_mfc_opr_v5.c
2. Rename functions in s5p_mfc_opr_v5.c
3. Use s5p_mfc_hw_call for H/W specific function calls
4. Do S5P_FIMV/S5P_MFC whatever magic.
Also I've noticed some patches do break compilation. There are some definitions used there which are added only in subsequent patches. Arun, can you please make sure there is no build break after each single patch is applied ?
Thanks,
Sylwester
Hi Sylwester,
Quoted 7 lines
Indeed it looks like big blob patch. I think this reflects how these patches were created, were one person creates practically new driver for new device revision, with not much care about the old one, and then somebody else is trying to make it a step by step process and ensuring support for all H/W revisions is properly maintained.
Quoted 8 lines
Anyway, Arun, can you please rebase your patch series onto latest linuxtv for_v3.7 branch and try to split this above patch. AFAICS there are following things done there that could be separated:
1. Move contents of file
s5p_mfc_opr.cto new files5p_mfc_opr_v5.c
2. Rename functions ins5p_mfc_opr_v5.c
3. Uses5p_mfc_hw_callfor H/W specific function calls
4. Do S5P_FIMV/S5P_MFC whatever magic.
I couldnt go with more finer splits, as I wanted to keep a working driver between all successive patches. Now I will try to make the splits as suggested and see if it can still be done.
Quoted 4 lines
Also I've noticed some patches do break compilation. There are some definitions used there which are added only in subsequent patches. Arun, can you please make sure there is no build break after each single patch is applied ?
I have checked this while applying and I didnt see any break in compilation after each patch is applied. I ensured not only compilation but also a working driver after applying each patch. I will ensure this again on
the next rebase.
I will make these suggested changes and post an updated patchset today.
Regards
Arun
Hi Arun,
Quoted 19 lines · Arun Kumar K
Quoted 6 lines
Indeed it looks like big blob patch. I think this reflects how these patches were created, were one person creates practically new driver for new device revision, with not much care about the old one, and then somebody else is trying to make it a step by step process and ensuring support for all H/W revisions is properly maintained.
Quoted 8 lines
Anyway, Arun, can you please rebase your patch series onto latest linuxtv for_v3.7 branch and try to split this above patch. AFAICS there are following things done there that could be separated:
1. Move contents of file
s5p_mfc_opr.cto new files5p_mfc_opr_v5.c
2. Rename functions ins5p_mfc_opr_v5.c
3. Uses5p_mfc_hw_callfor H/W specific function calls
4. Do S5P_FIMV/S5P_MFC whatever magic.I couldnt go with more finer splits, as I wanted to keep a working driver between all successive patches. Now I will try to make the splits as suggested and see if it can still be done.
Quoted 8 lines
Quoted 3 lines
Also I've noticed some patches do break compilation. There are some definitions used there which are added only in subsequent patches. Arun, can you please make sure there is no build break after each single patch is applied ?
I have checked this while applying and I didnt see any break in compilation after each patch is applied. I ensured not only compilation but also a working driver after applying each patch. I will ensure this again on the next rebase.
Sorry, I wrongly concluded from looking at the diffs only. Preserving working driver is a good thing, but it is not really required AFAICT. Still it would be nice split the patch as above keeping the v5 driver working. Probably splitting it in 3 is enough. It is worthwhile as long as it makes the total diffs smaller (e.g. file renames don't need to be a huge diff with git rename detection enabled). I understand you've got now an additional work due to conflict with Andrzej's patches. All pending s5p-mfc patches seems to be in Mauro's tree for_v3.7 and nothing should get in before your patches now.
Quoted 1 line
I will make these suggested changes and post an updated patchset today.
Thanks.
--
Regards,
Sylwester