Commit Graph

1249334 Commits

Author SHA1 Message Date
Sakari Ailus
c06983f853 media: Documentation: Rework CCS driver documentation
Drop duplicated UAPI specific portions of the CCS (kernel) documentation
and fix a spelling error in UAPI documentation previously fixed in driver
documentation.

Also add references both ways.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 13:20:10 +01:00
Hugues Fruchet
87f7f576e3 media: arm64: dts: st: add video encoder support to stm32mp255
Add VENC hardware video encoder support to STM32MP255.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:12:52 +01:00
Hugues Fruchet
d96a6119e3 media: arm64: dts: st: add video decoder support to stm32mp255
Add VDEC hardware video decoder support to STM32MP255.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:12:29 +01:00
Hugues Fruchet
b0fb9ca30a media: hantro: add support for STM32MP25 VENC
Add support for STM32MP25 VENC video hardware encoder.
Support of JPEG encoding.
VENC has its own reset/clock/irq.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:12:04 +01:00
Hugues Fruchet
46c4dffb74 media: hantro: add support for STM32MP25 VDEC
Add support for STM32MP25 VDEC video hardware decoder.
Support of H264/VP8 decoding.
No post-processor support.
VDEC has its own reset/clock/irq.

Successfully tested up to full HD.

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:11:33 +01:00
Hugues Fruchet
60314831d2 media: dt-bindings: media: Document STM32MP25 VDEC & VENC video codecs
Add STM32MP25 VDEC video decoder & VENC video encoder bindings.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 11:10:47 +01:00
Moudy Ho
9288eae430 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>
2024-02-01 07:53:49 +01:00
Moudy Ho
0e9bd2fcda media: platform: mtk-mdp3: add mt8195 MDP3 component settings
Extend the component settings used in MT8195 MDP3.
Additionally, it is crucial to read all component settings in
a specific manner to ensure that shared memory data structure lengths
are aligned across different platforms.

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>
2024-02-01 07:52:17 +01:00
Moudy Ho
51d918d62b media: platform: mtk-mdp3: add mt8195 shared memory configurations
The configuration of the MT8195 components in the shared memory
is defined in the header file "mdp_sm_mt8195.h".

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>
2024-02-01 07:50:03 +01:00
Moudy Ho
adce64c4ce media: platform: mtk-mdp3: add mt8195 platform configuration
Add MT8195 MDP3 basic configuration in file "mdp_cfg_data.c"
and corresponding driver data.

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>
2024-02-01 07:45:05 +01:00
Moudy Ho
d97fd41e83 media: platform: mtk-mdp3: add support for blending multiple components
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 <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>
2024-02-01 07:44:14 +01:00
Moudy Ho
bd2fac0048 media: platform: mtk-mdp3: extend GCE event waiting in RDMA and WROT
Support for multiple RDMA/WROT waits for GCE events.

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>
2024-02-01 07:37:16 +01:00
Moudy Ho
4294b9d6c8 media: platform: mtk-mdp3: avoid multiple driver registrations
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 <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>
2024-02-01 07:36:46 +01:00
Moudy Ho
92cdfc39af media: platform: mtk-mdp3: add checks for dummy components
Some components act as bridges only and do not require full configuration.

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>
2024-02-01 07:36:18 +01:00
Moudy Ho
73e00953c3 media: platform: mtk-mdp3: introduce more MDP3 components
Add configuration of more components in MT8195 MDP3.

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>
2024-02-01 07:35:48 +01:00
Moudy Ho
d9b52f7356 media: platform: mtk-mdp3: introduce more pipelines from MT8195
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 <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>
2024-02-01 07:34:59 +01:00
Moudy Ho
ee0d0dbb80 media: platform: mtk-mdp3: add support second sets of MUTEX
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 <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>
2024-02-01 07:34:31 +01:00
Moudy Ho
e280d1a0eb media: platform: mtk-mdp3: add support second sets of MMSYS
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 <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>
2024-02-01 07:33:51 +01:00
Hans de Goede
e072ded704 media: atomisp: Update TODO
Remove the TODO items for using the main (drivers/media/i2c) ov2680 and
ov5693 drivers and removing the atomisp specific ones, this has been done.

