Integrate linux-mtk/release-23-2
Commit: seco-ne/kernel/linux-mtk@82819b2e
dts:wilk: Transfer release-23.2 changes from genio-700-evk device tree
--
Commit: seco-ne/kernel/linux-mtk@5406d014
Merge remote-tracking branch 'upstream/mtk-v5.15-dev' into release-23-2
--
Commit: seco-ne/kernel/linux-mtk@a46a21ed
GENIO: ASoC: mediatek: mt8365: Fix debugfs registration for components
If the debugfs is enabled, the directory 11220000.audio-controller are registered twice when registering the mt8365-afe-pcm driver, leading to the error:
[ 4.034579] debugfs: Directory '11220000.audio-controller' with parent 'mt8365-evk' already present!
The error is triggered when components with the same name are present. To resolve this issue, add a debugfs_prefix to the components before actually adding them.
The debug node name changes to 'pcm:11220000.audio-controller' after adding the debugfs_prefix = 'pcm' to the components.
Change-Id: I5b894b9f65acde73f068fa90ad3da797b39f1d8b Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@2757609f
GENIO: drm/mediatek: dp: call mtk_dp_init_port when HPD connect
call mtk_dp_init_port when HPD connect to reset DP encoder.
The original issue is related to playing back audio via DP. The problem reproducing procedue is
- playback audio with a Type-C to Type-C cable.
- stop the audio and switch the cable to a Type-C to HDMI hub.
- playback audio a noisy result occurs.
call mtk_dp_init_port when HPD connect could solve the problem.
Change-Id: Ib29422978a720413867e949a41c7bf9aab4d79e0 CR-Id: AUTO00286696 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@6764f8a6
GENIO: arm64: dts: mt8188: add mac wol property in eth node
[Details] add mac wol property in eth node.
CR-Id: AUTO00286616 Change-Id: I11dadf1a16d3d47c40287bc103afc0aaa53a8d4c Signed-off-by: fanyi zhang fanyi.zhang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7abf93cc
UPSTREAM: usb: xhci-mtk: fix in-ep's start-split check failure
It's wrong to use the data length in a CS (in uframe x) to check whether there is a SS (in uframe x-2), because for a isoc-in ep, it may need some CS to receive data; Save the count of SS in a uframe for isoc/intr in-eps to fix the issue.
Signed-off-by: Chunfeng Yun chunfeng.yun@mediatek.com Link: https://lore.kernel.org/r/20231118033011.22033-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--
Commit: seco-ne/kernel/linux-mtk@00cb9b8f
UPSTREAM: usb: xhci-mtk: improve split scheduling by separate IN/OUT budget
Calculate the IN/OUT budget separately to improve the bandwidth schedule, meanwhile should avoid Start-Split token overlap between IN and OUT endpoints, and take into account the FS/LS bandwidth boundary in each microframe and also in each FS frame. Calculate the budget for SS of OUT eps and CS of IN eps, but not include extra-cs, and always add at most extra-cs allowed.
Signed-off-by: Chunfeng Yun chunfeng.yun@mediatek.com Link: https://lore.kernel.org/r/20230830122820.18859-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--
Commit: seco-ne/kernel/linux-mtk@a36556c5
UPSTREAM: usb: xhci-mtk: add a bandwidth budget table
In order to estimate when fs/ls transactions appear on a downstream bus, the host must calculate a best case full-speed budget, use a table to track how many bytes occurred in each microframe. This patch is prepared for introducing an improved bandwidth scheduling.
Signed-off-by: Chunfeng Yun chunfeng.yun@mediatek.com Link: https://lore.kernel.org/r/20230830122820.18859-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--
Commit: seco-ne/kernel/linux-mtk@517524ee
GENIO: drm/mediatek: hdmi: fix dereferencing null pointer in mtk_hdmi_clk_enable and mtk_hdmi_clk_disable
Fix coverity reported dereferencing null pointer in both mtk_hdmi_clk_enable and mtk_hdmi_clk_disable
drivers/gpu/drm/mediatek/mtk_hdmi.c
mtk_hdmi_clk_enable: (1) Event cond_false:Condition "hdmi", taking false branch. (3) Event var_compare_op:Comparing "hdmi" to null implies that "hdmi" might be null. 924 if (hdmi && hdmi->conf && hdmi->conf->clk_enable) 925 hdmi->conf->clk_enable(hdmi); 926 else (2) Event else_branch: Reached else branch. (4) Event cert_exp34_c_violation: Dereferencing null pointer "hdmi". 927 dev_warn(hdmi->dev, "[%s][%d] hdmi clk_enable not defined\n", func, LINE);
mtk_hdmi_clk_disable: (1) Event cond_false:Condition "hdmi", taking false branch. (3) Event var_compare_op:Comparing "hdmi" to null implies that "hdmi" might be null. 932 if (hdmi && hdmi->conf && hdmi->conf->clk_disable) 933 hdmi->conf->clk_disable(hdmi); 934 else (2) Event else_branch: Reached else branch. (4) Event cert_exp34_c_violation: Dereferencing null pointer "hdmi". 935 dev_warn(hdmi->dev, "[%s][%d] hdmi clk_disable not defined\n", func, LINE);
Use an additional if statement to check for a possible null value in "hdmi" and add a DRM_WARN print if "hdmi" is found to be null."
Change-Id: Ie01299fc555e1171e0cd853700d86c2aeb6f5375 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@4b115e80
Revert "GENIO: drm/mediatek: hdmi: fix dereferencing null pointer in mtk_hdmi_clk_enable and mtk_hdmi_clk_disable"
This reverts commit ddf9512a21e439a97434fbfaf8da7f9123b3b588.
Reason for revert: should be 8381517
Change-Id: Icc4640dd2fff58c5b8f5eb3c062bd4980704efc5 Signed-off-by: tommyyl.chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@0fff80e9
GENIO: arm64: dts: mediatek: genio-510-evk: update mmc1 regulator config
Update regulator configurations for SD card to fix the following kernel error messages during booting:
[ 0.741904] vsim1: unsupportable voltage range: 3500000-3100000uV
CR-Id: AUTO00289191 Change-Id: I34ba776ada0da92b8b1008947e529e597051dd8e Signed-off-by: ht.lin ht.lin@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@ddf9512a
GENIO: drm/mediatek: hdmi: fix dereferencing null pointer in mtk_hdmi_clk_enable and mtk_hdmi_clk_disable
Fix coverity reported dereferencing null pointer in mtk_hdmi_clk_enable and mtk_hdmi_clk_disable
drivers/gpu/drm/mediatek/mtk_hdmi.c
mtk_hdmi_clk_enable: (1) Event cond_false:Condition "hdmi", taking false branch. (3) Event var_compare_op:Comparing "hdmi" to null implies that "hdmi" might be null. 924 if (hdmi && hdmi->conf && hdmi->conf->clk_enable) 925 hdmi->conf->clk_enable(hdmi); 926 else (2) Event else_branch: Reached else branch. (4) Event cert_exp34_c_violation: Dereferencing null pointer "hdmi". 927 dev_warn(hdmi->dev, "[%s][%d] hdmi clk_enable not defined\n", func, LINE);
mtk_hdmi_clk_disable: (1) Event cond_false:Condition "hdmi", taking false branch. (3) Event var_compare_op:Comparing "hdmi" to null implies that "hdmi" might be null. 932 if (hdmi && hdmi->conf && hdmi->conf->clk_disable) 933 hdmi->conf->clk_disable(hdmi); 934 else (2) Event else_branch: Reached else branch. (4) Event cert_exp34_c_violation: Dereferencing null pointer "hdmi". 935 dev_warn(hdmi->dev, "[%s][%d] hdmi clk_disable not defined\n", func, LINE);
use DRM_WARN instead of dev_warn to avoid possible null "hdmi"
Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7362ac7a
GENIO: arm64: dts: mediatek: genio-1200-evk: set mt6360/tcpc/connector port node
In order to avoid OF: graph: no port node found in mt6360@34/tcpc/connector add an empty port here to avoid errors.
Change-Id: I8b7255b779507e413fec808a701dee571fe1b6e8 Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@52717f82
GENIO: arm64: dts: mediatek: genio-510-evk: set rt1715 port node
In order to avoid OF: graph: no port node found in rt1715@4e add an empty port here to avoid errors.
Change-Id: Ib5fe66a45a604a0c2307c21d4cf827612c8a1eeb Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@828427ae
GENIO: arm64: dts: mediatek: genio-510-evk: add USB P2 IDDIG
add usb P2 IDDIG pin because the log: "usb-conn-gpio 112a1000.usb2:connector: failed to get gpios"
Change-Id: I1c25591b4c264d1b4b21e21db5b88b4328f8917c Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@0296ddeb
GENIO: media: platform: mtk-jpeg: fix enc irq stall
1.Read a 4K yuv format file and convert it to a JPEG image, it will cause system hang. Because gst alloc 4MB cap buffer but jpeg enc output data over 4MB, so the stall irq status be notified. 2.Sync coverity issue fix code
Test: gst-launch-1.0 -v filesrc location=4k.yuv ! rawvideoparse width=3840 height=2160 format=i420 colorimetry=bt601 ! queue ! v4l2convert ! video/x-raw,width=3840,height=2160,format=NV12 ! queue ! v4l2jpegenc ! jpegparse ! multifilesink location=ss_%03d.jpeg
CR-Id: AUTO00284324 Change-Id: I251b361d6741832d7a6755c02a1d4d4de3b996e8 Signed-off-by: Jianhua Lin jianhua.lin@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@b09501f6
GENIO: media: platform: mtk-mdp3: Refine mdp-capture disconnect flow
Refine disconnect behavior by ASYNC mechanism and add more lock and capture state to handle disconnect flow
CR-Id: ALPS08451964
Change-Id: I315cdc1bd1632a26dac4a29c776094acbc7317e8 Signed-off-by: Tammy.Chou tammy.chou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d383b540
GENIO: media: platform: mtk-mdp3: Add mmsys sw reset mdp split pipe
Reset HW to avoid disconnect in unexpected HW status
CR-Id: ALPS08451964
Change-Id: I3edd0ce04f1b31db5ced31331563b24d9366cc9b Signed-off-by: Tammy.Chou tammy.chou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@6f400b18
GENIO: arm64: dts: mediatek: genio-510: correct msdc setting
- Remove crypt clock for eMMC.
- Correct wifichip related GPIO setting including wifichip reset pin.
CR-Id: AUTO00286504 Change-Id: I06e455990094df8fa728813c40d9b51367975ea4 Signed-off-by: Axe Yang axe.yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@ba0829a7
GENIO: mmc: mediatek: update msdc driver
- Add support for SDIO async interrupt, this feature will help SDIO host be wake up by SDIO DAT1 without using an extra GPIO.
- Add support for 64-step tuning, eMMC/SD/SDIO can get optimal calibration result. Thus avoid hitting potential CRC issue.
- Change CQE CIT to 0x40 to improve performance
CR-Id: AUTO00286504 Change-Id: I6fcb8e66d0e7b714b5f6f4553e06fb928ab1224c Signed-off-by: Axe Yang axe.yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@30573b7b
GENIO: media: i2c: ap1302: Poll BOOTDATA_STAGE after loading bootdata
This commit introduces the addition of bootdata stage polling after loading the bootdata content is done. Such an installation has become indispensable to ensure that the bootdata stage in the ap1302 hardware completes. Without this crucial sync process, there's a potential risk of a race condition arising, thereby inducing a discordance between the software and hardware status.
Change-Id: I0cf5c877e9b4efb9aa263643fc9e828adea07d39 Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@44d233da
GENIO: media: i2c: ap1302: Poll system status when stalling
This commit introduces the addition of system status polling in the enable/disable process for stall. Such an installation has become indispensable to ensure an orderly wait until the 'stall/unstall' processes in the ap1302 hardware complete. Without this crucial sync process, there's a potential risk of a race condition arising, thereby inducing a discordance between the software and hardware status.
Change-Id: Icbb441112ae424bb369d2ed3aa0cca4e7cbf3534 Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@953abef9
DO-NOT-UPSTREAM: GENIO: mtk-tphy: correct the setting of phy_shared
set the bit clear/ set to the correct configuration
add an appropriate delay time
Change-Id: I9a61eb48a029e718fac3c5c201836de273236cc5 Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@51c11741
GENIO: arm64: dts: mediatek: mt8370: Remove MFG4 power domain
The GPU in mt8370 is mc2 rather than mc3, so power domain for mfg4 should be removed.
Accidentally enable the mfg4 power domain during startup may cause GPU registers fail to read and write.
CR-Id: ALPS08538455 Change-Id: I6afee3df5b52eedf3d7f8de9b20851df1a6a602d Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@4ea4db08
GENIO: arm64: dts: mediatek: genio-350-evk: add lvds and lvds_tx nodes
Add lvds and lvds_tx nodes to support lvds function. The nodes are further enabled by a dtbo
Change-Id: I6152b6e0e721d0b2410cb9a4edc320881f79bd66 Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@309fa93b
GENIO: drm: mediatek: crtc: call mtk_mmsys_lvds_config for dpi output to lvds
Add check_output_to_lvds function pointer mechanism in mtk_crtc_ddp_hw_init function. If check_output_to_lvds returns 'true', which means that DPI needs to output to LVDS, call mtk_mmsys_lvds_config to config MMSYS LVDS settings.
Change-Id: Ifa94de8baeda165fa73f9621f4e856e5e719fd75 Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@b4defbe9
GENIO: soc: mediatek: mmsys: add mmsys register control api for lvds
In the mt8365 mmsys, there is a MMSYS_LVDS_CFG register (offset 0xfdc) used for enabling LVDS. i The relative bits are
DPI_CLK_SOURCE bit[0] 0: DPI uses the LVDS clock and output to LVDS 1: DPI uses the DPI clock and output to DPI GPIO pins
LVDS_SYS_CFG_PXL_CLK[17:16] 00: LVDS output FIFO disabled 11: LVDS output FIFO enbled
Add mtk_mmsys_lvds_config api for mtk_drm_drv driver to configure the MMSYS_LVDS_CFG register.
Additionally, add the has_lvds flag to the mmsys driver data to prevent platforms without LVDS modules from incorrectly invoking mtk_mmsys_lvds_config function. A warning message will be printed when the mtk_mmsys_lvds_config function is incorrectly invoked.
Change-Id: I9b61e8acd2d8d55ac39c71834539e9014f042a01 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7d5cbec9
GENIO: drm: mediatek: dpi: add lvds support
Add LVDS support to the DPI driver, primarily used for the LVDS function of Genio-350-EVK. The DPI module produces framebuffers to the LVDS module.
- Add the output_to_lvds flag to indicate whether the DPI output should be directed to LVDS. The output_to_lvds flag is assigned by reading dts property "mediatek,output-to-lvds"
- Add 4 lvds specific configurations. When output_to_lvds is set to 'true', the DPI driver utilizes the LVDS configurations instead. .lvds_cal_factor .lvds_output_fmts .lvds_num_output_fmts .lvds_limit
- Add mtk_dpi_check_output_to_lvds function. The MMSYS calls this function to check if DPI outputs to LVDS, and if so, it sets the relevant registers in MMSYS.
- Use mtk_dpi_config_lvds_enable function to switch DPI output to LVDS.
- When using LVDS, set EDGE_SEL to the register value DPI_OUTPUT_SETTING.
Change-Id: I423a70d2895fc8ff0d5c0cda7049148b267ed91d Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d7707875
GENIO: drm: mediatek: lvds: add mtk-lvds driver
Add the mtk lvds driver, mainly used for genio-350-evk lvds function. To use the lvds phy driver, enable CONFIG_MTK_LVDS_SUPPORT.
Change-Id: I7644561b3d047208fe84c44c09545df0b36da869 Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d3098f90
GENIO: phy: mediatek: add phy-mtk-lvds driver
Add the mtk lvds tx driver, mainly used for genio-350-evk lvds function. To use the lvds phy driver, enable CONFIG_PHY_MTK_LVDS
Change-Id: Ibb5ea396896318f790d47dc8d67d8c3fbbf74294 Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@2b8185a0
GENIO: dt-bindings: phy: add LVDS PHY binding YAML
Add LVDS PHY binding YAML mediatek,lvds-phy.yaml
Change-Id: Ie444a276e9a3189599f79eb27515b5f4b23c80a3 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@8f50c2ef
GENIO: drm/mediatek: panel: Add AUO G156XTN010 LVDS panel
Port AUO G156XTN010 for genio-350-evk. To use the AUO G156XTN010 driver, enable CONFIG_DRM_PANEL_AUO_G156XTN010_LVDS.
Change-Id: Ie1c7507f92d9d35bc37d742756e4892f091180e3 Signed-off-by: Huijuan Xie huijuan.xie@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@43d355de
GENIO: ASoC: mediatek: mt8195: fix null ptr access
Avoid using null ptr return from snd_soc_rtdcom_lookup
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c (1) Event returned_null: "snd_soc_rtdcom_lookup" returns "NULL". 86 struct snd_soc_component *component = 87 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); (3) Event cert_exp34_c_violation: Dereferencing a pointer that might be "NULL" "component". Also see events: [returned_null][var_assigned] 88 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
sound/soc/mediatek/mt8195/mt8395-evk.c (1) Event returned_null: "snd_soc_rtdcom_lookup" returns "NULL". 87 struct snd_soc_component *cmpnt_afe = 88 snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); (3) Event cert_exp34_c_violation: Dereferencing a pointer that might be "NULL" "cmpnt_afe". Also see events: [returned_null][var_assigned] 91 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt_afe);
Change-Id: Ibd42b017508b100de0a68c91e945c681c4c96ed8 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@75f373ae
GENIO: arm64: dts: mt8370: Fix apu efuse segment register
Update the correct register used by Genio boot firmware.
CR-Id: ALPS08179974 Change-Id: I87289aa725989fa865721bd430022d4b5f4d0d73 Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d9ff36cd
GENIO: arm64: dts: mt8188: Fix apu efuse segment register
Update the correct eFuse register for Genio boot firmware.
CR-Id: ALPS08179974 Change-Id: Ib28f2b3f01df2602836a3c1b4c917bf5910239f7 Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@147cafc9
GENIO: arm64: dts: mt8370: Add apu efuse segment register
Add APU efuse segment register for APU kernel driver to identify different segments.
Change-Id: Ide22e9064acd8415651388924d6686d8c1f06d6d Signed-off-by: Karl.Li karl.li@mediatek.com CR-Id: ALPS08179974 Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@67a9350c
GENIO: arm64: dts: mt8188: Add apu efuse segment register
Add APU efuse segment register for APU kernel driver to identify different segments.
Signed-off-by: Karl.Li karl.li@mediatek.com CR-Id: ALPS08179974 Change-Id: I5ec81da4f612dbeeb1d07fb2de810cbf4b225b04 Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@99706705
GENIO: arm64: dts: mediatek: mt8365-evk: Add DMIC codec for delay
-
When using DMIC, there is a problem of pop noise caused by the need for the DMIC components to settle. Adding a delay when enabling DMIC to prevent this issue.
-
User can decide the delay time according to the DMIC components in mt8365-evk.dts.
-
Adding dmic_codec for DMIC usage.
Change-Id: I5fa0ca4f0ad01fc5cd84919f8eff1d599197d4dd Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@80c9f5b4
GENIO: arm64: dts: mediatek: Fix SYSRST GPIO for 7663
As per the schematics, DMIC3_CLK (GPIO 126) is the correct GPIO to MT7663_SYSRSTB.
Change-Id: I4e3a987d850b950993f2207391aaa2631dc89d81 Signed-off-by: Andrew Perepech andrew.perepech@mediatek.com Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com (cherry picked from commit 10fe3514c456ba1bc4a2f9e5e8d12131263227cd)
--
Commit: seco-ne/kernel/linux-mtk@fb389689
GENIO: media: i2c: ar0330: Fix pixel rate range
Modify the v4l2 range for pixel_rate to be able to add the correct value to it. Also, define and use pixel_rate_max values for 1,2,4 lane configurations.
Change-Id: I41fbddb75cb4b210f0eb9f78f2338cf17b3e0f0b Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@820f4532
GENIO: arm64: dts: mt8365: modify thermal sustainable power
modify thermal sustainable power 1500->3000 when using IPA thermal governor
modify polling-delay-passive to 100ms
Change-Id: I87efd0d287c062b648c7271a2c31ba6cd5aa81c8 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@0aea6ca6
GENIO: arm64: dts: mt8195: modify thermal sustainable power
modify thermal sustainable power 1500->5000 when using IPA thermal governor
and modify polling-delay-passive to 100ms
Change-Id: I30d4f77f9ff70211e0f80fcdfa3cc43fe0c48f88 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@961ca663
GENIO: arm64: dts: mt8370: modify thermal sustainable power
modify thermal sustainable power 1500->3000 when using IPA thermal governor
Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@717ff39a
GENIO: arm64: dts: mt8188: modify thermal sustainable power
modify thermal sustainable power 1500->3000 when using IPA thermal governor
Change-Id: Id06259748ba16dddb345d33adcac85282ff75288 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@bf9b6a19
GENIO: arm64: dts: mediatek: genio-1200-evk-p1v1: Add DMIC codec for delay
-
When using DMIC, there is a problem of pop noise caused by the need for the DMIC components to settle. Adding a delay when enabling DMIC to prevent this issue.
-
User can decide the delay time according to the DMIC components in genio-1200-evk-p1v1.dts.
-
Adding amic_codec for PMIC headset and AMIC usage, and dmic_codec for DMIC usage.
Change-Id: Ia52d4dee470dc754ee5fce61aa72122d2ab85b7c Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@f5d7f757
GENIO: soc: mediatek: hdmirx: mt8195: Add portswitch test cmd
test command:
- switch to idle echo test:114,0 > /sys/kernel/debug/hdmirx
- switch to current port echo test:114,1 > /sys/kernel/debug/hdmirx
Change-Id: I69b15cf180f03a1ecaac19bf0473097ba9e66407 Signed-off-by: Macross Chen macross.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@46d9ab68
GENIO: soc: mediatek: hdmirx: mt8195: Support capture device probe defer
While capture_driver probe() return -EPROBE_DEFER, keep probing if hdmirx is in stable state.
Change-Id: Ie08f8cd4af3d75af1e1f916a4f7880c05f436680 Signed-off-by: Macross Chen macross.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7781acdc
Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
[ Upstream commit 2a05334d7f91ff189692089c05fc48cc1d8204de ]
It is not allowed to call kfree_skb() from hardware interrupt context or with hardware interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only.
Fixes: baac6276c0a9 ("Bluetooth: btusb: handle mSBC audio over USB Endpoints") Signed-off-by: Jinjie Ruan ruanjinjie@huawei.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com Signed-off-by: Sasha Levin sashal@kernel.org
--
Commit: seco-ne/kernel/linux-mtk@3aa3e8d2
FROMGIT: Bluetooth: btusb: add shutdown function for QCA6174
We should send hci reset command before bt turn off, which can reset bt firmware status.
Signed-off-by: Rocky Liao quic_rjliao@quicinc.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com (cherry picked from commit 75d095daab9fa1d299fa79ebc7ab5dfbead877ca git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/ master)
BUG=b:292207578 TEST=run sr_while_powered_off
Change-Id: I78aad75b2984c8e5e85e806ae3eb0027c908cdc2 Signed-off-by: Archie Pusaka apusaka@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4821168 Reviewed-by: Yun-Hao Chung howardchung@chromium.org (cherry picked from commit 070e0b1efa6ac2dcd9aca0cbc1554abe238b0529) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4853161 Reviewed-by: Sean Paul sean@poorly.run
--
Commit: seco-ne/kernel/linux-mtk@a7fdfee4
Bluetooth: btusb: Add MT7922 bluetooth ID for the Asus Ally
[ Upstream commit fa01eba11f0e57c767a5eab5291c7a01407a00be ]
Adding the device ID from the Asus Ally gets the bluetooth working on the device.
Signed-off-by: Matthew Anderson ruinairas1992@gmail.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com Signed-off-by: Jakub Kicinski kuba@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org
--
Commit: seco-ne/kernel/linux-mtk@38daad00
BACKPORT: Bluetooth: btusb: Add new PID/VID 0489:e0f2 for MT7921
This bluetooth device is found in a combo WLAN/BT card for a MediaTek 7921e.
The device information:
T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e0f2 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us
Cc: Sean Wang sean.wang@mediatek.com Cc: Anson Tsao anson.tsao@amd.com Signed-off-by: Mario Limonciello mario.limonciello@amd.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com (cherry picked from commit 83458a5f272b303479e7d2f451600817a7350b6b)
Conflicts: drivers/bluetooth/btusb.c - There's another pair of vid/pid near to this one in the upstream
BUG=b:296424755 TEST=Make sure BT is up and passed tast tests
Change-Id: I5231c70cdc613da993426aa6e9f5f68665c5af9f Signed-off-by: Hsin-chen Chuang chharry@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4790513 Commit-Queue: Hsin-chen Chuang chharry@google.com Tested-by: Hsin-chen Chuang chharry@google.com Auto-Submit: Hsin-chen Chuang chharry@google.com Reviewed-by: Archie Pusaka apusaka@chromium.org Commit-Queue: Archie Pusaka apusaka@chromium.org
--
Commit: seco-ne/kernel/linux-mtk@abca9a6f
FROMGIT: Bluetooth: btusb: mediatek: readx_poll_timeout replaces open coding
Use readx_poll_timeout instead of open coding to poll the hardware reset status until it is done.
Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com (cherry picked from commit 0ef3c847703a8174d55a44351447ad735879ff83 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master)
BUG=b:178754244 TEST=build on corsola
Change-Id: Ica950841500dae91f803470413ad250d6c885ed4 Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: Chris Lu chris.lu@mediatek.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4675423 Commit-Queue: Manish Mandlik mmandlik@chromium.org Tested-by: Sean Wang sean.wang@mediatek.corp-partner.google.com Reviewed-by: sean wang keyhaede@gmail.com Tested-by: sean wang keyhaede@gmail.com Reviewed-by: Manish Mandlik mmandlik@chromium.org Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: Sean Wang sean.wang@mediatek.corp-partner.google.com
--
Commit: seco-ne/kernel/linux-mtk@5c085058
FROMGIT: Bluetooth: btusb: Add support Mediatek MT7925
This patch is added support Mediatek MT7925.
- The firmware location of MT7925 will set to /lib/firmware/mediatek/mt7925
- Add Mediatek private data in hdev to record the device for handle MT7925 flow.
- Use the recoreded dev_id to condition chip reset flow.
The information in /sys/kernel/debug/usb/devices about the MT7925U Bluetooth device is listed as the below
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 27 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0e8d ProdID=7925 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 5 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8f(I) Atr=03(Int.) MxPS= 2 Ivl=125us I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us I:* If#= 3 Alt= 0 #EPs= 9 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=86(I) Atr=03(Int.) MxPS= 2 Ivl=125us
Signed-off-by: Peter Tsao peter.tsao@mediatek.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com (cherry picked from commit 1bce97d12984b800d98cc52b6b907485200a164d https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master)
BUG=b:178754244 TEST=build on corsola
Change-Id: I8b3a31f67d77fd342aaf987be51ccd18e8be4d41 Signed-off-by: Sean Wang objelf@gmail.com Signed-off-by: Chris Lu chris.lu@mediatek.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4675422 Commit-Queue: Manish Mandlik mmandlik@chromium.org Reviewed-by: Sean Wang sean.wang@mediatek.corp-partner.google.com Tested-by: Sean Wang sean.wang@mediatek.corp-partner.google.com Reviewed-by: sean wang keyhaede@gmail.com Reviewed-by: Sean Paul sean@poorly.run Reviewed-by: Manish Mandlik mmandlik@chromium.org Tested-by: sean wang keyhaede@gmail.com
--
Commit: seco-ne/kernel/linux-mtk@0ef5483c
FROMGIT: Bluetooth: btmtk: add printing firmware information
Add printing firmware information part when driver loading firmware that user can get mediatek bluetooth information.
Co-developed-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Sean Wang sean.wang@mediatek.com Signed-off-by: Chris Lu chris.lu@mediatek.com Signed-off-by: Luiz Augusto von Dentz luiz.von.dentz@intel.com (cherry picked from commit 5ebfb27d09e1d32589a35cc141b6df9129f6609c https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git)
BUG=b:287546612 TEST=emerge-cherry sys-kernel/chromeos-kernel-5_15 driver pass;driver will print MediaTek BT firmware information
Change-Id: I7aaaf26708b235721a55983f2ed3ca1c9c147f5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4659156 Reviewed-by: Ying Hsu yinghsu@chromium.org Tested-by: Chris Lu chris.lu@mediatek.com Reviewed-by: Hsin-chen Chuang chharry@google.com Reviewed-by: Sean Paul sean@poorly.run Tested-by: Ying Hsu yinghsu@chromium.org Reviewed-by: Chris Lu chris.lu@mediatek.com Commit-Queue: Ying Hsu yinghsu@chromium.org
--
Commit: seco-ne/kernel/linux-mtk@8a6199bd
GENIO: iio: adc: mt6577_auxadc: add support for IIO_CHAN_INFO_SCALE
Add the IIO_CHAN_INFO_SCALE mask support in order to allow users of the auxadc to easily be able to interpret the value read for the channels.
Change-Id: Id98e9d4ecdfbbac77ca07876388c6494c3b3e746 Signed-off-by: Fabien Parent fparent@baylibre.com
--
Commit: seco-ne/kernel/linux-mtk@6598d8b0
GENIO: iio: adc: mt6577_auxadc: add support for IIO_CHAN_INFO_RAW
Add support for the IIO_CHAN_INFO_RAW mask. It probably should have been supported from the beginning instead of IIO_CHAN_INFO_PROCESSED, but let's keep that one for compatibility.
Change-Id: Ic49032445cc0365914d270e2f3e916202d8d2ca6 Signed-off-by: Fabien Parent fparent@baylibre.com
--
Commit: seco-ne/kernel/linux-mtk@a650e67a
GENIO: drm/mediatek: panel: KOE TX18D204VM0BAA: add usage of power regulator
The it6122 bridge power shares the pwr_en GPIO pin with panel-koe-tx18d204vm0baa. To allow both the it6122 and the panel drivers to enable the power separately, utilize a GPIO regulator.
The panel-koe-tx18d204vm0baa driver currently enables and disables the pwr_en using GPIO operations. Replace these operations with regulator operations.
Additionally, modify it6122_bridge_enabled to it6122_bridge_probed to reflect the naming change.
Change-Id: I98e73c92a2928b988f29e9d0f66e0f6ca040ac24 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d3342cf3
GENIO: drm/mediatek: bridge: it6122: add usage of power regulator
The it6122 bridge power shares the pwr_en GPIO pin with panel-koe-tx18d204vm0baa. To allow both the it6122 and the panel drivers to enable the power separately, utilize a GPIO regulator.
Add the power regulator usage flow as follows:
-
in it6122_power_on_off Enable the regulator for the 'on' case and disable it for the 'off' case. This function is called when suspending or resuming to power off or on the it6122.
-
in it6122_probe Enable the regulator to read the chip ID and then disable it after the read operation. If the regulator is not disabled in it6122_probe, it will be enabled again in the subsequent it6122_power_on_off call with the 'on' case, and then it will remain enabled during suspend because the it6122_power_on_off call with the 'off' case will only disable it once.
-
modify it6122_bridge_enabled to it6122_bridge_probed Since it6122_probe disables the power regulator, this function actually returns if the it6122 is probed, rather than enabled.
Change-Id: I5e423fd8ca2f5617aa80347c146531c066064d50 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@c80fabf8
GENIO: ASoC: mediatek: mt8188: Set I2S inputs to slave mode
To verify the functionality of I2S inputs, set "ETDM1_IN_BE" and "ETDM2_IN_BE" to slave mode.
Change-Id: Iaf6e5d30c3307b626ffc632d2112ec1da5249a8b Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@23ffb1c7
GENIO: arm64: dts: mediatek: genio-510-evk: Update sound card name
The sound card name used on Genio 510 EVK is mt8370-evk. The model name "mt8390-evk" should be replaced with "mt8370-evk" in the dts.
Change-Id: If6581c4de629eb9850c15513252bc55feec223dd Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@6cffdcb7
GENIO: arm64: dts: mediatek: genio-510-evk: Add DMIC codec for delay
-
Adding a delay when enabling DMIC to prevent pop noise issue.
-
User can decide the delay time according to the DMIC components in genio-510-evk.dts.
-
Adding amic_codec for PMIC headset usage, and dmic_codec for DMIC usage.
Change-Id: I906b779ce993a6e1f3180c623386dc4c11dba17f Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@0502b86d
GENIO: arm64: dts: mediatek: mt8370: Remove DMIC codec
Move dmic_codec from mt8370.dtsi to genio-510-evk.dts.
Change-Id: Id37290e56134e3e94b0280d9570f385c63baa4e1 Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@c00d04d5
GENIO: arm64: dts: mediatek: mt8195-demo: Add DMIC codec for delay
-
Adding a delay when enabling DMIC to prevent pop noise issue.
-
User can decide the delay time according to the DMIC components in mt8195-demo.dts.
-
Adding amic_codec for PMIC headset usage, and dmic_codec for DMIC usage.
Change-Id: I4cf3304d085875687aef395e07690fe52a844678 Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7eb23503
GENIO: arm64: dts: mediatek: genio-1200-evk: Add DMIC codec for delay
-
When using DMIC, there is a problem of pop noise caused by the need for the DMIC components to settle. Adding a delay when enabling DMIC to prevent this issue.
-
User can decide the delay time according to the DMIC components in genio-1200-evk.dts.
-
Adding amic_codec for PMIC headset and AMIC usage, and dmic_codec for DMIC usage.
Change-Id: I5c142947d9615649c2948a2c21f21902b49f1a75 Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@22dee5f8
GENIO: arm64: dts: mediatek: mt8195: Remove DMIC codec
Move dmic_codec from mt8195.dtsi to genio-1200-evk.dts.
Change-Id: Ieda7b377b6d15d4e2fd78934a03379baf6ffc37f Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@102f90e8
GENIO: arm64: dts: mediatek: genio-700-evk: Add DMIC codec for delay
-
When using DMIC, there is a problem of pop noise caused by the need for the DMIC components to settle. Adding a delay when enabling DMIC to prevent this issue.
-
User can decide the delay time according to the DMIC components in genio-700-evk.dts.
-
Adding amic_codec for PMIC headset and AMIC usage, and dmic_codec for DMIC usage.
Change-Id: I524f431b8354a623062dc6f8c3cf15feafb1ba7f Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@987f1a9a
GENIO: arm64: dts: mediatek: mt8188: Remove DMIC codec
Move dmic_codec from mt8188.dtsi to genio-700-evk.dts.
Change-Id: I3e467f2a9fde29d968fac99ac8122c3558a1f041 Signed-off-by: Zoran Zhan zoran.zhan@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d8840f69
GENIO: arm64: dts: mt8370: add apdma device node
- Add apdma device node
- Add dma property to uart node
Change-Id: Ie3e0fb89e33ff16b6575670403b1d541d5012802 Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@5c7cfcf7
GENIO: arm64: dts: mt8188: add uart3 apdma support
Add dma property to uart3 node
Change-Id: If793ffedce2600ee355df1ba0b557c3a24c3f7f2 Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@013588c0
GENIO: arm64: dts: mt8370: disable idle states below mcusysoff
The deep idle state is designed to significantly save power during CPU idle periods. However, it has the side effect of increasing CPU latency, which is not acceptable in industry applications. Therefore, we disable it by default.
Change-Id: I98befb9b1eb657667fab81c8256aad9d3037492e Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@c2a1248f
GENIO: ASoC: mediatek: mt8195: fix null ptr access in dmic gain enable
Fix coverity reported null pointer access
sound/soc/mediatek/mt8195/mt8195-dai-dmic.c (1) Event assign_zero: Assigning: "cached" = "NULL". 612 unsigned int *cached = 0; (12) Event cert_exp34_c_violation: Dereferencing null pointer "cached". Also see events: [assign_zero] 628 if (source == *cached)
We might compare source with NULL cached.
Change-Id: Ia2623b2fb3e93bc97a1af226187cd0e562674c24 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@f2d66a92
GENIO: ASoC: mediatek: mt8188: fix null ptr access in dmic gain enable
Fix coverity reported null pointer access
sound/soc/mediatek/mt8188/mt8188-dai-dmic.c (1) Event assign_zero: Assigning: "cached" = "NULL". 624 unsigned int *cached = 0; (12) Event cert_exp34_c_violation: Dereferencing null pointer "cached". Also see events: [assign_zero] 640 if (source == *cached)
We might compare source with NULL cached.
Change-Id: I358170226c67fb3bd812be24f10fb42c7b257553 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@595e6037
GENIO: media: platform: mtk-isp: isp_30: Fix IRQ locking
The irqlock is used to protect data modified in both interrupt context and user context. The latter uses spin_lock(), which doesn't disable local interrupts, and can thus cause a deadlock. Use spin_lock_irq() instead.
Similarly, usage of spin_lock_irqsave() in the interrupt handler is overkill, as there's a guarantee it will run in interrupt context, with local interrupts disabled. Use spin_lock() instead.
Change-Id: If50f702fc0b44e265a01cc9b04e40e195d5d46e4 Signed-off-by: Paul Elder paul.elder@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@a45e0262
GENIO: media: platform: mtk-isp: Don't call runtime PM with spinlock held
The runtime PM get/put functions may sleep. Call pm_runtime_get_sync() before locking the spinlock, and pm_runtime_put() after unlocking it.
Change-Id: I5758c1cda41ccf92c7d95eaf79cec59dae4f1850 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@463c7083
GENIO: media: platform: mtk-isp: Initialize the protect_mutex
The protect_mutex isn't initialized (or destroyed), leading to possible crashes, and warnings from the kernel. Fix it.
Change-Id: Ic07a27f359e1979ef57eb97d6f9bd15fef26d6f6 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@b02097d7
GENIO: media: platform: mtk-isp: End the OF match table with a sentinel
OF match tables must end with a sentinel. Fix it.
Change-Id: I637ca61b2dee676893f28c4048bfc1a7f7cdc5c4 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@86225c0e
GENIO: media: platform: mtk-isp: Properly store buffer CPU address
The mtk_cam_dev_buffer structure contains a dma_addr_t fhaddr field, used for two purpose:
- To store the DMA address of the buffer's second plane
- To store the CPU virtual address of the buffer, for dummy buffers only
The second plane's DMA address is never used, and using a dma_addr_t to store a CPU virtual address results in a compilation warning.
Turn the fhaddr field into a void *, renaming it to vaddr to clarify its purpose, and stop storing the second plane's DMA address.
Change-Id: I181d12e98fae120ccfd6c62d1a7ff777985df706 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@a820463c
GENIO: soc: mediatek: mutex: Add explicit braces to fix compiler warning
Multiple code constructs with nested if's and for's are flagged as ambiguous by the compiler:
drivers/soc/mediatek/mtk-mutex.c: In function ‘mtk_mutex_cross_sys_config’: drivers/soc/mediatek/mtk-mutex.c:956:28: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] 956 | if (mtx0->data->mutex_cross_sys_config[i].mutex_sys_id == aliasid0) | ^ drivers/soc/mediatek/mtk-mutex.c:973:28: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] 973 | if (mtx1->data->mutex_cross_sys_config[i].mutex_sys_id == aliasid1) | ^ drivers/soc/mediatek/mtk-mutex.c: In function ‘mtk_mutex_cross_sys_deconfig’: drivers/soc/mediatek/mtk-mutex.c:1006:28: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] 1006 | if (mtx0->data->mutex_cross_sys_config[i].mutex_sys_id == aliasid0) | ^ drivers/soc/mediatek/mtk-mutex.c:1023:28: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else] 1023 | if (mtx1->data->mutex_cross_sys_config[i].mutex_sys_id == aliasid1) | ^
Improve them by adding explicit braces.
Change-Id: Ic623ada15c607caa6c84842378ccd80eace3f356 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@2fd61c20
GENIO: soc: mediatek: mmsys: Drop unused variable
The ret variable in the mtk_mmsys_cross_sys_unprepare() function is unused, which if flagged by a compiler warning:
drivers/soc/mediatek/mtk-mmsys.c: In function ‘mtk_mmsys_cross_sys_unprepare’: drivers/soc/mediatek/mtk-mmsys.c:325:16: error: unused variable ‘ret’ [-Werror=unused-variable] 325 | int i, ret; | ^~~
Drop it to get rid of the warning.
Change-Id: I71486c9767d607b314a7b14faa827fdfe13b6eea Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@60cb7e55
GENIO: soc: mediatek: cmdq: Fix pointer arithmetic
Casting a pointer to a u32 for the purpose of pointer arithmetic will fail on 64-bit architectures if the pointer points to a location above the 4GB limit. This is caught by the compiler, which produces a warning:
drivers/soc/mediatek/mtk-cmdq-helper.c: In function ‘cmdq_pkt_poll_timeout’: drivers/soc/mediatek/mtk-cmdq-helper.c:795:60: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 795 | inst = (struct cmdq_instruction *)((u32)inst + CMDQ_INST_SIZE); | ^ drivers/soc/mediatek/mtk-cmdq-helper.c:795:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 795 | inst = (struct cmdq_instruction *)((u32)inst + CMDQ_INST_SIZE); | ^
Fix it by casting it to uintptr_t.
Change-Id: I6194cee4650f18b303f0e7237da518d92b55a134 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@d34f1bcd
GENIO: clk: mediatek: Fix mtk_clk_fixup_divider()
When switching to the common clock framework, the mtk_clk_fixup_divider() function made incorrect usage of the clk_hw_register() function. The function returns an error status as an int, while the caller expects it to return a struct clk_hw pointer. This breaks in obvious ways, and is even flagged with a compiler warning:
drivers/clk/mediatek/clk-mtk.c: In function ‘mtk_clk_fixup_divider’: drivers/clk/mediatek/clk-mtk.c:557:12: error: assignment to ‘struct clk_hw *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] 557 | hw = clk_hw_register(NULL, &fixup_div->divider.hw); | ^
Fix it.
Change-Id: I2e6a303b0bc318eaa8fcbfad05d2554e98d43464 Signed-off-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
--
Commit: seco-ne/kernel/linux-mtk@ae50f4b7
UPSTREAM: gcc-12: disable '-Wdangling-pointer' warning for now
While the concept of checking for dangling pointers to local variables at function exit is really interesting, the gcc-12 implementation is not compatible with reality, and results in false positives.
For example, gcc sees us putting things on a local list head allocated on the stack, which involves exactly those kinds of pointers to the local stack entry:
In function ‘__list_add’, inlined from ‘list_add_tail’ at include/linux/list.h:102:2, inlined from ‘rebuild_snap_realms’ at fs/ceph/snap.c:434:2: include/linux/list.h:74:19: warning: storing the address of local variable ‘realm_queue’ in ‘*&realm_27(D)->rebuild_item.prev’ [-Wdangling-pointer=] 74 | new->prev = prev; | ~~~~~~~~~~^~~~~~
But then gcc - understandably - doesn't really understand the big picture how the doubly linked list works, so doesn't see how we then end up emptying said list head in a loop and the pointer we added has been removed.
Gcc also complains about us (intentionally) using this as a way to store a kind of fake stack trace, eg
drivers/acpi/acpica/utdebug.c:40:38: warning: storing the address of local variable ‘current_sp’ in ‘acpi_gbl_entry_stack_pointer’ [-Wdangling-pointer=] 40 | acpi_gbl_entry_stack_pointer = ¤t_sp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
which is entirely reasonable from a compiler standpoint, and we may want to change those kinds of patterns, but not not.
So this is one of those "it would be lovely if the compiler were to complain about us leaving dangling pointers to the stack", but not this way.
Change-Id: Ibfcd41b76f49f09818710722d245ca654e4d2bef Signed-off-by: Linus Torvalds torvalds@linux-foundation.org (cherry picked from commit 49beadbd47c270a00754c107a837b4f29df4c822)
--
Commit: seco-ne/kernel/linux-mtk@198ac407
UPSTREAM: kbuild: Port silent mode detection to future gnu make.
Port silent mode detection to the future (post make-4.4) versions of gnu make.
Makefile contains the following piece of make code to detect if option -s is specified on the command line.
ifneq ((findstring s,(filter-out --%,$(MAKEFLAGS))),)
This code is executed by make at parse time and assumes that MAKEFLAGS does not contain command line variable definitions. Currently if the user defines a=s on the command line, then at build only time MAKEFLAGS contains " -- a=s". However, starting with commit dc2d963989b96161472b2cd38cef5d1f4851ea34 MAKEFLAGS contains command line definitions at both parse time and build time.
This '-s' detection code then confuses a command line variable definition which contains letter 's' with option -s.
$ # old make $ make net/wireless/ocb.o a=s CALL scripts/checksyscalls.sh DESCEND objtool $ # this a new make which defines makeflags at parse time $ ~/src/gmake/make/l64/make net/wireless/ocb.o a=s $
We can see here that the letter 's' from 'a=s' was confused with -s.
This patch checks for presence of -s using a method recommended by the make manual here https://www.gnu.org/software/make/manual/make.html#Testing-Flags.
Link: https://lists.gnu.org/archive/html/bug-make/2022-11/msg00190.html Reported-by: Jan Palus jpalus+gnu@fastmail.com Change-Id: Ifb496516622d30ad8d3c12ef97ddc84da19037c9 Signed-off-by: Dmitry Goncharov dgoncharov@users.sf.net Signed-off-by: Masahiro Yamada masahiroy@kernel.org (cherry picked from commit 4bf73588165ba7d32131a043775557a54b6e1db5)
--
Commit: seco-ne/kernel/linux-mtk@1c5313ba
GENIO: arm64: dts: mediatek: genio-510-evk: use dsi startek-kd070fhfid078
genio-510-evk default connected to a panel startek-kd070fhfid078 so modify dts settings to enable the driver ready panel.
mt8370.dtsi a. add disp_pwm1 device node for startek-kd070fhfid078 backlight control.
genio-510-evk.dts a. add backlight_lcd1 device node, which utilizes disp_pwm1. b. add dsi0_en regulator-gpio. LCM1_EN[GPIO111] controls panel power VSYS_LCM1 and VIO18_LCM1, which are provided by pmic regulators in genio-1200-evk. In order not to add more gpio controls to the panel driver, make GPIO111 as a regulator-gpio and use it as a regulator in the panel driver. c. modify dsi panel node to use startek-kd070fhfid078. d. add pinmuxes for disp_pwm1, dsi panel, and dsi0_en gpio pins.
Change-Id: Id4997b7036666c305526ce0d351e3eb62002c2c0 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@09c4b86c
GENIO: arm64: dts: mediatek: genio-1200-evk: fix no reg warning
Fix dts no reg warning
Change-Id: I57dbe0977fad3f007b840125c0920636f7ded5d3 Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@2033b2db
GENIO: arm64: dts: mediatek: mt8195: fix no reg warning
Fix thermal_zones no reg warning
Change-Id: I73b33b2386d1fbcf7f410bb0cbf23953c0f3ce9e Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@ce94a977
GENIO: arm64: dts: mediatek: genio-510-evk: modify memory size
Modify memory size to 4GB
Change-Id: Idfbd18d16ab789bd8a5dca46c3be4e12a48a3fac Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@d0a321ad
GENIO: drm/mediatek: ovl: disable layer when width or height equals zero
When modetest with cursor, the cursor layer may run out of the screen and giving the layer width or height equals zero. Enabling layer with zero width or height causes OVL hang.
As a result, disable the layer when width or height equals zero.
Change-Id: I12141f3a844c10b643a32831d0af8a6238b90d97 CR-Id: AUTO00256437 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@56710452
GENIO: pwm: add inversed polarity support for mtk_disp_pwm_apply
The brightness behavior is inversed for G1200 LVDS KOE TX18D204VM0BAA, so add inverse polarity support for mtk_disp_pwm_apply.
This patch adds two members to struct mtk_pwm_data:
bool support_polarity_inversed; Flag to show if the disp pwm supports inverse polarity. If PWM_POLARITY_INVERSED flag is set but the disp pwm does not support inverse polarity, mtk_disp_pwm_apply returns -EINVAL.
u32 polarity_mask; The bit to enable inverse polarity on the PWM Control Register. e.g. for mt8195, mt8188, and mt8365, set bit 2 of the PWM Control Register to enable inverse polarity.
This patch enables inversed polarity support to .compatible = "mediatek,mt8183-disp-pwm". mt8195, mt8188 and mt8365 all use "mediatek,mt8183-disp-pwm".
To set PWM_POLARITY_INVERSED flag, modify dts following the steps:
-
#include <dt-bindings/pwm/pwm.h> for PWM_POLARITY_INVERTED define note that in dts file "PWM_POLARITY_INVERTED" is used. Then in of_pwm_xlate_with_flags of drivers/pwm/core.c would translate it to PWM_POLARITY_INVERSED.
-
modify #pwm-cells = <3>; pwm-cells is usually <2>. use <3> to add one extra args filling PWM_POLARITY_INVERTED.
-
add PWM_POLARITY_INVERTED to the pwms args e.g. pwms = <&disp_pwm1 0 500000 PWM_POLARITY_INVERTED>;
Change-Id: I6995847067df0a72532ecb8613915641ca163c25 CR-Id: AUTO00279948 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@1f5b9d37
GENIO: arm64: dts: mt8365: modify thermal parameters
modify thermal parameters to prevent overheat
Change-Id: I710b2284112edec7f49f191f5f38194f126a6936 Signed-off-by: Kevin.Shen Kevin.Shen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@16b532dc
GENIO: arm64: dts: mediatek: mt8365-pumpkin: Set INT to push-pull
[Problem]: Pumpkin G350 does not have pull-up resistor on INT signal from it66121. In Open-Drain mode the signal is floating causing interrupt to be fired. As a result, one of the CPU cores is always busy with ~10% usage managing the interrupt.
[Solution]: Configure SOC pin with internal pull-up
Change-Id: Iae32001f84b7ad69f65a9701a31d11ac33bebb23 Signed-off-by: Andrew Perepech andrew.perepech@mediatek.com Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@965b0f74
GENIO: soc: mediatek: hdmirx: mt8195: Revise suspend notify flow
Notify TIMING_UNLOCK/AUDIO_UNLOCK/5V_CHANGED to clients before hdmirx power off, so the clients can handle these events correctly.
Change-Id: I6a834c6850f0d4e8775ed66b361b4c0eef6d4712 Signed-off-by: Macross Chen macross.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@cfe7dedb
GENIO: media: platform: mtk-mdp3: Revise m2m suspend flow
Do not flush capture jobs in m2m suspend. The lifecycle of mdp-capture is fully controlled by the hdmirx driver, and the jobs will be flushed while the hdmirx driver reqeuests to disconnect.
Change-Id: I12ccfa9e475e3f51e24c9015d3bcbdc38d9604be Signed-off-by: Macross Chen macross.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@60d0a8e3
GENIO: soc: mediatek: hdmirx: mt8195: Set default state to plugout
When no HDMI device is connected, do not send the unlock event during system startup.
Change-Id: I0a342fe606c6cfab18112d267ba014a84c1a4a75 Signed-off-by: bo xu bo.xu@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@4f1ae6c7
GENIO: drm/mediatek: cmdq: change print level when gce reg not found
since not every module needs gce, when gce reg not found in cmdq_dev_get_client_reg may not be a real error.
Therefore change the [can't parse gce-client-reg property] from dev_err to dev_dbg. Each cmdq_dev_get_client_reg caller should check return value by itself to make sure if cmdq_dev_get_client_reg works as expected.
CR-Id: AUTO00203387 Change-Id: Id8304f29d2757c851b62a4143c1ae326287d17e9 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@c5e19846
GENIO: drm/mediatek: plane: remove input layer addr offset
There are 2 places to add offset to input layer addr to tell OVL where to start reading A. mtk_plane_update_new_state() in mtk_drm_plane.c addr += (new_state->src.x1 >> 16) * fb->format->cpp[0]; addr += (new_state->src.y1 >> 16) * pitch;
B. mtk_ovl_layer_config() in mtk_disp_ovl.c addr += src_x * bpp + src_y * pitch;
Adding offset twice would cause OVL hw read from an error starting position. Moreover, reading full amount of the layer from the error starting position would cause out of bound access iommu fault.
For example, the cursor on Ubuntu Desktop is a 64x64 layer. When the cursor moves to the left border, it starts reading from coordinate (6,0) of the 64x64 layer and draws the remaining 58x64.
After adding the offset twice, the start reading position is not correct (say(12,0)), and read the remaining 58x64 cause iommu fault.
As a result, one of the offset adding must be removed. A. is removed in this patch because when VDOSYS0 is in dual pipe mode, B. helps calculate the reading position of the subpipe.
Change-Id: I9c71e323e27720baa64ae999f864e9c2e077e916 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@48644541
GENIO: media: platform: mtk-mdp3: Fix mdp-capture memory leak issue
The mutex/clk should only be enabled in 1st frame and released when streaming is stopped. There is no need for any additional allocation to comp in the process, which prevents memory leaks.
CR-Id: AUTO00271526 Change-Id: I384dd1c7a4072f0d685f2b34485b407fff1de91e Signed-off-by: Tammy.Chou tammy.chou@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@140cbd9f
FIXUP: GENIO: ASoC: mediatek: mt8195: fix dmic hw_gain enable
- missing } after else {
fixes: 6c49b3bd1d118c946dadfccd7538115bf934ce30 ("GENIO: ASoC: mediatek: mt8195: fix dmic gain enable flow")
Change-Id: Ia4979d8b36973446aa5af8fef59a46bae2c9d72d Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@23bc0e1c
GENIO: media: i2c: ap1302: Add AR0830 sensor support
This patch adds AR0830 sensor definition in AP1302 ISP driver. The driver can now distinguish the AR0830 sensor according to the sensor model specified in the DTS, and load the correct sensor firmware and power.
Change-Id: Ia2668d50f6f8c4c3ca94330c9c4ff38ff4fabe5d Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@3bfbb38f
GENIO: media: i2c: ap1302: Fix read console buffer failure
This patch is to limit the max size of read block to 128 bytes and loop until all console buffers are read. This prevents the AP1302 from timeout when reading console buffer.
Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com Change-Id: I2db87654be546df772c863e6765d375028db2908
--
Commit: seco-ne/kernel/linux-mtk@6692dd7a
GENIO: media: i2c: ap1302: Fix AE not working
This patch is to fix the issue that AP1302 AE is not working when the camera is opened for the first time.
Signed-off-by: Andy.Hsieh andy.hsieh@mediatek.com Change-Id: I6b1be60c25a5ecfce29c1634c4a2f6d717e6cc64
--
Commit: seco-ne/kernel/linux-mtk@6c49b3bd
GENIO: ASoC: mediatek: mt8195: fix dmic gain enable flow
- Fix dmic gain always on issue.
- Remove one-heart mode to ensure each dmic can be enabled independently.
Change-Id: I8becce25a2ca1ff814f461e8dd5790439175c70d Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7eb083c7
GENIO: ASoC: mediatek: mt8188: fix dmic gain enable flow
- Fix dmic gain always on issue.
- Remove one-heart mode to ensure each dmic can be enabled independently.
Change-Id: I0b991436fc80e0787598757d0f84e5996fddeda5 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@884a330f
GENIO: mediatek: rdma: fix DISP_RDMA_SIZE_CON_0 frame width mask
According to both mt8188 and mt8195 CODA, the frame width setting within the DISP_RDMA_SIZE_CON_0 register is [12:0], totally 13 bits in length. Therefore the mask should be 0x1fff, instead of 0xfff. Masking 0xfff would cause error results when width >= 4096
Change-Id: If5ebbbb2737ac2697a6f21f57ca17c739e042b40 Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@e2b89f40
GENIO: arm64: dts: mt8195: modify usb settings for rx fifo
[Problem]
- usb 2.0 lpm issues
- port0~port1 with u3 camera will have broken images
[Solution]
- for mt8195 port0~port3, default disable usb2.0 lpm
- modify port0 port1 rx fifo depth (cherry pick from 7369923)
Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com Change-Id: I603c70384b7f3682bb631ed13d5f6e7f306c57d1
--
Commit: seco-ne/kernel/linux-mtk@9ac2e2a5
GENIO: usb: xhci-mtk: fix send redunct ACK issues
Some USB3.0 camera always have broken images, cause host send redunct ACK when received short packet with End of Burst flag. (cherry pick from 7369704)
Signed-off-by: Yow-Shin Liou yow-shin.liou@mediatek.com Change-Id: Id5d7b439c6757c30e4ef6d1ece77c291dece2183
--
Commit: seco-ne/kernel/linux-mtk@eb9b8325
GENIO: uart: apdma: mediatek: fix read and write indices sync
When DMA gets flushed or stopped, the DMA HW sets the write index to '0'. Hence, the corresponding read index must also be reset to '0' when the next DMA RX start gets issued. If not, the DMA driver will send ‘garbage’ data to the UART / TTY buffer because read and write indices get out of sync.
This commit initializes rx_status to default value, meaning that VFF_VALID_SIZE will be '0' when entering in the RX handler. In addition to that, when terminating the device, reset VFF_LEN to '0' so that the next RX start will reinitialize all DMA RX parameters, including the DMA's read index.
Change-Id: I1a35f00ca4c94430474f968b789ce245de5279b3 Signed-off-by: Felix Freimann felix.freimann@mediatek.com Signed-off-by: Vitor Sato Eschholz vsatoes@baylibre.com
--
Commit: seco-ne/kernel/linux-mtk@b477a454
GENIO: uart: apdma: mediatek: Fix how apdma closes an uart port
When a uart port is closed mtk_uart_apdma_chan_complete_handler() should be called to do a proper cleanup of some descriptors, otherwise the previous transaction stays on-going and no new rx interrupts are received.
Change-Id: I1ff3aab0c357560f13c798b1e7e8adf211e03aa9 Signed-off-by: Vitor Sato Eschholz vsatoes@baylibre.com
--
Commit: seco-ne/kernel/linux-mtk@c1a8b347
GENIO: arm64: dts: mt8195: add apdma device node
- Add apdma device node
- Add dma property to uart node
Change-Id: I9baced9acbf4529ff91a7be163fcdaed0428eace Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@03a08fe4
GENIO: arm64: dts: mt8188: add apdma device node
- Add apdma device node
- Add dma property to uart node
Change-Id: Ieb380b844bae0e7efc7a0872c21f2963e1567ae7 Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@07738a20
GENIO: arm64: dts: mt8188: disable idle states below mcusysoff
The deep idle state is designed to significantly save power during CPU idle periods. However, it has the side effect of increasing CPU latency, which is not acceptable in industry applications. Therefore, we disable it by default.
Change-Id: Idd0d17afba073529f8699344dc6f743dc64f4981 Signed-off-by: Chris-QJ Chen chris-qj.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@1f0a0ed1
BACKPORT: FROMLIST: drm/client: Send hotplug event after registering a client
Link: https://lore.kernel.org/linux-arm-kernel/20230718042326.80531-1-mario.limonciello@amd.com/T/
Generate a hotplug event after registering a client to allow the client to configure its display. Remove the hotplug calls from the existing clients for fbdev emulation. This change fixes a concurrency bug between registering a client and receiving events from the DRM core. The bug is present in the fbdev emulation of all drivers.
The fbdev emulation currently generates a hotplug event before registering the client to the device. For each new output, the DRM core sends an additional hotplug event to each registered client.
If the DRM core detects first output between sending the artificial hotplug and registering the device, the output's hotplug event gets lost. If this is the first output, the fbdev console display remains dark. This has been observed with amdgpu and fbdev-generic.
Fix this by adding hotplug generation directly to the client's register helper drm_client_register(). Registering the client and receiving events are serialized by struct drm_device.clientlist_mutex. So an output is either configured by the initial hotplug event, or the client has already been registered.
The patch is based on v6.4. Partial fixes are applied to mtk-v5.15. 1.drm_client_register() in drm_client.c, adds calling client hotplug after the client is added to list. 2.drm_fbdev_generic_setup() in drm_fb_helper.c, removes calling hotplug before calling drm_client_register().
Change-Id: I17ea2f3d26378648f312ccde5484525342fbad75 Signed-off-by: Mario Limonciello mario.limonciello@amd.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@7e554feb
GENIO: mmc: mtk-sd: Use readl_poll_timeout_atomic in msdc_reset_hw
Use atomic version of readl_poll_timeout, because msdc_reset_hw may be invoked in IRQ handler:
msdc_irq() -> msdc_cmd_done() -> msdc_reset_hw()
The following kernel BUG stack trace can be observed on Genio 1200 EVK after initializing MSDC1 hardware during kernel boot:
[ 1.187441] BUG: scheduling while atomic: swapper/0/0/0x00010002 [ 1.189157] Modules linked in: [ 1.204633] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.15.42-mtk+modified #1 [ 1.205713] Hardware name: MediaTek Genio 1200 EVK-P1V2-EMMC (DT) [ 1.206484] Call trace: [ 1.206796] dump_backtrace+0x0/0x1ac [ 1.207266] show_stack+0x24/0x30 [ 1.207692] dump_stack_lvl+0x68/0x84 [ 1.208162] dump_stack+0x1c/0x38 [ 1.208587] __schedule_bug+0x68/0x80 [ 1.209056] __schedule+0x6ec/0x7c0 [ 1.209502] schedule+0x7c/0x110 [ 1.209915] schedule_hrtimeout_range_clock+0xc4/0x1f0 [ 1.210569] schedule_hrtimeout_range+0x20/0x30 [ 1.211148] usleep_range_state+0x84/0xc0 [ 1.211661] msdc_reset_hw+0xc8/0x1b0 [ 1.212134] msdc_cmd_done.isra.0+0x4ac/0x5f0 [ 1.212693] msdc_irq+0x104/0x2d4 [ 1.213121] __handle_irq_event_percpu+0x68/0x280 [ 1.213725] handle_irq_event+0x70/0x15c [ 1.214230] handle_fasteoi_irq+0xb0/0x1a4 [ 1.214755] handle_domain_irq+0x6c/0x9c [ 1.215260] gic_handle_irq+0xc4/0x180 [ 1.215741] call_on_irq_stack+0x2c/0x54 [ 1.216245] do_interrupt_handler+0x5c/0x70 [ 1.216782] el1_interrupt+0x30/0x80 [ 1.217242] el1h_64_irq_handler+0x1c/0x2c [ 1.217769] el1h_64_irq+0x78/0x7c [ 1.218206] cpuidle_enter_state+0xc8/0x600 [ 1.218744] cpuidle_enter+0x44/0x5c [ 1.219205] do_idle+0x224/0x2d0 [ 1.219624] cpu_startup_entry+0x30/0x80 [ 1.220129] rest_init+0x108/0x134 [ 1.220568] arch_call_rest_init+0x1c/0x28 [ 1.221094] start_kernel+0x6c0/0x700 [ 1.221564] __primary_switched+0xc0/0xc8
Change-Id: I005b55c6e219924f0639b9f890314f9a36360f0e Signed-off-by: Pablo Sun pablo.sun@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@6e02d2b8
GENIO: dt-bindings: reset: mt8188: Modify VDOSYS1 reset control bit
Modify VDOSYS1 reset control bit for MT8188 to fix the "display output offset horizontally" issue.
The base address of reset registers is 0x1C1001D0 For examples, MT8188_VDO1_RST_MERGE0_DL_ASYNC (32 + 13) means the bit is at bit 13 of 0x1C1001D4
MT8188_VDO1_RST_HDR_VDO_FE0_DL_ASYNC (64 + 19) means the bit is at bit 19 of 0x1C1001D8
CR-Id: ALPS08321539 Change-Id: Ibd9289e0cc9b225e3481a2b97f1991a92b1d8e09 Signed-off-by: Tammy.Chou tammy.chou@mediatek.com Signed-off-by: Tommy Chen tommyyl.chen@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@da508620
GENIO: media: i2c: ar0330: Add Aptina AR0330 driver
AR0330 is a 3.4MP sensor that produces raw12 (SGRBG12) frames. Updates to the driver since K5.10 include:
- Make ar0330 driver CCS PLL compatible.
- Add Analogue Gain V4L2 control.
- Clean up
Change-Id: I7a101e6aecb0d07fe64c2236fb047cab24aa5dc6 Signed-off-by: Suhrid Subramaniam suhrid.subramaniam@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@4088ec02
GENIO: ASoC: mediatek: mt8188: add hdmi/dp jack pins
- register hdmi & dp jack controls, to activate jack control events
Change-Id: I956a134be70981add02ada633c545b23835b1ca8 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@91970b62
GENIO: ASoC: mediatek: mt8195: add hdmi/dp jack pins
- register hdmi & dp jack controls, to activate jack control events
Change-Id: I4e1c61eb4e756c7b175a0785ce1cb3b3af0e2d76 Signed-off-by: parkeryang Parker.Yang@mediatek.com
--
Commit: seco-ne/kernel/linux-mtk@f559ba21
GENIO: media: platform: mtk-mdp3: Fix null pointer access in try_fmt
There is no m2m_ctx in the frameparam from capture device, so, try to get mdp3 device by mdp_dev.
Change-Id: I6c793babf2c1e8444190477a635a30f98885e02e Signed-off-by: Macross Chen macross.chen@mediatek.com