aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform
AgeCommit message (Collapse)AuthorFilesLines
2024-02-01media: platform: mtk-mdp3: add mt8195 platform configurationMoudy Ho6-0/+716
Add MT8195 MDP3 basic configuration in file "mdp_cfg_data.c" and corresponding driver data. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: add support for blending multiple componentsMoudy Ho3-3/+43
Certain chips can combine several components to form complex virtual units with advanced functions. These components require simultaneous configuration of their MODs and clocks. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: extend GCE event waiting in RDMA and WROTMoudy Ho3-8/+23
Support for multiple RDMA/WROT waits for GCE events. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: avoid multiple driver registrationsMoudy Ho3-0/+10
The amount of MDP3 driver probes is determined by the registered clocks of MMSYS. Since MT8195 MDP3 utilizes VPPSYS0 and VPPSYS1, it's necessary to prevent multiple driver registrations. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: add checks for dummy componentsMoudy Ho4-2/+74
Some components act as bridges only and do not require full configuration. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: introduce more MDP3 componentsMoudy Ho12-16/+318
Add configuration of more components in MT8195 MDP3. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: introduce more pipelines from MT8195Moudy Ho2-27/+60
Increasing the number of sets built by MMSYS and MUTEX in MT8195 will enable the creation of more pipelines in MDP3. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: add support second sets of MUTEXMoudy Ho3-38/+74
After setting up the second set of MMSYS (VPPSYS1), it is necessary to have a corresponding second set of MUTEX (MUTEX2) to assist in handling SOF/EOF. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: platform: mtk-mdp3: add support second sets of MMSYSMoudy Ho4-32/+92
The MT8195 chipset features two MMSYS subsets: VPPSYS0 and VPPSYS1. These subsets coordinate and control the clock, power, and register settings required for the components of MDP3. Signed-off-by: Moudy Ho <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Fricke <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: rkisp1: Fix IRQ handling due to shared interruptsTomi Valkeinen5-0/+33
The driver requests the interrupts as IRQF_SHARED, so the interrupt handlers can be called at any time. If such a call happens while the ISP is powered down, the SoC will hang as the driver tries to access the ISP registers. This can be reproduced even without the platform sharing the IRQ line: Enable CONFIG_DEBUG_SHIRQ and unload the driver, and the board will hang. Fix this by adding a new field, 'irqs_enabled', which is used to bail out from the interrupt handler when the ISP is not operational. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-02-01media: Revert "media: rkisp1: Drop IRQF_SHARED"Tomi Valkeinen1-1/+1
This reverts commit 85d2a31fe4d9be1555f621ead7a520d8791e0f74. The rkisp1 does share interrupt lines on some platforms, after all. Thus we need to revert this, and implement a fix for the rkisp1 shared irq handling in a follow-up patch. Closes: https://lore.kernel.org/all/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Reported-by: Mikhail Rudenko <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2024-01-29Merge tag 'v6.8-rc2'Hans Verkuil1-1/+1
Linux 6.8-rc2 The vb2 fixes from v6.8-rc2 are needed for the work on the new vb2 delete buffers feature. Signed-off-by: Hans Verkuil <[email protected]>
2024-01-24media: chips-media: wave5: Remove K3 ReferencesBrandon Brnich1-1/+1
Change compatible string to match dt bindings for TI devices. K3 family prefix should not be included as it deviates from naming convention. Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Reported-by: Geert Uytterhoeven <[email protected]> Closes: https://lore.kernel.org/all/CAMuHMdUYOq=q1j=d+Eac28hthOUAaNUkuvxmRu-mUN1pLKq69g@mail.gmail.com/ Signed-off-by: Brandon Brnich <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-24media: mediatek: vcodec: drop excess struct members descriptionsHans Verkuil2-2/+0
Drop obsolete @wait_key_frame and @mv_joint struct member descriptions. This fixes two warnings: drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_req_if.c:57: warning: Excess struct member 'wait_key_frame' description in 'vdec_vp8_slice_info' drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c:166: warning: Excess struct member 'mv_joint' description in 'vdec_vp9_slice_counts_map' Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Matthias Brugger <[email protected]>
2024-01-22media: cadence: csi2rx: Add enum_mbus_code pad opsChanghuang Liang1-0/+13
Add enum_mbus_code ioctl so that user space can know what formats are supported to csi2rx. Signed-off-by: Changhuang Liang <[email protected]> Reviewed-by: Julien Massot <[email protected]> Tested-by: Julien Massot <[email protected]> Reviewed-by: Jai Luthra <[email protected]> Tested-by: Jai Luthra <[email protected]> # [Test on sk-am62a] Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: platform: xilinx: Fix Kconfig indentationMichal Simek1-2/+2
Use proper indentation for Kconfig fragments - help part. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: ti: j721e-csi2rx: add support for RGB formatsJai Luthra1-0/+18
Add support for RGB565, RGB888 and BGR888 media bus formats. The pixel formats for these have a different byte-order than the MIPI bus formats, given the SHIM IP [1] unpacks them into memory as follows: MIPI RGB888 unpacks to: BYTE3 BYTE2 BYTE1 BYTE0 00000000 RRRRRRRR GGGGGGGG BBBBBBBB MIPI RGB565 unpacks to: BIT 15-11 BIT 10-5 BIT 4-0 RRRRR GGGGGG BBBBB [1]: AM62x TRM: 12.6.1.4.5 "CSI_RX_IF Data Memory Organization Details" Link: https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Jai Luthra <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: cadence: csi2rx: add support for RGB formatsJai Luthra1-0/+3
Add support for RGB565, RGB888 and BGR888 media bus formats. Signed-off-by: Jai Luthra <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: ti: j721e-csi2rx: add GREY formatJulien Massot1-0/+6
Add Grey format to properly select RAW8 data type. Tested with a ST VG5661 sensor. Signed-off-by: Julien Massot <[email protected]> Acked-by: Jai Luthra <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: cadence: csi2rx: add Y8_1X8 formatJulien Massot1-0/+1
Add support for MEDIA_BUS_FMT_Y8_1X8 format. Signed-off-by: Julien Massot <[email protected]> Acked-by: Jai Luthra <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: cadence: csi2rx: use match fwnode for media linkJulien Massot1-1/+1
Since commit 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching"), async connections are matched using the async sub-device fwnode, not that of the endpoint. Fix this by using the fwnode of the connection match to find the pad. Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching") Signed-off-by: Julien Massot <[email protected]> Reviewed-by: Jai Luthra <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop static device variable in s5p_mfc_pm.cKrzysztof Kozlowski7-69/+67
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 <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop useless static s5p_mfc_dev in s5p_mfc_pm.cKrzysztof Kozlowski1-3/+0
Pointer "struct s5p_mfc_dev" is stored in s5p_mfc_pm.c once and never used again. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop useless clock refcnt debuggingKrzysztof Kozlowski1-8/+0
Drop useless debugging of clock enabl/disable counts, because core handles this much better. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify local pointers to s5p_mfc_enc_paramsKrzysztof Kozlowski2-16/+16
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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify pointers to s5p_mfc_cmd_argsKrzysztof Kozlowski3-3/+3
In few places functions do not modify pointed "struct s5p_mfc_cmd_args", thus the pointer can point to const data for additional safety and self-documenting intention of the function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify struct structuresKrzysztof Kozlowski4-6/+6
Static "struct" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify s5p_mfc_fmt structuresKrzysztof Kozlowski3-9/+9
Static "s5p_mfc_fmt" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify s5p_mfc_hw_ops structuresKrzysztof Kozlowski5-7/+7
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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify s5p_mfc_hw_cmds structuresKrzysztof Kozlowski5-7/+7
Static "s5p_mfc_hw_cmds" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify s5p_mfc_variant structuresKrzysztof Kozlowski1-7/+7
Static "s5p_mfc_variant" structures are not modified by the driver, so they can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify s5p_mfc_buf_size structuresKrzysztof Kozlowski6-20/+20
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 <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: constify fw_name stringsKrzysztof Kozlowski1-1/+1
Constify stored pointers to firmware names for code safety. These are not modified by the driver. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop unused get_*_def_fmt declarationsKrzysztof Kozlowski2-2/+0
get_dec_def_fmt() and get_enc_def_fmt() do not have definitions, so their declarations are pointless. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop unused static s5p_mfc_opsKrzysztof Kozlowski1-5/+2
File-scope static variable "s5p_mfc_ops" is not read after assignment, thus it can be dropped entirely. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: s5p-mfc: drop unused static s5p_mfc_cmdsKrzysztof Kozlowski1-6/+2
File-scope static variable "s5p_mfc_cmds" is not read after assignment, thus it can be dropped entirely. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify local pointers to fimc_frameKrzysztof Kozlowski4-25/+25
Constify the local variables pointing to "struct fimc_frame" to annotate the function is not modifying pointed data. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify local pointers to fimc_vid_capKrzysztof Kozlowski1-2/+2
Constify the local variables pointing to "struct fimc_vid_cap" to annotate the function is not modifying pointed data. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify local pointers to fimc_dma_offsetKrzysztof Kozlowski1-2/+2
Constify the local variables pointing to "struct fimc_dma_offset" to annotate the function is not modifying pointed data. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify pointers to v4l2_pix_format_mplaneKrzysztof Kozlowski3-3/+3
In few places functions do not modify pointed "struct v4l2_pix_format_mplane", thus the pointer can point to const data for additional safety and self-documenting intention of the function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify fimc_formats arrayKrzysztof Kozlowski4-25/+28
Pointers to elements of the static array "fimc_formats" with "struct fimc_fmt" are passed all around to various calls, but all of them do not modify pointed data. Constify the pointers everywhere which at the end allows to make static array "fimc_formats" const itself. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify local pointers to fimc_fmtKrzysztof Kozlowski3-6/+6
Constify the local variable pointing to "struct fimc_fmt" to annotate the function is not modifying pointed data. This is the easy and obvious step of constifying all "struct fimc_fmt" instances. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify several pointers in function argumentsKrzysztof Kozlowski4-19/+19
Several functions do not modify pointed structure, thus the pointer can point to const data for additional safety and self-documenting intention of the function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: constify clock namesKrzysztof Kozlowski1-1/+1
Static array with clock names can be made const for code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-is: drop unused fimc_vidioc_enum_fmt_mplane()Krzysztof Kozlowski1-2/+0
Function fimc_vidioc_enum_fmt_mplane() is not defined, so drop its declaration from the header. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-lite: constify pointers to v4l2_pix_format_mplaneKrzysztof Kozlowski1-1/+1
In few places functions do not modify pointed "struct v4l2_pix_format_mplane", thus the pointer can point to const data for additional safety and self-documenting intention of the function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-lite: constify several pointers in function argumentsKrzysztof Kozlowski2-11/+12
Several functions do not modify pointed structure, thus the pointer can point to const data for additional safety and self-documenting intention of the function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2024-01-22media: fimc-lite: drop unused flite_hw_set_camera_polarity()Krzysztof Kozlowski1-2/+0
Function flite_hw_set_camera_polarity() is not defined, so drop its declaration from the header. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
2023-12-13media: videobuf2: core: Rename min_buffers_needed field in vb2_queueBenjamin Gaignard28-35/+35
Rename min_buffers_needed into min_queued_buffers and update the documentation about it. Signed-off-by: Benjamin Gaignard <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> [hverkuil: Drop the change where min_queued_buffers + 1 buffers would be] [hverkuil: allocated. Now this patch only renames this field instead of making] [hverkuil: a functional change as well.] [hverkuil: Renamed 3 remaining min_buffers_needed occurrences.]
2023-12-13media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUFAakarsh Jain2-16/+9
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: [email protected] Signed-off-by: Smitha T Murthy <[email protected]> Signed-off-by: Aakarsh Jain <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>