Remove the TODO item for gracefully handling missing firmware the
"media: atomisp: Bind and do power-management without firmware" changes
have fixed this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:05:13 +01:00
Hans de Goede
ace440e6db media: atomisp: Remove unnecessary msleep(10) from atomisp_mrfld_power() error path
Remove unnecessary msleep(10) from atomisp_mrfld_power() error-exit path,
the success exit from atomisp_mrfld_power() happens if a test succeeds
inside the do { } while loop above the msleep().

The error-exit path with the removed msleep is only hit it the power-on is
not reflected in the iUNIT ISPSSPM0 status bits after a timeout of 50 ms.
Sleeping an extra 10 ms in the timeout path makes little sense.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:05:08 +01:00
Hans de Goede
a6be73e97f media: atomisp: Bind and do power-management without firmware
The ISP needs to be turned off in a special manner for the SoC
to be able to reach S0i3 during suspend.

When the firmware is missing still bind to the PCI device and
run in pm-only mode which takes care of turning the ISP off
(including turning it off again if the firmware has turned it
on during resume).

In this new pm-only mode the atomisp driver works exactly the same
as the non-staging, pm-only drivers/platform/x86/intel/atomisp2/pm.c
driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:04:58 +01:00
Hans de Goede
25752a6231 media: atomisp: Move power-management [un]init into atomisp_pm_[un]init()
Move the power-management setup and cleanup code into
atomisp_pm_[un]init() helper functions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:04:32 +01:00
Hans de Goede
b03301870d media: atomisp: Replace atomisp_drvfs attr with using driver.dev_groups attr
sysfs attributes preferably should not be manually be registered but
instead the driver.groups / driver.dev_groups driver struct members
should be used to have the driver core handle this in a race free
manner.

Using driver.groups would be the most direct replacement for
driver_[add|remove]_file, but some of the attributes actually need access
to the struct atomisp_device (*), so as part of modernizing this part of
the atomisp driver this change also makes the sysfs attribute device
attributes instead of driver attributes.

*) Before this change accessing these attributes without the driver having
bound would result in a NULL pointer deref, this commit fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:04:18 +01:00
Hans de Goede
781bf4cee3 media: atomisp: Fix probe()/remove() power-management
Fix probe()/remove() power-management:

