Skip to content

Integrate linux-seco-mtk/oleksii/upstream-media

GitBot requested to merge linux-seco-mtk/oleksii/upstream-media into kirkstone

Commit: clea-os/bsp/mediatek/linux-seco-mtk@561a5eef

GENIO: media: platform: mtk-mdp3: fix using null pointer during probe

Fix coverity reported Dereferencing null pointer in DpIspStream.cpp. (40) Event cert_exp34_c_violation: Dereferencing a pointer that might be "NULL" "&p->dev" when calling "mtk_mutex_get"

Change-Id: I269532eca4791e707d825b52179b55d02b66ea92 Signed-off-by: Macross Chen macross.chen@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@dbe832e2

GENIO: arm64: dts: mediatek: genio-700-evk: Correct the reserved memory size for the DSP

The reserved memory size for ADSP specified in the DTS does not match the memory protection range set in TF-A, leading the kernel to believe it can still use the physical addresses that are actually protected. Consequently, when hardware IPs attempt to access these protected addresses,it results in a condition where R/W cannot be performed.

(am from https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5400820)

This is to align the setting of Chromebook. Genio platforms didn't set the memory protection for the multimedia hardware, so this issue won't happen on Genio platforms. However, we still apply this fix to prevent the issue in case someone wants to add the protection in the future.

After applying this change, the memory region for audio will be:

17 MiB reserved for Audio (AFE, ADSP) +-----------------------+ 0x61100000 | ADSP DMA 1MiB | +-----------------------+ 0x61000000 | AFE MEM 1MiB | +-----------------------+ 0x60f00000 | ADSP MEM 15MiB | +-----------------------+ 0x60000000

Change-Id: I14e53ff7417e4af832f5fd1080bb1675607a60ce Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@5b6f045a

GENIO: arm64: dts: mediatek: genio-510-evk: add reserved memory for afe

Add reserved memory for AFE use. This is to align the same setting as Chromebook.

Change-Id: I06c228c51ef49fc0b20662c443fd6abfca48542b Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@0adc116b

GENIO: arm64: dts: mediatek: genio-700-evk: add reserved memory for afe

Add reserved memory for AFE use. This is to align the same setting as Chromebook.

Change-Id: Ia6e9c07ee6a4d7b88b66868431f6e7580274f13a Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@614c20c4

GENIO: media: platform: mtk-mdp3: Add RGBA format support

Add support for MDP3 to process and output RGBA format data for mt8183, mt8188 and mt8195.

Based on commit 652336cbf6ac from mtk-mdp-driver (OOT): GENIO:mtk-mdp-driver: Add RGBA format support

Change-Id: Ib8af6484b6d61400f7d65e22eafda7997b2e4034 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@dd6b31e5

GENIO: media: i2c: rdacm21: Fix the i2c transfer issue after system reboot

Since the power supply to the serializer is always on, the serializer slave address cannot be reset to default, leading to the failure of I2C transfer. We attempt to use the address defined in the DTS if I2C fails with the default address.

Change-Id: Idb8e8e53a9e1e7d5abb3d0cef76922e848ee7d86 Signed-off-by: RyanHsiao ryan.hsiao@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@8f596e06

GENIO: media: i2c: max9286: Fix the chan amplitude source from DTS

The amplitude of reverse channel should be the larger of the DTS settings and the default value (MAX9286_REV_AMP_HIGH)

Change-Id: Icb346dba8d03e56bd7e66b0c6545ec725da66ce1 Signed-off-by: RyanHsiao ryan.hsiao@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@76ca3aa7

GENIO: media: i2c: rdacm21: Add compatible for ABEO AG190C

Add ABEO AG190C to compatible list. The ABEO AG190C is compatible with RDACM21, but not need to configure the OV490 ISP and the OV10640 camera.

Change-Id: I405867ab6a5a3d7679e63bab93ba1ea6f3da6129 Signed-off-by: RyanHsiao ryan.hsiao@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d1500567

