Commit Graph

1231700 Commits

Author SHA1 Message Date
Mihai Despotovici
917c91a786 LF-12523: vpu: wave6: passive cooling solve checkpatch errors
Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.com>
2024-07-04 12:13:58 +03:00
Mihai Despotovici
cb21a45f1d LF-12523: vpu: wave6: add passive cooling
Add support for Wave6 VPU passive cooling using dynamic frequency scaling.

Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
2024-07-04 10:21:25 +03:00
Mihai Despotovici
22c26a77e8 LF-12523: vpu: wave6: Add pause support for the VPU entities
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
2024-07-04 10:21:25 +03:00
Mihai Despotovici
9c9be9b758 LF-12523: vpu: wave6: add passive cooling
Add support for Wave6 VPU passive cooling using dynamic frequency scaling.

Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.comn>
Reviewed-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Nas Chung <nas.chung@chipsnmedia.com>
2024-07-04 10:21:25 +03:00
Haibo Chen
aab252feb0 LF-12670 arm64: dts: imx8qm-mek: correct the light sensor interrupt type to low level
light sensor isl29023 share the interrupt with lsm303arg, but these
two devices use different interrupt type. According to the datasheet
of these two devides, both support low level trigger type, so correct
the interrupt type here to avoid the following error log:

irq: type mismatch, failed to map hwirq-11 for gpio@5d0c0000!

Reviewed-by: Shenwei Wang  <shenwei.wang@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-04 10:49:22 +08:00
Vabhav Sharma
6c4db4f6fa LF-12613: arm64: dts: imx8: enable se_fw driver
Enable se_fw unify driver for i.MX8 platform

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
2024-07-03 12:14:42 +02:00
Xu Yang
ef54b251a4 LF-12813 usb: dwc3: host: fix v6.6.36 merge conflict
DWC3 host driver has problem after v6.6.36 merge completed. This will
fix the conflict by remove one platform_device_add_data(), then assign
dwc3_pdata->xhci_priv->quirks to dwc3_xhci_plat_quirk.quirks, finally
use dwc3_xhci_plat_quirk as xhci platform data.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
2024-07-03 17:48:57 +08:00
Xu Yang
138d3d60fd Revert "LF-10210 perf pmu: add loaded_json_aliases for non-core pmu when get total events number"
This reverts commit 2912914ad7.

upstream (5af155f9b1 perf pmu: Count sys and cpuid JSON events
separately) is the correct patch for this issue. So this patch can
be removed now. This will revert it.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2024-07-03 17:48:54 +08:00
Aymen Sghaier
f2e144a22a ILIE-64 media: nxp: neoisp: Add crop support
"s_selection" interface is implemented on "input0" video node (output).
Size of "frame" video node (capture) should match input crop size.
Crop is operated by offsetting input image start address and line
stride.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Alexi Birlinger <alexi.birlinger@nxp.com>
2024-07-03 07:56:41 +02:00
Aymen Sghaier
ace0579a14 Revert "ILIE-64 media: nxp: neoisp: Add crop support"
This reverts commit 1b546d1225.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Alexi Birlinger <alexi.birlinger@nxp.com>
2024-07-03 07:56:41 +02:00
Aymen Sghaier
449db74ecf ILIE-97: Remove parameters buffer useless copy and use vb2 queue
Current driver allocates a dma mapped buffer for parameters and copy each
queued buffer to it. This was done to mimic the pisp driver and is useless
for neoisp.
This patch removes this extra copy and uses the vb2 queue instead.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Alexi Birlinger <alexi.birlinger@nxp.com>
2024-07-03 07:52:40 +02:00
TaoJiang
038bfb6ffb LF-12805: vpu: wave6: Add profile/level v4l2 ctrls for decoder
Support profile and level v4l2 controls for decoder.
These controls can be used by host for reference.
The control values are updated by decoder driver after parsing header.

Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
Reviewed-by: MingQian <ming.qian@nxp.com>
2024-07-03 07:24:16 +05:30
Oliver F. Brown
74603924f9 LF-12321: staging: media: imx: Fix bstatus in HDCP_RX_SET_CONFIG API message
The bstatus was missing one byte. Need to increase size to 2 bytes.