-Currently the driver uses pm_runtime_put_noidle() and relies on
 userspace to open + close the /dev/video# node at least once to
 actually turn the ISP off. Replace the pm_runtime_put_noidle()
 with pm_runtime_put_sync() to make sure that the device is turned
 off without relying on userspace for this.
 This also ensures that atomisp_css_init() is run (by atomisp_power_on())
 if the first userspace process opening /dev/video# wants to do more then
 just query the v4l2-caps.
 As part of this change move the pm setup code in probe() to just before
 calling v4l2_async_nf_register() which registers the /dev/* nodes, so
 that the device is left on for the entirety of the probe() function.

-Remove the turning off of the atomisp from the exit-error path,
 the PCI subsystem and subsequent probe() attempts expect the device
 to be in the on state when probe() fails.
 This also fixes the atomisp driver causing the system to hang / freeze
 when its firmware is missing. This freeze is caused by an unidentified
 bug in the power-off on exit-error code which is now removed.

-Make sure that remove() properly powers on the device by replacing
 pm_runtime_get_noresume() with pm_runtime_get_sync. The PCI subsystem
 and subsequent probe() attempts expect the device to be in the on state
 after unbinding the driver.

-Note this also swaps the order of put()/allow() and forbid()/get()
 so that the sync versions actually work by calling allow() before put()
 and forbid() after get()

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:04:06 +01:00
Hans de Goede
3a9ceebd8f media: atomisp: Group cpu_latency_qos_add_request() call together with other PM calls
Group the cpu_latency_qos_add_request() call in probe() together with
the other PM calls in probe().

This is a preparation patch for futher PM fixes / work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:03:29 +01:00
Hans de Goede
ba68b88da0 media: atomisp: Fix atomisp_pci_remove()
Fix atomisp_pci_remove():
-Remove uninformative "Removing atomisp driver" log message
-Add missing devm_free_irq(), atomisp_uninitialize_modules() and
 pci_free_irq_vectors() calls
-Move atomisp_msi_irq_uninit() down so that the remove() order is
 an exact mirror of the probe() order

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:03:07 +01:00
Hans de Goede
7f7b6b5da0 media: atomisp: Fix probe error-exit path
Fix probe error-exit path:
-Add a missing ia_css_unload_firmware() call when v4l2_async_nf_register()
 fails
-Add a missing pm_runtime_forbid() call to undo the pm_runtime_allow() call
-Remove the unnecessary pcim_iounmap_regions() those are devm managed
 so they will get cleaned up automatically on an error exit from probe()
-Rename the labels to avoid having multiple labels pointing to the same
 place in the error-exit path

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:02:56 +01:00
Hans de Goede
62c319a51b media: atomisp: Call pcim_enable_device() and pcim_iomap_regions() later
ATM the atomisp firmware is not available in linux-firmware,
so most users will not have it installed.

Move pcim_enable_device() and pcim_iomap_regions() down in
atomisp_pci_probe() so that they are never called when the firmware
is not there.

This is a preparation patch for making the atomisp driver handle
missing firmware better.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:02:43 +01:00
Hans de Goede
f18ae7203f media: atomisp: Drop is_valid_device() function
Now that a single build supports both the ISP 2400 and the ISP 2401
this function is no longer necessary. The main probe() already
contains a similar switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK)
checking for a known device_id.

Move the revision check into the main probe() and drop
the is_valid_device() function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:02:21 +01:00
Hans de Goede
571f043d2a media: atomisp: Remove remaining deferred firmware loading code
There is a bunch of dead code left from the deferred firmware loading
support which was removed in commit 8972ed6ea7 ("media: atomisp: Remove
deferred firmware loading support").

Remove this dead code:
- Remove the skip_fwload module parameter
- Remove the now always NULL fw argument from ia_css_init()
- Remove the fw_explicitly_loaded boolean from sh_css.c
  (this was always true now)
- Adjust some function kernel-doc comments to match

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:01:59 +01:00
Hans de Goede
e496656368 media: atomisp: Remove s_routing subdev call
sensor drivers do not implement the s_routing subdev call, so there is
no use in calling it.

Also the 3 0 arguments are not the arguments which a successful
s_routing call is supposed to take.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:59 +01:00
Dipendra Khadka
89354baf8f media: atomisp: Fix spelling mistake in ia_css_acc_types.h
codespell reported spelling mistakes in
ia_css_acc_types.h as below:

'''
ia_css_acc_types.h:87: cummulative ==> cumulative
ia_css_acc_types.h:411: descibes ==> describes
'''

This patch fixes these spelling mistakes.
Word "cummulative" is changed to "accumulation"
and "descibes" to "describes".

Link: https://lore.kernel.org/r/20231223141157.95501-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:25 +01:00
Dipendra Khadka
3b63b7db1d media: atomisp: Fix spelling mistake in binary.c
codespell reported following spelling mistake
in runtime/binary/src as below:

'''
./runtime/binary/src/binary.c:537: spcification ==> specification
'''
This patch fixes thisspelling mistake.

Link: https://lore.kernel.org/r/20231223091521.85467-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:13 +01:00
Dipendra Khadka
38c56d8174 media: atomisp: Fix spelling mistakes in ia_css_hdr_types.h
codespell reported following spelling mistake
in ia_css_hdr_types.h below:

'''
./isp/kernels/hdr/ia_css_hdr_types.h:60: paramterers ==> parameters
./isp/kernels/hdr/ia_css_hdr_types.h:62: Currenly ==> Currently
'''
This patch fixes these spelling mistakes.

Link: https://lore.kernel.org/r/20231223083157.84090-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:09 +01:00
Dipendra Khadka
ddef5a9175 media: atomisp: Fix spelling mistakes in ia_css_macc_table.host.c
codespell reported following spelling mistake
in ia_css_macc_table.host.c below:

'''
./isp/kernels/macc/macc_1.0/ia_css_macc_table.host.c:22: matix ==> matrix
./isp/kernels/macc/macc_1.0/ia_css_macc_table.host.c:39: matix ==> matrix
'''
This patch fixes these spelling mistakes.

Link: https://lore.kernel.org/r/20231223081354.83318-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:05 +01:00
Dipendra Khadka
914ec2149f media: atomisp: Fix spelling mistakes in rmgr_vbuf.c
codespell reported following spelling mistake
in rmgr_vbuf.cas below:

'''
./runtime/rmgr/src/rmgr_vbuf.c:201: succes ==> success
./runtime/rmgr/src/rmgr_vbuf.c:211: succes ==> success
./runtime/rmgr/src/rmgr_vbuf.c:215: succes ==> success
'''
This patch fixes these spelling mistakes.
It is good to use variable name that gives
proper meaning and spelling error free.

Link: https://lore.kernel.org/r/20231223072245.81630-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 07:00:01 +01:00
Dipendra Khadka
b68a8c7946 media: atomisp: Fix spelling mistakes in queue.c
codespell reported following spelling mistake
in queue.c as below:

'''
./runtime/queue/src/queue.c:126: uncessary ==> unnecessary
./runtime/queue/src/queue.c:183: uncessary ==> unnecessary
'''
This patch fixes these spelling mistakes.

Link: https://lore.kernel.org/r/20231223071157.81082-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:55 +01:00
Dipendra Khadka
8cf2ae5c28 media: atomisp: Fix spelling mistakes in sh_css_mipi.c
codespell reported following spelling mistake
in sh_css_mipi.c as below:

'''
./sh_css_mipi.c:177: separatelly ==> separately
./sh_css_mipi.c:540: ofset ==> offset, of set
'''
This patch fixes these spelling mistakes by changing
"separatelly" to "separately" and "ofset" to "offset".

Link: https://lore.kernel.org/r/20231223064152.79712-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:51 +01:00
Dipendra Khadka
90953ea685 media: atomisp: Fix spelling mistake in ia_css_circbuf.h
codespell reported following spelling mistake
in ia_css_circbuf.h as below:

'''
./base/circbuf/interface/ia_css_circbuf.h:76: poistion ==> position
'''
This patch fixes this spelling mistake.

Link: https://lore.kernel.org/r/20231223061647.78669-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:47 +01:00
Dipendra Khadka
657d6ee589 media: atomisp: Fix spelling mistakes in circbuf.c
codespell reported following spelling mistakes
in circbuf.c as below:

'''
./circbuf.c:27: whehter ==> whether
./circbuf.c:132: offest ==> offset
'''
This patch fixes these spelling mistakes.

Link: https://lore.kernel.org/r/20231223060422.77789-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:42 +01:00
Dipendra Khadka
5201016d01 media: atomisp: Fix spelling mistake in isp2400_input_system_global.h
The script checkpatch.pl reported a spelling error
in isp2400_input_system_global.h as below:

'''
WARNING: 'upto' may be misspelled - perhaps 'up to'?
//MIPI allows upto 4 channels.
              ^^^^
'''

This patch corrects a spelling error,
changing "upto" to "up to".

Link: https://lore.kernel.org/r/20231222201503.2337-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:38 +01:00
Dipendra Khadka
0596ea5eeb media: atomisp: Fix repeated "of" in isp2400_input_system_public.h
The script checkpatch.pl reported repeated
word 'of' in isp2400_input_system_public.h
as below:

'''
WARNING: Possible repeated word: 'of'
/*! Read from a control register PORT[port_ID] of of RECEIVER[ID]
'''

This patch removes one 'of'.

Link: https://lore.kernel.org/r/20231222194036.1984-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:33 +01:00
Colin Ian King
ce1cfe023a media: atomisp: Remove redundant assignments to variables
There are several variables that are being initialized with values
that are never read, the assignment are redundant and can be removed.
Cleans up cppcheck unreadVariable warnings.

Link: https://lore.kernel.org/r/20231219143929.367929-1-colin.i.king@gmail.com

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:59:28 +01:00
Dipendra Khadka
7d67e4d5a7 media: atomisp: Fix a spelling mistake in sh_css_defs.h
The script checkpatch.pl reported a spelling error
in sh_css_defs.h as below:

'''
WARNING: 'upto' may be misspelled - perhaps 'up to'?
/* The FPGA system (vec_nelems == 16) only supports upto 5MP */
                                                    ^^^^