GENIO: dt-bindings: media: i2c: Add compatible abeo ag190c to imi rdacm2x

The ABEO AG190C is compatible with IMI RDACM21.

Change-Id: Ia9313cb41886dcf53ca9fa41b3074ae3b5d15b43 Signed-off-by: RyanHsiao ryan.hsiao@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@cd2f0676

GENIO: media: i2c: max9271: Add MAX96705 chip ID to max9271

This commit adds MAX96705 chip ID to max9271.c. The MAX96705 is function and pin compatible with the MAX9271, therefore the MAX96705 can reuse the MAX9271 driver.

Change-Id: I85406bb26eb2b851ecac4905870e64e30d49e6d6 Signed-off-by: RyanHsiao ryan.hsiao@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@9d3ff1fa

GENIO: media: platform: mtk-mdp3: expanded critical section to prevent race conditions when getting VPU

This commit expands the critical section boundaries to address a race condition encountered when starting the streaming process multiple times in quick succession.

CR-Id: ALPS08605321

Change-Id: Ic3007e8c9bf0066f54f26fdd2f71ded9c5ca2f49 Signed-off-by: Moudy Ho moudy.ho@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@fdbaa1c4

GENIO: media: i2c: Kconfig: Add config VIDEO_DECODER

This commit is to add a Kconfig, VIDEO_DECODER, to select the video decoders hidden by MEDIA_HIDE_ANCILLARY_SUBDRV. If MEDIA_SUBDRV_AUTOSELECT=y, the video decoders menu will be non-visible. The user can not see and select them. The config VIDEO_DECODER allows user to select all video decoder drivers.

Change-Id: Ieebd555e58446f2cfc5b6358fe95a3a7ad36c3b4 Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@9298be04

FIXUP: BACKPORT: media: i2c: Fix locking mechanism in THP7312 driver

The locking mechanism was not properly backported Fix it and use state_lock. fixes: 7649d530c4d9 ("BACKPORT: media: i2c: Add driver for THine THP7312")

Change-Id: I99b5a14f571445d0b397743612d943f71d33c5f6 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@106f33f1

FIXUP: BACKPORT: media: subdev: add subdev state locking

This commit adds features that were missed in commit 6da1a558d1c0 ("BACKPORT: media: subdev: add subdev state locking") and corrects the mutex lock naming convention from commit e889897a1a77.

Add lock mutex pointer to v4l2_subdev_state and state_lock mutex pointer to v4l2_subdev and add state_lock's implementation. Also fix _lock mutex naming. fixes: 6da1a558d1c0 ("BACKPORT: media: subdev: add subdev state locking") fixes: e889897a1a77 ("FROMLIST: media: subdev: add subdev state locking")

Change-Id: I74ffc708901d7f8594d49a4e3f72adb76fdaf219 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com (backported from commit ed647ea668fb27cd21408d5cb7cc7d4c30417332)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@0ec792ba

GENIO: arm64: dts: mt8385: add i2c aliases

add i2c aliases for mt8385

To resolve the issue where the ID output from i2cdetect -l does not match the hardware ID

Change-Id: I1ffc4f35aa97092c74e1a770fb7ff411deb83274 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@23598206

GENIO: arm64: dts: mt8370: add i2c aliases

add i2c aliases for mt8370

To resolve the issue where the ID output from i2cdetect -l does not match the hardware ID

Change-Id: Ie558a69e96bd6cd9b21d3422ee8fc84d385be5d1 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@95aa0d02

GENIO: arm64: dts: mt8188: add i2c aliases

add i2c aliases for mt8188

To resolve the issue where the ID output from i2cdetect -l does not match the hardware ID

Change-Id: If13ef5c9cc3972e9c277d754900f5624c91e85a7 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@6e09b114

GENIO: arm64: dts: mt8195: add i2c aliases