Signed-off-by: Oliver F. Brown <oliver.brown@oss.nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2024-07-02 13:06:39 -05:00
Aymen Sghaier
68662d473c ILIE-103: media: nxp: neoisp: Enable regmap debugfs
Regmap framework includes useful registers dump to debugfs, but this is
not functional for neoisp driver.

This patch adds needed settings to enable debugfs for neoisp.
It also adds a module parameter enable_debugfs that should be set to 1
to prevent clock disabling at probe.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Reviewed-by: Antoine Bouyer <antoine.bouyer@nxp.com>
2024-07-02 15:52:26 +02:00
Aymen Sghaier
15d5fba6ee ILIE-88 media: nxp: neoisp: Fix bit width configuration in isp pipeline
HDR decompression isp block is unable to output 20 bits per pixel if input
bit width is less than 12 bits.
This patch involves obwb block to compensate this limitation and reach
20 bits per pixel in isp internal pipeline 0, also adds the same procedure
to handle 16 bits internal bit width for pipeline 1.

This patch also set the default BNR configuration to the default ISP
registers values.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Signed-off-by: Celine Laurencin <celine.laurencin@nxp.com>
Reviewed-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2024-07-02 10:26:14 +02:00
Alexi Birlinger
919585d6e5 ILIE-91: media: nxp: neoisp: Fix VYUY format
The YVYU is an unsupported format which is a leftover
that was wrongly swapped with VYUY supported format.

Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
2024-07-02 10:26:13 +02:00
Alexi Birlinger
3d570d946d LF-12485: media: nxp: neoisp: Fix clock enable count after module removing
After neoisp module is removed isp and isi clock are still enabled
This patch fixes pm_runtime management by setting autosuspend mode
with a delay defined by NEOISP_SUSPEND_TIMEOUT_MS.
Clocks are disabled at the end of probe function to release them
while driver is not in use.
Also, it calls pm_runtime_dont_use_autosuspend
while autosuspend mode is not used.

Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
2024-07-02 10:26:13 +02:00
Celine Laurencin
0c3ea73be9 ILIE-89: include: uapi: nxp_neoisp: Fix NEO_DRC_LOCAL_SUM_CNT to 1024
The size for DRC local sum is 1024 words of 32bits.

Signed-off-by: Celine Laurencin <celine.laurencin@nxp.com>
Reviewed-by: Aymen Sghaier <aymen.sghaier@nxp.com>
2024-07-02 10:26:13 +02:00
Pengfei Li
d56d51c735 LF-12823 arm64: dts: imx91-9x9-qsb: Enable 91 thermal module
Enable thermal monitoring unit(TMU) on i.MX91 QSB.

Signed-off-by: Pengfei Li <pengfei.li_1@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2024-07-02 16:19:24 +08:00
Chancel Liu
49e550c1ab LF-12500: arm64: dts: imx95: Add DTC flags for LPA and LPV DT
Add '-@' DTC flags to build LPA and LPV DT so that phandle based target
method overlay DT format can use the two DT as base DT.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2024-07-02 16:44:49 +09:00
Neeraj Sanjay Kale
85152239ed Bluetooth: btnxpuart: Enable Power Save feature on startup
This sets the default power save mode setting to enabled.

The power save feature is now stable and stress test issues, such as the
TX timeout error, have been resolved.
commit c7ee0bc8db32 ("Bluetooth: btnxpuart: Resolve TX timeout error in
power save stress test")

With this setting, the driver will send the vendor command to FW at
startup, to enable power save feature.

User can disable this feature using the following vendor command:
hcitool cmd 3f 23 03 00 00 (HCI_NXP_AUTO_SLEEP_MODE)

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 1db01d15e2dace241998151499ee9b986ff135e3)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:03 +08:00
Neeraj Sanjay Kale
6f392e0c1b Bluetooth: btnxpuart: Add handling for boot-signature timeout errors
This handles the timeout error codes sent by the chip as part of the
bootloader signatures during firmware download process.