'''

This patch corrects a spelling error,
changing "upto" to "up to".

Link: https://lore.kernel.org/r/20231218153200.450148-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:58:55 +01:00
Dipendra Khadka
3e1b116f9b media: atomisp: Fix spelling mistakes in ia_css_irq.h
The script checkpatch.pl reported spelling errors
in ia_css_irq.h as below:

'''
WARNING: Possible repeated word: 'in'
        /** the input system in in error */

WARNING: Possible repeated word: 'in'
        /** the input formatter in in error */

WARNING: Possible repeated word: 'in'
        /** the dma in in error */
'''

This patch corrects spelling errors,
changing "in" to "is" in all three comments.

Link: https://lore.kernel.org/r/20231218151704.449883-1-kdipendra88@gmail.com

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:58:24 +01:00
Jonathan Bergh
4d728df5f5 media: atomisp: Removed duplicate comment and fixed comment format
Fixed the following issues:
 * Removed a duplicate comment
 * Fixed up minor comment format issue

Link: https://lore.kernel.org/r/20231014083545.173238-1-bergh.jonathan@gmail.com

Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:58:04 +01:00
Hans de Goede
26b53392ca media: atomisp: Refactor sensor crop + fmt setting
There are 3 code-paths all of 3 which need to do:

1. Get try or active state
2. lock state
3. Call atomisp_set_crop()
4. Call v4l2_subdev_call(input->camera, pad, set_fmt, state, fmt)
5. unlock state

Change atomisp_set_crop into atomisp_set_crop_and_fmt() which does all of
this and change the 3 code-paths which need this to use the new
atomisp_set_crop_and_fmt() function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:57:35 +01:00
Hans de Goede
592bb51d04 media: atomisp: Adjust for v4l2_subdev_state handling changes in 6.8
The atomisp driver emulates a standard v4l2 device, which also works
for non media-controller aware applications.

Part of this requires making try_fmt calls on the sensor when
a normal v4l2 app is making try_fmt calls on the /dev/video# mode.

With the recent v4l2_subdev_state handling changes in 6.8 this no longer
works, fixing this requires 2 changes:

1. The atomisp code was using its own internal v4l2_subdev_pad_config
   for this. Replace the internal v4l2_subdev_pad_config with allocating
   a full v4l2_subdev_state for storing the full try_fmt state.

2. The paths actually setting the fmt or crop selection now need to be
   passed the v4l2_subdev's active state, so that sensor drivers which
   are using the v4l2_subdev's active state to store their state keep
   working.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-02-01 06:56:48 +01:00
Hans Verkuil
c8282f7b85 Linux 6.8-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmW2+NgeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGNMoH/RbwRC7SpkT55lsD
 lIpaUrIYLuXkPKJa/3eD75cOtOv4Yi+aHGXfdTbo+JwWBKg4zY8X2pr7IZrvfpp5
 TZD+PADQtFAReWlQtVsaNM7om8k+2ltm+nkso1G+FpHljqqHgl3gc95UrVlmM70r
 iEScR0KbHkJ2Yv5H8C6ardcA87JYMaex6USK9GWSoylBN3R+Z49YEC9q07IQatAA
 Do8i6jDtw3O9OF2PpnhIPXxQZkwsn15pY1HwZxUEDMPXteMZa6NogvFsj6kSIudo
 YTF3FK+oX5CXNATL49OY4ibJ701mPCKqsuY3z6SuoYtvhI6wR96sIGFjEWV9tHvU
 VhPBvCI=
 =BKso
 -----END PGP SIGNATURE-----

Merge tag 'v6.8-rc2'

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 <hverkuil-cisco@xs4all.nl>
2024-01-29 08:59:23 +01:00
Linus Torvalds
41bccc98fb Linux 6.8-rc2 2024-01-28 17:01:12 -08:00