summaryrefslogtreecommitdiff
path: root/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-22media: s5p-mfc: drop static device variable in s5p_mfc_pm.cKrzysztof Kozlowski1-4/+4
Change the interface of power management functions in s5p_mfc_pm.c to accept the pointer to S5P MFC device structure. instead of relying on file-scope static variable. This makes code easier to read and modify in case more devices are added. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22media: s5p-mfc: constify local pointers to s5p_mfc_enc_paramsKrzysztof Kozlowski1-9/+9
Constify the local variables pointing to "struct s5p_mfc_enc_params" and other encoding params to annotate the function is not modifying pointed data. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22media: s5p-mfc: constify s5p_mfc_hw_ops structuresKrzysztof Kozlowski1-2/+2
Static "s5p_mfc_hw_ops" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-01-22media: s5p-mfc: constify s5p_mfc_buf_size structuresKrzysztof Kozlowski1-3/+3
Static "s5p_mfc_buf_size*" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUFAakarsh Jain1-0/+7
Add allocation of DPB buffers based on MFC requirement so, codec buffers allocations has been moved after state MFCINST_HEAD_PRODUCED. It is taken care that codec buffer allocation is performed in process context from userspace IOCTL call. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: Add support for UHD encoding.Aakarsh Jain1-0/+12
MFC driver had restriction on max resolution of 1080p, updated it for UHD. Added corresponding support to set recommended profile and level for H264 in UHD scenario. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: Add support for rate controls in MFCv12Aakarsh Jain1-4/+18
In MFCv12, the rc configs are changed with support for CBR loose, CBR tight and Variable Bitrate (VBR) added. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: Add YV12 and I420 multiplanar format supportAakarsh Jain1-33/+124
YV12 and I420 format (3-plane) support is added. Stride information is added to all formats and planes since it is necessary for YV12/I420 which are different from width. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: Add initial support for MFCv12Aakarsh Jain1-17/+66
Add support for MFCv12, with a new register file and necessary hw control, decoder, encoder and structural changes. Add luma dbp, chroma dpb and mv sizes for each codec as per the UM for MFCv12, along with appropriate alignment. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-13media: s5p-mfc: Rename IS_MFCV10 macroAakarsh Jain1-14/+14
Renames macro IS_MFCV10 to IS_MFCV10_PLUS so that the MFCv10 code can be resued for MFCv12 support. Since some part of MFCv10 specific code holds good for MFCv12 also. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-12-07media: s5p-mfc: Fix in register read and write for H264Smitha T Murthy1-7/+7
Few of the H264 encoder registers written were not getting reflected since the read values were not stored and getting overwritten. Fixes: 6a9c6f681257 ("[media] s5p-mfc: Add variants to access mfc registers") Cc: stable@vger.kernel.org Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smitha.t@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-03-18media: platform: rename s5p-mfc/ to samsung/s5p-mfc/Mauro Carvalho Chehab1-0/+2534
As the end goal is to have platform drivers split by vendor, rename s5p-mfc/ to samsung/s5p-mfc/. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>