When the bootloader does not receive a response packet from the host
within a specific time, it adds an error code to the bootloader
signature while requesting for the FW chunk from the same offset.

The host is expected to clear this error code with a NAK, and reply to
only those bootloader signatures which have error code 0.

However, the driver was ignoring this error code and replying with the
firmware chunks instead, which is apparently ignored by the chip and the
chip resends the same bootloader signature with the error code again. This
happens in a loop until the error code self clears and firmware download
proceeds ahead, adding a couple of milliseconds to the total firmware
download time.

Commit 689ca16e52 was an initial implementation which simply printed
the following line during driver debug:
- FW Download received err 0x04 from chip

This commit adds the expected handling to the error codes.

This error handling is valid for data_req bootloader signatures for V3
and future bootloader versions.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Fixes: 689ca16e52 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 96385cbdfb95d96f80fd1c76a460740dc04ee08d)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:02 +08:00
Neeraj Sanjay Kale
582ea6fa23 Bluetooth: btnxpuart: Update firmware names
This updates the firmware names of 3 chipsets: w8987, w8997, w9098.
These changes are been done to standardize chip specific firmware
file names to be in sync with firmware names of newer chipsets.

The naming convention for BT-only files would be as follows:
For dual-radio WiFi+BT chipsets:
- <protocol-BT><chip-name>_bt_v<HW-version>.bin
For tri-radio WiFi+BT+15.4 chipsets:
- <protocol-BT><protocol-15.4><chip-name>_bt_v<HW-version>.bin

To maintain backward compatibility, this commit adds a provision to
request older firmware file name, if new firmware file name not found in
/lib/firmware/nxp/.

A new device tree property has been introduced called firmware-name, to
override the hardcoded firmware names (old and new) in the driver.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 2c4d9d8e879bf99d498631efbc7c3b8fc0311ce6)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:01 +08:00
Neeraj Sanjay Kale
0ed0493607 Bluetooth: btnxpuart: Handle FW Download Abort scenario
This adds a new flag BTNXPUART_FW_DOWNLOAD_ABORT which handles the
situation where driver is removed while firmware download is in
progress.

logs:
modprobe btnxpuart
[65239.230431] Bluetooth: hci0: ChipID: 7601, Version: 0
[65239.236670] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se
rmmod btnxpuart
[65241.425300] Bluetooth: hci0: FW Download Aborted

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Tested-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 813da00098fd0a064b11a161c30eb0d80172979e)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:01 +08:00
Neeraj Sanjay Kale
48d9017582 Bluetooth: btnxpuart: Enable status prints for firmware download
This enables prints for firmware download which can help automation
tests to verify firmware download functionality.

dmesg logs before:
modprobe btnxpuart
[ 1999.187264] Bluetooth: MGMT ver 1.22

dmesg logs with this patch:
modprobe btnxpuart
[16179.758515] Bluetooth: hci0: ChipID: 7601, Version: 0
[16179.764748] Bluetooth: hci0: Request Firmware: nxp/uartspi_n61x_v1.bin.se
[16181.217490] Bluetooth: hci0: FW Download Complete: 372696 bytes
[16182.701398] Bluetooth: MGMT ver 1.22

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Tested-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 13c8072f94d57b4d550e35942d45a37bba5ff930)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:00 +08:00
Neeraj Sanjay Kale
02a270d26c Bluetooth: btnxpuart: Fix Null pointer dereference in btnxpuart_flush()
This adds a check before freeing the rx->skb in flush and close
functions to handle the kernel crash seen while removing driver after FW
download fails or before FW download completes.