add i2c aliases for mt8195

To resolve the issue where the ID output from i2cdetect -l does not match the hardware ID

Change-Id: Ie93006f165d578f2bff688cec502d03180f74682 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@04710857

BACKPORT: media: i2c: Add driver for THine THP7312

The THP7312 is an external camera ISP from THine. Add a V4L2 subdev driver for it.

Change-Id: I5001b7d02868e6d912d81fff92c8ffb79bfad250 Signed-off-by: Paul Elder paul.elder@ideasonboard.com Co-developed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com [Sakari Ailus: squash a patch to fix missing mutex_unlock by Laurent.] Signed-off-by: Sakari Ailus sakari.ailus@linux.intel.com Signed-off-by: Hans Verkuil hverkuil-cisco@xs4all.nl (cherry picked from commit 7a52ab415b43f3b4680b69f6652ba2ec6716e55f)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@f35da0ca

BACKPORT: media: uapi: Add controls for the THP7312 ISP

The THP7312 is an external ISP from THine. As such, it implements a large number of parameters to control all aspects of the image processing. Many of those controls are already standard in V4L2, but some are fairly device-specific.

Reserve a range of 32 controls for the device. The driver will implement 4 device-specific controls to start with, define and document them. 28 additional device-specific controls should be enough for future development.

Co-developed-by: Paul Elder paul.elder@ideasonboard.com Signed-off-by: Paul Elder paul.elder@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Signed-off-by: Sakari Ailus sakari.ailus@linux.intel.com Signed-off-by: Hans Verkuil hverkuil-cisco@xs4all.nl Change-Id: If9da81a3ec2bcdde2bb6b3da0ee3f23b1219f15e (cherry picked from commit 0d9e32a8075a6cccbab294f98ccf7d33821d9b1c)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@e72579fe

GENIO: arm64: dts: mediatek: Add vsys_v4p2 and camera61_clk

Add vsys-v4p2 regulator and camera61_clk required by thp7312.

Change-Id: I663380b37b1034a1c01b76a0b3aa053484cf9ba7 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@260a2822

BACKPORT: media: subdev: add subdev state locking

The V4L2 subdevs have managed without centralized locking for the state (previously pad_config), as the try-state is supposedly safe (although I believe two TRY ioctls for the same fd would race), and the active-state, and its locking, is managed by the drivers internally.

We now have active-state in a centralized position, and need locking. Strictly speaking the locking is only needed for new drivers that use the new state, as the current drivers continue behaving as they used to.

Add functions for v4l2_subdev_lock_and_get_active_state and associated support functions. This commit adds onto changes from e889897a1a7732f073b06ffa413d742eff39b502.

Change-Id: I9d63fd7c71264380c36b305da420152177587fdd Signed-off-by: Tomi Valkeinen tomi.valkeinen@ideasonboard.com Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Reviewed-by: Hans Verkuil hverkuil-cisco@xs4all.nl Signed-off-by: Sakari Ailus sakari.ailus@linux.intel.com Signed-off-by: Mauro Carvalho Chehab mchehab@kernel.org (backported from commit ed647ea668fb27cd21408d5cb7cc7d4c30417332)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@0ccb2cf7

BACKPORT: media: v4l: subdev: Store the sub-device in the sub-device state

Store the sub-device in the sub-device state. This will be needed in e.g. validating pad number when retrieving information for non-stream-aware users. There are expected to be more needs for this in the future.

Change-Id: I30a2eda8985776f63e0d7b373a87b92a4267e47b Signed-off-by: Sakari Ailus sakari.ailus@linux.intel.com Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Reviewed-by: Tomi Valkeinen tomi.valkeinen@ideasonboard.com Signed-off-by: Mauro Carvalho Chehab mchehab@kernel.org (backported from commit 52c2575db8faa1d93227a92a32deb2cd66b96614)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@435e5267

BACKPORT: media: v4l: subdev: Rename sub-device state information access functions

