| 27796674 | 10-Aug-2025 |
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
media: Reset file->private_data to NULL in v4l2_fh_del()
Multiple drivers that use v4l2_fh and call v4l2_fh_del() manually reset the file->private_data pointer to NULL in their video device .release
media: Reset file->private_data to NULL in v4l2_fh_del()
Multiple drivers that use v4l2_fh and call v4l2_fh_del() manually reset the file->private_data pointer to NULL in their video device .release() file operation handler. Move the code to the v4l2_fh_del() function to avoid direct access to file->private_data in drivers. This requires adding a file pointer argument to the function.
Changes to drivers have been generated with the following coccinelle semantic patch:
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - filp->private_data = NULL; ... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ...> }
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ... - filp->private_data = NULL; ...> }
@@ expression fh; identifier filp; identifier release; type ret; @@ ret release(..., struct file *filp, ...) { <... - v4l2_fh_del(fh); + v4l2_fh_del(fh, filp); ...> }
Manual changes have been applied to Documentation/ to update the usage patterns, to drivers/media/v4l2-core/v4l2-fh.c to update the v4l2_fh_del() prototype and reset file->private_data, and to include/media/v4l2-fh.h to update the v4l2_fh_del() function prototype and its documentation.
Additionally, white space issues have been fixed manually in drivers/usb/gadget/function/uvc_v4l2.c
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 48df9029 | 01-Sep-2024 |
Chun-Kuang Hu <chunkuang.hu@kernel.org> |
media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()
Use the cmdq_pkt_create() and cmdq_pkt_destroy() common functions instead of implementing specific mdp3 versions.
Signed-off-
media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()
Use the cmdq_pkt_create() and cmdq_pkt_destroy() common functions instead of implementing specific mdp3 versions.
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
| 50ab69f2 | 01-Sep-2024 |
Chun-Kuang Hu <chunkuang.hu@kernel.org> |
media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize().
Signed-off
media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize().
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
| 6633de33 | 23-Aug-2024 |
Nícolas F. R. A. Prado <nfraprado@collabora.com> |
media: platform: mtk-mdp3: Remove mask parameter from MM_REG_POLL macro
Just like was done with MM_REG_WRITE, remove the mask from the MM_REG_POLL macro, leaving MM_REG_POLL_MASK to be used when a m
media: platform: mtk-mdp3: Remove mask parameter from MM_REG_POLL macro
Just like was done with MM_REG_WRITE, remove the mask from the MM_REG_POLL macro, leaving MM_REG_POLL_MASK to be used when a mask is required, and update the call sites accordingly. In this case, all calls require a mask, so MM_REG_POLL remains unused, but at least this makes the MM_REG_POLL macros consistent with the MM_REG_WRITE ones.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
| 7b00fcfd | 23-Aug-2024 |
Nícolas F. R. A. Prado <nfraprado@collabora.com> |
media: platform: mtk-mdp3: Remove mask parameter from MM_REG_WRITE macro
There are two macros to issue a cmdq write: MM_REG_WRITE_MASK and MM_REG_WRITE, but confusingly, both of them take a mask par
media: platform: mtk-mdp3: Remove mask parameter from MM_REG_WRITE macro
There are two macros to issue a cmdq write: MM_REG_WRITE_MASK and MM_REG_WRITE, but confusingly, both of them take a mask parameter. The difference is that MM_REG_WRITE additionally checks whether the mask passed in contains the register mask, in which case, the 0xffffffff mask is passed to cmdq_pkt_write_mask(), effectively disregarding the mask and calling cmdq_pkt_write() as an optimization.
Move that optimization to the MM_REG_WRITE_MASK macro and make MM_REG_WRITE the variant that doesn't take a mask, directly calling to cmdq_pkt_write().
Change the call sites to MM_REG_WRITE whenever a mask wasn't necessary (ie 0xffffffff or a <register>_MASK was passed as mask) and in other cases to MM_REG_WRITE_MASK.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
| 6d9038dc | 23-Aug-2024 |
Nícolas F. R. A. Prado <nfraprado@collabora.com> |
media: platform: mtk-mdp3: Remove useless variadic arguments from macros
A few macros declare variadic arguments even though the underlying functions don't support them. Remove them.
Signed-off-by:
media: platform: mtk-mdp3: Remove useless variadic arguments from macros
A few macros declare variadic arguments even though the underlying functions don't support them. Remove them.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
| 9288eae4 | 20-Dec-2023 |
Moudy Ho <moudy.ho@mediatek.com> |
media: platform: mtk-mdp3: add support for parallel pipe to improve FPS
In some chips, MDP3 has the ability to utilize two pipelines to parallelly process a single frame. To enable this feature, mul
media: platform: mtk-mdp3: add support for parallel pipe to improve FPS
In some chips, MDP3 has the ability to utilize two pipelines to parallelly process a single frame. To enable this feature, multiple CMDQ clients and packets need to be configured at the same time.
Signed-off-by: Moudy Ho <moudy.ho@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|