dmesg log:
[   54.634586] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000080
[   54.643398] Mem abort info:
[   54.646204]   ESR = 0x0000000096000004
[   54.649964]   EC = 0x25: DABT (current EL), IL = 32 bits
[   54.655286]   SET = 0, FnV = 0
[   54.658348]   EA = 0, S1PTW = 0
[   54.661498]   FSC = 0x04: level 0 translation fault
[   54.666391] Data abort info:
[   54.669273]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
[   54.674768]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[   54.674771]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[   54.674775] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000048860000
[   54.674780] [0000000000000080] pgd=0000000000000000, p4d=0000000000000000
[   54.703880] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[   54.710152] Modules linked in: btnxpuart(-) overlay fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine authenc libdes crct10dif_ce polyval_ce polyval_generic snd_soc_imx_spdif snd_soc_imx_card snd_soc_ak5558 snd_soc_ak4458 caam secvio error snd_soc_fsl_micfil snd_soc_fsl_spdif snd_soc_fsl_sai snd_soc_fsl_utils imx_pcm_dma gpio_ir_recv rc_core sch_fq_codel fuse
[   54.744357] CPU: 3 PID: 72 Comm: kworker/u9:0 Not tainted 6.6.3-otbr-g128004619037 #2
[   54.744364] Hardware name: FSL i.MX8MM EVK board (DT)
[   54.744368] Workqueue: hci0 hci_power_on
[   54.757244] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   54.757249] pc : kfree_skb_reason+0x18/0xb0
[   54.772299] lr : btnxpuart_flush+0x40/0x58 [btnxpuart]
[   54.782921] sp : ffff8000805ebca0
[   54.782923] x29: ffff8000805ebca0 x28: ffffa5c6cf1869c0 x27: ffffa5c6cf186000
[   54.782931] x26: ffff377b84852400 x25: ffff377b848523c0 x24: ffff377b845e7230
[   54.782938] x23: ffffa5c6ce8dbe08 x22: ffffa5c6ceb65410 x21: 00000000ffffff92
[   54.782945] x20: ffffa5c6ce8dbe98 x19: ffffffffffffffac x18: ffffffffffffffff
[   54.807651] x17: 0000000000000000 x16: ffffa5c6ce2824ec x15: ffff8001005eb857
[   54.821917] x14: 0000000000000000 x13: ffffa5c6cf1a02e0 x12: 0000000000000642
[   54.821924] x11: 0000000000000040 x10: ffffa5c6cf19d690 x9 : ffffa5c6cf19d688
[   54.821931] x8 : ffff377b86000028 x7 : 0000000000000000 x6 : 0000000000000000
[   54.821938] x5 : ffff377b86000000 x4 : 0000000000000000 x3 : 0000000000000000
[   54.843331] x2 : 0000000000000000 x1 : 0000000000000002 x0 : ffffffffffffffac
[   54.857599] Call trace:
[   54.857601]  kfree_skb_reason+0x18/0xb0
[   54.863878]  btnxpuart_flush+0x40/0x58 [btnxpuart]
[   54.863888]  hci_dev_open_sync+0x3a8/0xa04
[   54.872773]  hci_power_on+0x54/0x2e4
[   54.881832]  process_one_work+0x138/0x260
[   54.881842]  worker_thread+0x32c/0x438
[   54.881847]  kthread+0x118/0x11c
[   54.881853]  ret_from_fork+0x10/0x20
[   54.896406] Code: a9be7bfd 910003fd f9000bf3 aa0003f3 (b940d400)
[   54.896410] ---[ end trace 0000000000000000 ]---

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Tested-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit 4541b49528d1014d12f6b3e9a62cdc5ef8d1273e)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2024-07-02 13:50:00 +08:00
Peng Fan
473bd3c638 LF-12819 arm64: configs: imx_v8_defconfig: select USB_XEN_HCD
This config will enable usb frontend driver to let DomU could use usb
feature with PVUSB.

Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-07-02 10:11:46 +08:00
Peng Fan
2eab843b9a LF-12085 clocksource/drivers/imx-sysctr: fix i.MX95 support
With gplay test[1] together with system suspend/resume, linux sometimes
stuck with all 6 A55 cores in cpuidle. It is the broadcast timer not
trigger interrupt, although set_next_event set the experied time.

In set_next_event:
write CMP_CR to disable CMP EVENT
write CMP_HI
write CMP_LO
write CMP_CR to enable CMP EVENT (a)
After step (a) CMP_HI value was unexpected changed to a very large value.
So broadcast timer interrupt not trigger in time.