Rename the sub-devices state information access functions, removing "_stream" from them and replacing "format" by "ffmt". This makes them shorter and so more convenient to use. No other sets of functions will be needed to access this information.

Change-Id: I36d266db8fda873a710882fe5a35144a99eee44d Signed-off-by: Sakari Ailus sakari.ailus@linux.intel.com Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com Reviewed-by: Tomi Valkeinen tomi.valkeinen@ideasonboard.com Signed-off-by: Mauro Carvalho Chehab mchehab@kernel.org (cherry picked from commit d0fde6aae2bacdc024fff43461ba0f325375fa97)

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@25df2cc6

GENIO: media: platform: mtk-mdp3: Add HDR R2Y for HDRMIRX RGB in

RSZ only support YUV input, add HDR do R2Y setting to avoid error downsampling.

CR-Id: ALPS08605321

Change-Id: I4bd9d63a7f13a243c475f59b6202c6838368df31 Signed-off-by: Tammy.Chou tammy.chou@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@c7cb1dc7

GENIO: soc: mediatek: hdmirx: mt8195: Add query avi info API

Change-Id: Iab907ba5cbb8d801e06fdc1d49a8ca6197e014be Signed-off-by: bo xu bo.xu@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@d200e0e2

Revert "BACKPORT: FROMLIST: media: v4l2-core: extend the v4l2 format to support request"

This reverts commit 0fd4de85f9a3c34eacdf2f44abcc578699345c24. This is to remove the customized structure member request_fd which breaks the UAPI compatibility.

Change-Id: Icc68b7319507df834c197c1b4147bf28af018d47 Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@9b3a7456

Revert "FIXUP: media: v4l2-core: extend the v4l2 format to support request"

This reverts commit 7bf690e4ff682badd11be1bccef1785e6adb4b57. This is to remove the customized structure member request_fd which breaks the UAPI compatibility.

Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@498a3263

GENIO: media: platform: mtk-mdp3: Register media device

[Problem]: MDP3 currently only registers a video device (/dev/videoX). Some standard software stacks like libcamera require the "converter" to register a media device (/dev/mediaX).

[Solution]: Register a media device for the V4L2 M2M MDP3 device using v4l2_m2m_register_media_controller. This helps create a media device node for MDP3.

Change-Id: Ide83e00f3004e43ad33cd28d0738776265cae98d Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@9cc7ddef

GENIO: media: platform: mtk-mdp3: fix the cropping padding method after aligning in specific format.

The driver will perform alignment for certain formats, and the padding between the actual data and the buffer needs to be cropped at the source end. Adjust the size of the capture plane to avoid enabling RSZ, which would lead to a decrease in picture quality.

Signed-off-by: Moudy Ho moudy.ho@mediatek.com Change-Id: Ic1408cc1528192457d315413021e12f48b529a3c

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@a8887334

GENIO: media: i2c: ap1302: Add read-only V4L2 controls for ISP params

This patch introduces support for the following v4l2 read-only controls:

  • hblank: horizontal blanking in pixels
  • vblank: vertical blanking in pixels
  • analogue gain: analog gain as an integer as per datasheet
  • exposure: exposure in microseconds
  • pixel_rate: pixel rate in pixels/second

Apart from providing useful insights into the firmware settings, these controls are mandatory in newer versions of libcamera.

Change-Id: I13db55c9a9d5817df005d3fc4a200f91a97534e1 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

--

Commit: clea-os/bsp/mediatek/linux-seco-mtk@71742efd

GENIO: media: platform: mtk-isp: Remove fhaddr from camsv50

The support for fhaddr was removed previously from the camsv30 driver which broke camsv50 driver. Remove support for fhaddr from camsv50 to allow camsv50 driver compilation and better upstream maintenance.

Change-Id: I5451cfe90ff20c0ef78793d613fcd4a76a4d8419 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com

Merge request reports