Per HW team:
CR  101100  -> Writing to CR can end up updating to HI/LO or address 0x0
HI  100100  -> Writing to HI can end up updating LO or 0x0.
LO  100000  -> Writing to LO can end up updating 0x0.
register address 0x0 is write ignored, so no need handle it.

The fix for errata ERR052268 is:
before the upper step (a), disable sysctr interrupt
after upper step a:
write CMP_HI, in case step (a) wrongly updates CMP_HI
write CMP_LO, in case step (a) or updating CMP_HI wrongly updates CMP_LO
read back CMP_HI and CMP_LO to check, but this should always be correct
value.
enable sysctr interrupt.

Because step (a) may wrongly update CMP_HI and CMP_LO, so need disable
interrupt to avoid interrupt firing immediately.

[1]:
 gst-launch-1.0 videotestsrc ! waylandsink window-width=800
window-height=600 > /dev/null &
 while true; do glmark2-es2-wayland > /dev/null; done &

Reviewed-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-07-02 10:11:45 +08:00
Ming Qian
b491229a4e LF-12695: mxc: vpu: wave6: Report the average QP of current encoded frame
Report the average QP value of current encoded frame via the control
V4L2_CID_MPEG_VIDEO_AVERAGE_QP, the value applies to the last dequeued
capture buffer.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2024-07-02 10:08:01 +09:00
Zhou Peng
392ef2705b LF-12605: mxc: vpu: wave6: update to driver v1.3.10
update wave6 v4l2 driver to v1.3.10, and the following patch is still
retained

LF-10673: mxc: vpu: wave6: add fps statistics
LF-11686-5: NXPSEU-267: mxc: vpu: wave6: support sei recovery flag
LF-11686-9: mxc: vpu: wave6: report the firmware git sha code
LF-10942-1: NXPSEU-269: mxc: vpu: wave6: add a debugfs to get the
firmware log
LF-10942-2: mxc: vpu: wave6: support to reload firmware
fix some coverity issues in v1.3.10
increase some error log levels
fix some coding style in wave6-hw.c

Fix some issues based on v1.3.10
NXPSEU-310: add compatible firmware version
NXPSEU-308: Fix some coverity issues.

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:57 +09:00
Ming Qian
166bdb2afd LF-12804: mxc: vpu: hantro_v4l2: filter out unapplicable ctrl
some ctrl is only applicable for certain format, if the format is not
supported by vpu hardware, just filter out it.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:57 +09:00
Ming Qian
09840a7365 LF-12740-2: mxc: vpu: hantro_v4l2: fix some coverity issues
there are some coverity issues found in hantro_v4l2, try to fix them

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:56 +09:00
Ming Qian
89132a55ab LF-12740: mxc: vpu: hantro_v4l2: report performance statistics
report performance statistics via debugfs.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:55 +09:00
Ming Qian
de80eb0b4d LF-12696: mxc: vpu: hantro_v4l2: Report the average QP of current encoded frame
Report the average QP value of current encoded frame via the control
V4L2_CID_MPEG_VIDEO_AVERAGE_QP, the value applies to the last dequeued
capture buffer.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2024-07-02 10:07:54 +09:00
Ming Qian
e8601c82e2 MA-22424-6: uapi: imx8m: vpu_dec: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:53 +09:00
Ming Qian
9c4f343c26 MA-22424-5: uapi: imx8m: vpu_enc: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:53 +09:00
Ming Qian
f59f640060 MA-22424-4: mxc: vpu: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

remove some unused ioctl cmd.
clear some building warning.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:53 +09:00
Ming Qian
0babf9a287 MA-22424-3: mxc: vpu: hantro_845: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

remove some unused ioctl cmd.
clear some building warning.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:52 +09:00
Ming Qian
b305ce6758 MA-22424-2: mxc: vpu: vc8000e: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

remove some unused ioctl cmd.
clear some building warning.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:52 +09:00
Ming Qian
08d3e59a62 MA-22424-1: mxc: vpu: h1: Use fixed-length types in ioctl parameters
To support 32bit application, we should use fixed-length types in ioctl
parameters, specifically avoid using the type long and unsigned long.

remove some unused ioctl cmd.
clear some building warning.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: TaoJiang <tao.jiang_2@nxp.com>
2024-07-02 10:07:51 +09:00
Ming Qian
16dd4e050e media: amphion: Report the average QP of current encoded frame
Report the average QP value of the current encoded frame via the
V4L2_CID_MPEG_VIDEO_AVERAGE_QP control, the value applies to the last
dequeued capture buffer.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-07-02 10:07:50 +09:00
Ming Qian
475c75b77c media: amphion: Remove lock in s_ctrl callback
There is no need to add a lock in s_ctrl callback, it has been
synchronized by the ctrl_handler's lock, otherwise it may led to
a deadlock if the driver calls v4l2_ctrl_s_ctrl().

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-07-02 10:07:50 +09:00
Ming Qian
569e32a224 media: v4l2-ctrls: Add average QP control
Add a control V4L2_CID_MPEG_VIDEO_AVERAGE_QP to report the average QP
value of the current encoded frame. The value applies to the last
dequeued capture buffer.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-07-02 10:07:49 +09:00
Laurentiu Palcu
26f591d2bb LF-12725 media/i2c: max96724: Fix for working in different configurations
Currently, if less than 4 cameras are needed, one has to modify the DTB
in order to have the new topology work. That's because we enabled all
configured GMSL links by default. This fix simply disables the links
that didn't lock and we can connect sensors in various configurations.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2024-07-01 17:00:12 +03:00
Laurentiu Palcu
c0af0cfd11 LF-12679-3 media/i2c: max96724: Add a more robust GMSL link check mechanism
It may happen when booting the system up that GMSL links do not lock.
However, a simple chip reset can fix it easily. So, this patch modifies
the init sequence by implementing a retry mechanism that checks the GMSL
links, resetting the chip in case no link has locked. The checks will be
done at the beginning of the init sequence, instead of the end.  Also,
remove the links reset call from max96724_reset_gmsl_links() and rename
the function to max96724_check_gmsl_links().

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2024-07-01 17:00:12 +03:00
Laurentiu Palcu
fb6e98560e LF-12679-2 media/i2c: mx95mbcam: Reset serializer before removal or reboot
Since the MX95MBCAM sensor module has the PWDNB pin, that should reset
the serializer, hard-wired to HIGH, we need to make sure we leave the
serializer in the default state when we remove the module or we perform
a warm reboot. This would avoid issues with GMSL links not locking when
rebooting the board.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2024-07-01 17:00:12 +03:00
Laurentiu Palcu
64d56bf0ee LF-12679-1 media/i2c: max96717: Add function for resetting the chip
We'll need this in order to reset the chip before warm reboot or module
removal, as the PWDNB pin is always HIGH.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2024-07-01 17:00:12 +03:00
Mirela Rabulea
0876b3b237 LF-12210-8: arm64: dts: imx95: os08a20: Update dts to use the compatible from ox05b1s driver
Use the os08a20 implementation from ox05b1s driver.

It seems the deprecated of_get_named_gpio/gpio_set_value
did not take into account the GPIO_ACTIVE_LOW/HIGH from DT.
Instead, the new devm_gpiod_get/gpiod_set_value does.
Use GPIO_ACTIVE_LOW in DT to line up with the datasheet power up diagram.

Removed pinctrl, the error was:
ovraw 2-0036: Error applying setting, reverse things back

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2024-07-01 17:00:12 +03:00
Mirela Rabulea
657cc0dc39 LF-12210-7: media: ox05b1s: Add support for Omnivision OS08A20 raw sensor
This is an 8MP raw10/raw12 sensor with HDR capabilities.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2024-07-01 17:00:12 +03:00
Mirela Rabulea
6723443aa5 LF-12210-6: dt-bindings: media: i2c: Update bindings for OX05B1S with OS08A20
Add another compatible for OS08A20 sensor.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
2024-07-01 17:00:12 +03:00