guoyin.chen [Thu, 19 Oct 2017 11:00:02 +0000 (19:00 +0800)]
MA-10480 Make CONFIG_I2C_IMX to depend on CONFIG_ARCH_MXC_ARM64
imx8mscale evk uses the i2c imx driver to control the pfuze driver
otherwise pfuze driver wont be probed with I2C_IMX
Change-Id: Iaeacde58a4cbe34a3d18cb16814d2334c74c2b79
(cherry-picked from commit
ad7200824fa740a1fe9d418d3f949ff97b083bdf)
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
Li Jun [Mon, 16 Oct 2017 15:13:19 +0000 (23:13 +0800)]
MLK-16576 usb: phy: mxs: set hold_ring_off for USB2 PLL power up
USB2 PLL use ring VCO, when the PLL power up, the ring VCO’s supply also
ramp up. There is a possibility that the ring VCO start oscillation at
multi nodes in this phase, especially for VCO which has many stages, then
the multiwave will kept until PLL power down. Hold_ring_off(bit11) can
force the VCO in one determined state when VCO supply start ramp up, to
avoid this multiwave issue. Per IC design's suggestion it's better this
bit can be off from 25us after pll power up to 25us before USB TX/RX.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit
a094377f04c9ed2c8e702ee7bfab843caa03eb96)
Dong Aisheng [Wed, 18 Oct 2017 12:54:16 +0000 (20:54 +0800)]
MLK-16606-4 arm64: dts: imx8qm-mek: add flexcan support
CAN0 and CAN1 share the same transceiver STBY and EN signals while
CAN2 uses a separated one.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Dong Aisheng [Wed, 18 Oct 2017 12:44:30 +0000 (20:44 +0800)]
MLK-16606-3 arm64: dts: imx8qm-mek: add pca6416 IO expander support
NXP pca6416 is compatible with TI tca6416 and it's on M41 I2C bus.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Dong Aisheng [Wed, 18 Oct 2017 10:54:43 +0000 (18:54 +0800)]
MLK-16606-2 arm64: dts: imx8qm: add M40 and M41 I2C devices
add M40 and M41 I2C devices
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Dong Aisheng [Thu, 12 Oct 2017 11:43:39 +0000 (19:43 +0800)]
MLK-16606-1 clk: imx8qm: add M4 I2C clocks
There're two M4 I2C instances in MX8QM.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Richard Zhu [Tue, 17 Oct 2017 06:23:40 +0000 (14:23 +0800)]
MLK-16595 rpmsg: imx: enable multi-core string demo
Because that there are two M4 cores on iMX8QM.
Enable the multi-core string echo support.
BuildInfo:
- SCFW
a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Han Xu [Wed, 18 Oct 2017 20:52:37 +0000 (15:52 -0500)]
MLK-16609: arm64: dts: support flexspi on i.MX8QM MEK
add device tree node to support flexspi on i.MX8QM MEK board.
BuildInfo:
- SCFW
9e9f6ec6, IMX-MKIMAGE
e1b3bc76, ATF 0
- U-Boot
2017.03-00072-gfdcf70a
Signed-off-by: Han Xu <han.xu@nxp.com>
Shengjiu Wang [Mon, 16 Oct 2017 08:12:39 +0000 (16:12 +0800)]
MLK-16601: ARM64: dts: imx8mq: support spdif on mscale evk
Enable the spdif1 on mscale evk, the tx is tested with fly wire to
MX51EXP (sch-26109) board, rx is not tested(waiting the audio board).
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Sandor Yu [Tue, 17 Oct 2017 11:13:23 +0000 (19:13 +0800)]
MLK-16597: hdmi: Fix kernel dump issue
Kernel will dump when CONFIG_CC_STACKPROTECTOR_STRONG is enable.
[ 2.675537] CDN_API_HDMITX_Set_Mode_blocking ret = 0
[ 2.675550] Kernel panic - not syncing: stack-protector: Kernel stack
is corrupted in:
ffff000008ad5a50
[ 2.675550]
[ 2.675557] CPU: 2 PID: 1553 Comm: kworker/2:2 Not tainted
4.9.56-641868-gead64f8 #12
[ 2.675559] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 2.675576] Workqueue: events deferred_probe_work_func
[ 2.675578] Call trace:
[ 2.675587] [<
ffff00000808974c>] dump_backtrace+0x0/0x1d0
[ 2.675594] [<
ffff000008089930>] show_stack+0x14/0x1c
[ 2.675602] [<
ffff000008401650>] dump_stack+0x8c/0xac
[ 2.675609] [<
ffff0000081b0b24>] panic+0x13c/0x2a8
[ 2.675617] [<
ffff0000080c5ec4>] print_tainted+0x0/0xa4
[ 2.675624] [<
ffff000008ad5a50>] Afe_write+0x0/0x50
[ 2.675632] [<
ffff00000849aff0>] hdmi_init.constprop.3+0x188/0x1d0
[ 2.675638] [<
ffff00000849b264>] imx_hdmi_probe+0x22c/0x2ac
[ 2.675645] [<
ffff0000086d543c>] platform_drv_probe+0x50/0xc8
[ 2.675650] [<
ffff0000086d3530>] driver_probe_device+0x218/0x2b8
[ 2.675655] [<
ffff0000086d3710>] __device_attach_driver+0x98/0xe8
[ 2.675660] [<
ffff0000086d126c>] bus_for_each_drv+0x60/0xb0
[ 2.675665] [<
ffff0000086d31bc>] __device_attach+0xd4/0x128
[ 2.675669] [<
ffff0000086d38f8>] device_initial_probe+0x10/0x18
[ 2.675674] [<
ffff0000086d275c>] bus_probe_device+0x90/0x98
[ 2.675679] [<
ffff0000086d2bf0>] deferred_probe_work_func+0x7c/0xb0
[ 2.675685] [<
ffff0000080e1580>] process_one_work+0x144/0x434
[ 2.675690] [<
ffff0000080e1ec4>] worker_thread+0x200/0x4a4
[ 2.675696] [<
ffff0000080e81f0>] kthread+0xf0/0x104
[ 2.675701] [<
ffff000008082e80>] ret_from_fork+0x10/0x50
It is cause by array variable access exceed.
Fixed it with correct array size.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Liu Ying [Wed, 18 Oct 2017 02:43:20 +0000 (10:43 +0800)]
MLK-16600 gpu: imx: dpu: common: Initialize pixel link in resume() only if necessary
We should initialize pixel link in resume() for DPUv2 which
has pixel link quirks, but not for DPUv1 which hasn't the quirks.
Fixes:
0d7fa2aa1a9f ("MLK-16581-6 gpu: imx: dpu: Add system power management support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Richard Zhu [Mon, 16 Oct 2017 02:18:07 +0000 (10:18 +0800)]
MLK-16586-3 rpmsg: imx: enable multi-core rpmsg
- Init multi-core mu power and clk.
- enable the multi-core rpmsg support
BuildInfo:
- SCFW
a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Tested-by: Andy Duan <fugang.duan@nxp.com>
Richard Zhu [Mon, 9 Oct 2017 08:23:50 +0000 (16:23 +0800)]
MLK-16586-2 ARM64: dts: imx: enable multi-core rpmsg support
Because there are two m4 cores on imx8qm,
enable imx8qm multi-core rpmsg support
BuildInfo:
- SCFW
a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Andy Duan <fugang.duan@nxp.com>
Tested-by: Andy Duan <fugang.duan@nxp.com>
Richard Zhu [Mon, 9 Oct 2017 08:25:33 +0000 (16:25 +0800)]
MLK-16586-1 clk: imx8qm: add the cm41 ipg clk
Add the cm41 ipg clk
BuildInfo:
- SCFW
a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Tested-by: Andy Duan <fugang.duan@nxp.com>
Ranjani Vaidyanathan [Thu, 28 Sep 2017 18:48:23 +0000 (13:48 -0500)]
MLK16557 soc:imx8qm/imx8qx - Resources can request low power idle mode only when runtime-pm is enabled.
Some drivers use runtime PM callbacks during suspend/resume also and this
in turn results in SCFW calls requesting the resource to enter
low power idle instead OFF state.
This patch fixes this issue by ensuring that low power IDLE request is only
valid when runtime PM is enabled. Runtime PM is disabled when the system is
entering suspend state.
BuildInfo: SCFW
7a725203, IMX-MKIMAGE
ee6adff0, ATF 0
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Yuchou Gan [Mon, 16 Oct 2017 17:29:36 +0000 (01:29 +0800)]
MGS-2717-2 [#ccc] Error message printed on board that didn't support gpu govern when rmmod galcore
When rmmod galcore.ko on boards that didn't support gpu govern,
some error message will be printed on console, do something to prevent this.
Date: Oct 16, 2017
Signed-off-by: Yuchou Ganyuchou.gan@nxp.com
Reviewed-by: Xianzhong xianzhong.li@nxp.com
Reviewed-by: Prabhu Sundararaj prabhu.sundararaj@nxp.com
Liu Ying [Fri, 13 Oct 2017 05:22:16 +0000 (13:22 +0800)]
MLK-16581-7 drm/imx: ldb: Add system power management support
This patch adds system power management support for imx-ldb drm driver
by proper PHY power/exit/init handling where necessary and pixel link
re-initialization in the resume operation. The driver depends on the
imx-drm core driver to handle ldb bridge power management operations.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 05:08:41 +0000 (13:08 +0800)]
MLK-16581-6 gpu: imx: dpu: Add system power management support
The dpu core driver currently depends on the client drivers
to do suspend operations to leave dpu a cleaned up state
machine status before the system enters sleep mode. When the
system resumes, the dpu core driver resume operation will
re-initialize the machine state by enabling intsteer lines,
re-initializing pixel links and re-initializing dpu sub-units.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 05:05:47 +0000 (13:05 +0800)]
MLK-16581-5 gpu: imx: dpu: common: Add helper dpu_intsteer_enable_lines() support
This patch adds helper dpu_intsteer_enable_lines() support so that
users may enable intsteer lines with one function call.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 04:33:39 +0000 (12:33 +0800)]
MLK-16581-4 gpu: imx: framegen: Get pll & pixel clock rates before setting their rates
Due to i.MX8 clock issue, we need to get pll and pixel clock rates
before setting their rates when system resumes back from PM sleep mode,
otherwise, we'll fail to set the clock rates. So, this is a workaround
and it can be removed when the clock issue is properly fixed.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 04:30:46 +0000 (12:30 +0800)]
MLK-16581-3 drm/imx: ldb: Get bypass & pixel clock rates before setting their rates
Due to i.MX8 clock issue, we need to get bypass and pixel clock rates
before setting their rates when system resumes back from PM sleep mode,
otherwise, we'll fail to set the clock rates. So, this is a workaround
and it can be removed when the clock issue is properly fixed.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 03:47:51 +0000 (11:47 +0800)]
MLK-16581-2 phy: mixel-lvds-combo: Get PHY clock rate before setting it's rate
Due to i.MX8 clock issue, we need to get PHY clock rate
before setting it's rate when system resumes back from
PM sleep mode, otherwise, we'll fail to set the clock rate.
So, this is a workaround and it can be removed when
the clock issue is properly fixed.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Fri, 13 Oct 2017 03:37:18 +0000 (11:37 +0800)]
MLK-16581-1 phy: mixel-lvds: Get PHY clock rate before setting it's rate
Due to i.MX8 clock issue, we need to get PHY clock rate
before setting it's rate when system resumes back from
PM sleep mode, otherwise, we'll fail to set the clock rate.
So, this is a workaround and it can be removed when
the clock issue is properly fixed.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Chris Wilson [Wed, 7 Dec 2016 21:45:27 +0000 (21:45 +0000)]
drm: Take ownership of the dmabuf->obj when exporting
Currently the reference for the dmabuf->obj is incremented for the
dmabuf in drm_gem_prime_handle_to_fd() (at the high level userspace
interface), but is released in drm_gem_dmabuf_release() (the lowlevel
handler). Improve the symmetry of the dmabuf->obj ownership by acquiring
the reference in drm_gem_dmabuf_export(). This makes it easier to use
the prime functions directly.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Update kerneldoc.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161207214527.22533-1-chris@chris-wilson.co.uk
Cherry-picked
72a93e8dd52c9feea42f1258d555e6070680a347 from
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/
This is required by VSI to implement DRM support.
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Acked-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Han Xu [Thu, 12 Oct 2017 22:15:26 +0000 (17:15 -0500)]
MLK-16571-5: arm: dts: i.MX7ULP LPSPI IPG clock change
i.MX7ULP LPSPI also use both ipg/per clock for the module, which ipg
clock was not exposed. Add one dummy clock as ipg clock to make the
lpspi code neat and clear.
Reviewed-by: Pan Gao <pandy.gao@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 11 Oct 2017 20:55:41 +0000 (15:55 -0500)]
MLK-16571-4: lpspi: support nor chip access from lpspi
i.MX8QM connects the AT45DB041E nor chip to lpspi, change the lpspi
driver to request irq before bitbang starts, add both ipg and per clock
for i.MX8QM and add gpio cs to keep the cs asserted during nor access.
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Reviewed-by: Pan Gao <pandy.gao@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 11 Oct 2017 20:53:38 +0000 (15:53 -0500)]
MLK-16571-3: arm64: dts: add i.MX8QM lpspi device node
add the lpspi device node and change the peripheral to nor chip.
i.MX8QM also need both ipg and per clock for this module.
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Reviewed-by: Pan Gao <pandy.gao@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 11 Oct 2017 20:51:48 +0000 (15:51 -0500)]
MLK-16571-2: arm64: defconfig: enable lpspi and dataflash
To support the AT45DB041E nor chip on i.MX8QM base board, enable both
lpspi and dataflash in defconfig
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Reviewed-by: Pan Gao <pandy.gao@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 11 Oct 2017 20:50:07 +0000 (15:50 -0500)]
MLK-16571-1: Kconfig: arm64: enable lpspi for MXC_ARM64
enable the lpspi config for arm64 in Kconfig
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Reviewed-by: Pan Gao <pandy.gao@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Thu, 28 Sep 2017 14:59:51 +0000 (09:59 -0500)]
MLK-16572: mtd: gpmi-nand: change the NAND omux setting
use the dqs and re pins rather than dqs_n/dqs_p re_n/re_p pins for NAND
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Leonard Crestez [Fri, 13 Oct 2017 11:45:02 +0000 (14:45 +0300)]
gpu-viv: Fix build on imx6
Fixes:
83a60229d139 ("MGS-3214 gpu-viv: integrate 6.2.4 driver")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Xianzhong [Fri, 13 Oct 2017 11:15:34 +0000 (19:15 +0800)]
MGS-3214 gpu-viv: integrate 6.2.4 driver
add dmabuf/gem feature through drm galcore,
include more bug-fixing in gpu kernel driver.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Fugang Duan [Fri, 13 Oct 2017 08:23:04 +0000 (16:23 +0800)]
MLK-16585 net: fec: fixup: correct i.MX8QXP MAC address fuse mapping
i.MX8QXP has different fuse address with i.MX8QM, correct i.MX8QXP
MAC fuse word address.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Fri, 13 Oct 2017 06:47:51 +0000 (14:47 +0800)]
MLK-16584 ARM64: dts: imx8qm-mek: enable Murata 1CQ wifi bt
Add 1CQ wifi bt support for i.MX8QM MEK board.
- Support MEK onboard pcie0 M.2 interface, test pass on 1CQ wifi.
- Support HCI Uart interface, test pass on 1CQ bt.
- Add lpuart interface support for bt, console, mkbus.
BuildInfo:
- SCFW
d0458f9f, IMX-MKIMAGE
1c6fc7d8, ATF
a438801
- U-Boot
2017.03-00042-g543559e
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Thu, 28 Sep 2017 08:35:02 +0000 (16:35 +0800)]
MLK-16583 ARM64: dts: imx8qm/qxp: mek: add enet2 for base board
Add enet2 for MEK base board.
BuildInfo:
- SCFW
d0458f9f, IMX-MKIMAGE
1c6fc7d8, ATF
a438801
- U-Boot
2017.03-00042-g543559e
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Thu, 28 Sep 2017 07:38:49 +0000 (15:38 +0800)]
MLK-16582 ARM64: dts: imx8qxp: mek: add uart port2 and port3 for base board
Add uart port2 and port3 for MEK base board.
BuildInfo:
- SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Yuchou Gan [Fri, 13 Oct 2017 14:49:12 +0000 (22:49 +0800)]
MGS-2717-2 [#ccc] GPU Scaling governor
Implement the gpu scaling governor so that you can switch the clock rate in user space like this:
echo "overdrive" > /sys/bus/platform/drivers/galcore/gpu_mode
echo "nominal" > /sys/bus/platform/drivers/galcore/gpu_mode
echo "underdrive" > /sys/bus/platform/drivers/galcore/gpu_mode
or cat /sys/bus/platform/drivers/galcore/gpu_mode to get the supported modes/frequency and current running mode.
Date: Oct 11, 2017
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
Reviewed-by: Xianzhong <xianzhong.li@nxp.com>
Reviewed-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Yuchou Gan [Fri, 13 Oct 2017 14:44:53 +0000 (22:44 +0800)]
MGS-2717-1 [#ccc] GPU Scaling governor
Add operating-points for gpu in 8qm dtb
Date: Oct 13, 2017
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
Reviewed-by: Xianzhong <xianzhong.li@nxp.com>
Dong Aisheng [Thu, 12 Oct 2017 03:17:54 +0000 (11:17 +0800)]
MLK-16573-2 arm64: dts: imx8qxp-mek: add Flexcan supports
There're two Flexcan instances connected on MEK boards.
BuildInfo:
- SCFW
7945e5ca, IMX-MKIMAGE
1c6fc7d8, ATF
a438801
- U-Boot
2017.03-00047-g8fe8d6d
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Dong Aisheng [Thu, 12 Oct 2017 03:13:41 +0000 (11:13 +0800)]
MLK-16573-1 arm64: dts: imx8qxp-mek: add pca6416 IO expander support
NXP pca6416 is compatible with TI tca6416.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Dong Aisheng [Wed, 11 Oct 2017 02:06:42 +0000 (10:06 +0800)]
MLK-16559 flexcan: make MB mode be able to receive extend frame
By default Rx Mailbox filter’s IDE bit is always compared and RTR is
never compared despite mask bits which will result in MB can't receive
extend frames with random IDs. (CAN_CTRL2[EACEN] is 0)
Let's enables the comparison of both Rx Mailbox filter’s IDE and RTR bit
according to mask bits. Since mask bits are all set to 0 currently,
it makes MB can receive both standard and extend frames.
BuildInfo:
- SCFW
d0458f9f, IMX-MKIMAGE
1c6fc7d8, ATF
a438801
- U-Boot
2017.03-00046-g32bb4c7
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Anson Huang [Thu, 12 Oct 2017 13:34:11 +0000 (21:34 +0800)]
MLK-16546-2 soc: imx: pm-domains: support early power on resource after resume
On i.MX8QM/8QXP, for some resources which act as irq chip
etc., they need to be powered on earlier than device resume
phase, as they need to access registers, common power domain
resume is too late, so add syscore resume callback in pm
domain driver, for those resources with "early_power_on"
property set, they will be powered on at syscore resume phase,
by default, it supports 10 resources, and can be increased
if needed.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Anson Huang [Thu, 12 Oct 2017 13:31:11 +0000 (21:31 +0800)]
MLK-16546-1 ARM64: dts: freescale: imx8qxp: add early_power_on property
Introduce early_power_on property, for those power
domain nodes with this property set, power domain driver
will power them on at syscore resume phase, since some
resources need to be power on earlier than device resume
phase, like irq chip driver etc..
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 06:03:15 +0000 (14:03 +0800)]
MLK-13946-7: ARM64: defconfig: add CONFIG_SND_SOC_IMX_CDNHDMI
Commit
3f16567eedabd3 ("MLK-16538-4: defconfig: Add hdmi/dp driver to
default kernel build") removed audio HDMI from defconfig.
Add it back after fix the compile issue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 06:02:53 +0000 (14:02 +0800)]
MLK-13946-6: ARM64: dts: remove video-mode in hdmi audio node
according the new api, video-mode is not needed for hdmi audio, it is
replaced by protocol property.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 06:02:33 +0000 (14:02 +0800)]
MLK-13946-5: ARM64: dts: enable dp audio for imx8qm
Enable dp audio for imx8qm, define sai hdmi tx and rx node.
use property "procotol" to replace the "video-mode"
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 06:01:49 +0000 (14:01 +0800)]
MLK-13946-4: ASoC: imx-cdnhdmi: refine machine driver for api changes
Since commit
3f5780eb4520 ("MLK-16538-2: hdmi api: Relocate hdmi api
soure code") change the api. And hdmi video driver provide a new api
for hdmi audio. Machine driver need to be updated accrodingly
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 06:01:19 +0000 (14:01 +0800)]
MLK-13946-3: ASoC: fsl_sai: fix the xMR setting
When there is multi data line enabled, the xMR setting is
wrong if according to the channel number. which should
according to the slot number
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 05:58:51 +0000 (13:58 +0800)]
MLK-13946-2: hdp: add i2s clock for imx8qm hdmi audio
hdmi audio need to enable the i2s clock and i2s_bypass clock
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Thu, 12 Oct 2017 05:58:18 +0000 (13:58 +0800)]
MLK-13946-1: clk: imx8qm: fix the definition of HDMI I2S clock
The resource id of HDMI I2S clock is SC_R_HDMI_I2S, and SAI HDMITX
and HDMIRX clock need FUNCTION_NAME paremeter.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Sandor Yu [Wed, 11 Oct 2017 11:05:13 +0000 (19:05 +0800)]
MLK-16570-2: hdmi audio: Add hdmi audio config function
Add hdmi audio config function to hdmi driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Wed, 11 Oct 2017 11:00:58 +0000 (19:00 +0800)]
MLK-16570-1: hdp: Add hdp audio config function
Add hdp audio config function to hdp driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Liu Ying [Thu, 12 Oct 2017 06:55:45 +0000 (14:55 +0800)]
MLK-16575 gpu: imx: dpu: fetcheco: Correct dpu->fe_priv[] access in dpu_fe_init()
The array size of dpu->fe_priv is only 4. We need to access the correct
entry of the array by comparing the id passed in dpu_fe_init() with
the entries in the fe_ids array instead of using the id directly.
This may avoid out-of-boundary array access on dpu->fe_priv.
Fixes:
936b978c44f3 ("MLK-16075-11 gpu: imx: dpu: Add basic fetcheco units support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Thu, 12 Oct 2017 06:28:49 +0000 (14:28 +0800)]
MLK-16574 gpu: imx: dpu: layerblend: Fix layerblend_shdldsel()
The shadow load selection field of layerblend is at bit[2:1].
Thus, we need to shift to left by one bit for the selection value.
Fixes:
4ec895ea31a2 ("MLK-15001-11 gpu: Move ipuv3 and dpu to imx folder")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Sandor Yu [Wed, 11 Oct 2017 07:58:43 +0000 (15:58 +0800)]
MLK-16565: hdmi: Remove CEC clock setting in HDMI driver
HDMI CEC clock have management in HDMI CEC driver,
so bypass CEC clock in HDMI driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Fugang Duan [Wed, 11 Oct 2017 06:32:30 +0000 (14:32 +0800)]
MLK-16564-03 ARM: imx_v7_defconfig: enable rpmsg gpio driver
Enable CONFIG_GPIO_IMX_RPMSG to support rpmsg gpio driver in default.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Wed, 11 Oct 2017 06:22:10 +0000 (14:22 +0800)]
MLK-16564-02 dts: imx7ulp-evk: add rpmsg gpio PTA and PTB support
Add rpmsg gpio PTA and PTB support.
Since currently M4 image support dynamical channel allocation,
and reserve below memory for kernel service and app channel:
* --0x9FF00000~0x9FF0FFFF: pmic,pm,audio,keys,gpio
* --0x9FF10000~0x9FF1FFFF: pingpong,virtual tty
Change the rpmsg instances of A core part to sync with M core.
Test M4 image built from Wayne Feng, M4 image commit ID:
b1321d4aca82
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Fugang Duan [Tue, 26 Sep 2017 06:28:16 +0000 (14:28 +0800)]
MLK-16564-01 gpio: imx-rpmsg: add rpmsg virtual gpio driver
Add rpmsg virtual gpio driver support.
i.MX7ULP GPIO PTA and PTB resource are managed by M4 core, setup one
simple protocol with M4 core based on RPMSG virtual IO to let A core
access such GPIOs that is what the driver do.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Daniel Baluta [Mon, 2 Oct 2017 13:59:41 +0000 (16:59 +0300)]
MLK-16533: ARM64: dts: imx8qm-mek: Enable wm8960 codec
wm8960 can be found on i.mx8 QM MEK CPU board. It uses SAI1 as
a digital audio interface and also ASRC for rate conversion.
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Shengjiu Wang [Tue, 10 Oct 2017 09:12:46 +0000 (17:12 +0800)]
MLK-16563-3: ARM64: dts: support AUDIO IO board with imx8qxp-mek
AUDIO IO board (SCH-501-1-005960-A1) has CS42888 codec and connect
to MCIMX-8X-BB via PCIe.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Shengjiu Wang [Tue, 10 Oct 2017 09:06:26 +0000 (17:06 +0800)]
MLK-16563-2: ASoC: imx-cs42888: support 12.288MHz mclk of codec
The esai and cs42888 can use different mclk, which has different
frequency. But machine driver thought they are same frequency, which
may cause issue in some case.
Base on above conclusion, the codec can support 12.288MHz mclk.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Shengjiu Wang [Tue, 10 Oct 2017 08:59:50 +0000 (16:59 +0800)]
MLK-16563-1: ASoC: cs42xx8: reset the codec in the beginning of probe
In AUDIO IO board for imx8qxp mek, after board reset, the codec
failed to probe, system can't find codec device on i2c bus.
The reason is not clear, but add reset operation in the beginning of
probe can fix this issue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Weiguang Kong [Thu, 28 Sep 2017 04:49:49 +0000 (12:49 +0800)]
MLK-16545-2: ASoC: fsl_hifi4: add support to reset hifi4 codec
add cases to support resetting the hifi4 codec when receiving
HIFI4_RESET_CODEC command from the user space.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Weiguang Kong [Thu, 28 Sep 2017 04:44:17 +0000 (12:44 +0800)]
MLK-16545-1: uapi: mxc_hifi4: add reset command for hifi4
add reset command declaration into mxc_hifi4.h file,
this command is used to reset hifi4 codec when seeking
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Weiguang Kong [Fri, 29 Sep 2017 06:24:59 +0000 (14:24 +0800)]
MLK-16558: ASoC: fsl_hifi4: add reference counter for hifi4 device
When abnormal situation occurs and the current process terminates
abnormally, the hifi4 driver can't get the HIFI4_CODEC_CLOSE CMD
from user space to release the multi-codec resource, so the current
resource can't be used again.
Have found that the fsl_hifi4_close() function can be called
implicitly when process terminates abnormally, so add a reference
counter in fsl_hifi4_open() and fsl_hifi4_close() to check this
abnormal situation, when the number is same for opening and closing
hifi4 device, the multi-codec should be reinitialized again and
the hifi4 driver should send ICM_EXT_MSG_ADDR CMD to hifi4 framework
to initialize the multi-codec resources too.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Yuchou Gan [Mon, 9 Oct 2017 11:21:40 +0000 (19:21 +0800)]
MGS-3314 [#ccc] Enable GPU for 8QM MEK board
Enable GPU for 8QM MEK board
Signed-off-by: Yuchou<yuchou.gan@nxp.com>
Date: 9th Oct, 2017
Richard Zhu [Thu, 21 Sep 2017 08:46:26 +0000 (16:46 +0800)]
MLK-16530-3 rpmsg: imx: init mu and limit the pingpong cycles
- Init mu power and clk.
- Change the cycles of the pingpong demot refer to
the limitation of M4 side.
When the received data larger than 100, the
pingpong of M4 side would be finished.
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Richard Zhu [Thu, 21 Sep 2017 08:46:09 +0000 (16:46 +0800)]
MLK-16530-2 clk: imx8qm: add the cm40 ipg clk
Add the cm40 ipg clk
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Richard Zhu [Fri, 15 Sep 2017 06:41:23 +0000 (14:41 +0800)]
MLK-16530-1 ARM64: dts: imx8: enable rpmsg support
enable imx8qm rpmsg support, and validated the
pingpong demo.
add the mu power and clk on imx8qxp.
BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Sandor Yu [Fri, 29 Sep 2017 06:06:25 +0000 (14:06 +0800)]
MLK-16538-6: dts: Add hdmi property to imx8qm dts
-Add hdmi property item to imx8qm dts file.
-Connect hdmi to dpu1_disp0 port.
-Remove unnecessary clk from hdmi steer irq property.
-Fix typo for irqsteer_csi0
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 29 Sep 2017 04:43:30 +0000 (12:43 +0800)]
MLK-16538-5: dts: Rename hdmi fb driver compatible name
Rename imx8mq hdmi fb driver compatible name to "fsl,imx8qm-fb-hdmi".
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 29 Sep 2017 06:05:32 +0000 (14:05 +0800)]
MLK-16538-4: defconfig: Add hdmi/dp driver to default kernel build
Default enable hdmi/dp drm dirver.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 29 Sep 2017 06:22:36 +0000 (14:22 +0800)]
MLK-16538-3: hdmi/dp: Add imx8qm hdmi/dp driver
Add hdmi/dp drm architecture driver.
HDMI and DP driver can work in imx8qm ARM2 board.
The driver support basic hotplug function.
Default working mode is 1080p60.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Sandor Yu [Fri, 29 Sep 2017 06:16:27 +0000 (14:16 +0800)]
MLK-16538-2: hdmi api: Relocate hdmi api soure code
-Relocate hdmi api source code from drivers/video/fbdev/mxc/cdn_hdp
to drivers/mxc/hdp.
-Add displayport and hdcp api function.
-Move t28hpc_hdmitx function from api source code folder
to hdmi fb driver folder.
-Update imx8 hdmi fb driver according api source code change.
-Sync api source code with CDN_API_1_0_33 release.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 9 Oct 2017 03:51:42 +0000 (11:51 +0800)]
MLK-16538-1: clks: correct ipg_hdmi_clk_root clk parent
Correct imx8qm ipg_hdmi_clk_root clk parent name.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Leonard Crestez [Thu, 5 Oct 2017 14:03:01 +0000 (17:03 +0300)]
MLK-16225: imx8 pm: Check of_device_is_available
This patch causes imx8-pd nodes marked with status = "disabled" to be
ignored. This is very common in devicetree handling.
When running with xen the hypervisor will convert all xen,passthrough
properties to status = "disabled" before passing dtb to dom0. This patch
allows power domains to be marked this way and have them be ignored by
the host automatically.
The alternative is to remove the power domain nodes and references using
/delete-node/ and /delete-property/ and that gets messy.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Thu, 28 Sep 2017 16:24:59 +0000 (19:24 +0300)]
MLK-16225: clk: imx8qm: Add fsl,lpcg_base_offset property
Right now the imx8qm clock provider hardcodes physical addresses. In
virtualization scenarios the intermediate physical addresses visible
from a guest can be different. In theory a 1:1 mapping could be done but
that in xen it would overlap with hardcoded guest ram starting at
0x40000000.
Solve this by adding a property with a common offset for all lpcg
areas. This should be set in the guest dts.
In theory each lpcg block could be remapped with it's own offset but
that is not supported.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Leonard Crestez [Tue, 26 Sep 2017 14:53:17 +0000 (17:53 +0300)]
MLK-16225: clk: imx8: Do not register clocks for unowned resources
Registering clocks for unowned resources can result in lots of pointless
scfw errors and potential faults when attempting to use LPCG.
Solve this by checking ownership via sc_rm_is_resource_owned and
returning -ENODEV from clock registration functions. The top-level clock
provider is also modified so that it accepts such errors silently.
This is intended for xen but could also be useful for SCFW partitioning.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Leonard Crestez [Thu, 28 Sep 2017 16:23:01 +0000 (19:23 +0300)]
MLK-16225: clk: imx8qm: Add LPCG_ADDR macro
All this does is replace the cast from physical address with a macro in
order to make later changes easier.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Leonard Crestez [Wed, 4 Oct 2017 13:27:32 +0000 (16:27 +0300)]
MLK-16225: clk: imx8qm: Ignore imx8qm-acm node missing
This can happen in virtualization scenarios, so just skip registering
the associated clocks instead of failing to boot.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Leonard Crestez [Mon, 2 Oct 2017 16:58:39 +0000 (19:58 +0300)]
MLK-16225: clk: imx8qm: Remove initial prepare/enable for A-core clk
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Robert Chiras [Fri, 21 Jul 2017 11:51:25 +0000 (14:51 +0300)]
MLK-16056 clk: imx8qm: add new dsi clocks
Add clk for dsi0-i2c1, dsi1-i2c0 and dsi1-i2c1
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Adriana Reus [Wed, 20 Sep 2017 07:58:01 +0000 (10:58 +0300)]
MLK-16442-3: dts: imx8qm: Add clock parents for DC clocks.
Adds dt settings for the dpu driver to set the default clock
parents
- PLL1 (dc0_pll0_clk) for dispay0 and PLL2(dc0_pll1_clk) for display1.
Functionality is not changed from dpu driver perspective as the same
parents for the display clocks were used before.
The resulting clock topology for dc0_disp1 is:
dc0_pll1_div 1 1
1188000000 0 0
dc0_pll1_clk 2 2
1188000000 0 0
dc0_disp1_sel 1 1
1188000000 0 0
dc0_disp1_div 1 1
148500000 0 0
dc0_disp1_clk 1 1
148500000 0 0
(BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Adriana Reus [Wed, 20 Sep 2017 07:54:33 +0000 (10:54 +0300)]
MLK-16442-2: clk: imx8qm: Add mux for DC clocks.
DC clocks can choose their clock source between PLL1, PLL2 and
bypass input.
This patch introduces a multiplexer in the dc clock topology to
allow this choice and introduces one set of parents that will be used
for both display0 and display1 clocks.
Clock paths tested:
1. PLL2(dc0_pll1_clk)->DC0_DISP1(dc0_disp1_clk)->LVDS
2. BYP(dc0_bypass0_clk)->DC0_DISP1(dc0_disp1_clk)->LVDS
(BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Adriana Reus [Mon, 11 Sep 2017 07:44:58 +0000 (10:44 +0300)]
MLK-16442-1: clk: clk-mux-scu: Add new mux type.
Display clocks can choose their parrent between various clock sources
(ex pll1, pll2, bypass).
This patch adds a new mux type that uses the underlying support in scfw
to set/get a parent.
(BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Adriana Reus [Mon, 11 Sep 2017 07:29:48 +0000 (10:29 +0300)]
MLK-16442-0: clk: imx8: Remove imx_clk_divider2_scu duplicate declaration.
The imx_clk_divider2_scu is declared twice.
Remove the second occurrence.
(BuildInfo: SCFW
9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Fancy Fang [Fri, 29 Sep 2017 06:36:18 +0000 (14:36 +0800)]
MLK-16536-16 video: fbdev: dcss: change 'refcount' to 'struct kref' type
Use 'struct kref' type for 'refcount' field instead of
'atomic_t' to take advantage of 'kref_*()' interface
series. The benefit to do so can improve the defered
cfifo flush performance, since this defered flush does
not need to wait to be done until next vsync happens.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Tue, 26 Sep 2017 09:11:55 +0000 (17:11 +0800)]
MLK-16536-15 video: fbdev: dcss: improve cfifo wrapping handling
After changing the strategy to 'flush cfifo once per frame',
the cfifo wrapping handling should also be changed accordingly.
Now, when it is found that the cfifo has no enough room from 'in'
to the buffer end to hold the current commit, the 'commit_cfifo'
will cancel this commit and flush the cfifo workqueue before
restart the commit again.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Thu, 28 Sep 2017 14:09:47 +0000 (22:09 +0800)]
MLK-16536-14 video: fbdev: dcss: correct ret value for 'dcss_wait_for_vsync()'
The correct return value for 'dcss_wait_for_vsync()' when
it executes successfully should be '0'. But this current
value now gets from 'wait_event_interruptible_timeout()'
which returns non-zero value when the wait is not timeout.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Wed, 27 Sep 2017 07:49:41 +0000 (15:49 +0800)]
MLK-16536-13 video: fbdev: dcss: improve 'kfifo_to_end_len()' macro
The macro 'kfifo_to_end_len()' is used to get the length
between the current kfifo 'in' and the kfifo end. Previous
implementation has a short-coming under the new strategy
that multiple commits are combined into one cfifo flush.
For a simple example, commits 'A' and 'B' are going to be
combined into one flush, and the last byte of 'A' exactly
occupy the last byte of fifo coincidently. Then when handling
the 'B' commit, the old 'kfifo_to_end_len()' logic returns
the fifo size instead of 0, So the condition 'commit_size >
kfifo_to_end_len(&cfifo->fifo)' will be false and let 'B'
to be stored from fifo beginning which finally triggers
below kernel BUG log:
[ 568.558341] ------------[ cut here ]------------
[ 568.558343] kernel BUG at drivers/video/fbdev/mxc/imx_dcss.c:2261!
[ 568.558348] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 568.558354] Modules linked in:
[ 568.558362] CPU: 0 PID: 34 Comm: kworker/u8:1 Not tainted
[ 568.558364] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 568.558385] Workqueue: ctxld-wq dcss_ctxld_config
[ 568.558387] task:
ffff8000ba2d8c80 task.stack:
ffff8000ba2f8000
[ 568.558392] PC is at dcss_ctxld_config+0x1dc/0x1e8
[ 568.558396] LR is at dcss_ctxld_config+0x1dc/0x1e8
[ 568.558398] pc : [<
ffff0000084786c4>] lr : [<
ffff0000084786c4>]
pstate:
80000145
[ 568.558399] sp :
ffff8000ba2fbd30
[ 568.558404] x29:
ffff8000ba2fbd30 x28:
ffff8000ba1f0000
[ 568.558407] x27:
ffff8000ba0096a8 x26:
ffff8000ba9d8930
[ 568.558411] x25:
ffff8000ba3a2410 x24:
0000000000000003
[ 568.558414] x23:
0000000000000008 x22:
ffff8000ba9d8918
[ 568.558417] x21:
ffff8000ba9d88f0 x20:
ffff8000ba9d8818
[ 568.558421] x19:
ffff8000bbdd0080 x18:
ffffffffffffffff
[ 568.558424] x17:
0000ffff934c8b60 x16:
ffff0000081df178
[ 568.558427] x15:
ffff0000092db010 x14:
202c387830203d20
[ 568.558431] x13:
ffff0000092dafe0 x12:
ffff0000091be498
[ 568.558434] x11:
ffff0000091be498 x10:
ffff0000092d8650
[ 568.558437] x9 :
0000000000000000 x8 :
ffff8000bff7352f
[ 568.558441] x7 :
0000000000000000 x6 :
0000000000000016
[ 568.558444] x5 :
0000000000804738 x4 :
0000000000000000
[ 568.558447] x3 :
0000000000000140 x2 :
000000000000f9bd
[ 568.558450] x1 :
ffff8000ba2f8000 x0 :
0000000000000030
[ 568.558451]
[ 568.558453] Process kworker/u8:1 (pid: 34, stack limit =
0xffff8000ba2f8020)
...
[ 568.558541] Call trace:
[ 568.558545] Exception stack(0xffff8000ba2fbb60 to 0xffff8000ba2fbc90)
...
[ 568.558586] [<
ffff0000084786c4>] dcss_ctxld_config+0x1dc/0x1e8
[ 568.558595] [<
ffff0000080d3bb4>] process_one_work+0x11c/0x370
[ 568.558600] [<
ffff0000080d3e58>] worker_thread+0x50/0x4a0
[ 568.558606] [<
ffff0000080d9a70>] kthread+0xd0/0xe8
[ 568.558611] [<
ffff000008082e80>] ret_from_fork+0x10/0x50
[ 568.558616] Code:
d00055e1 aa1903e0 91074021 94056a66 (
d4210000)
[ 568.558623] ---[ end trace
faae62afa988e865 ]---
[ 568.558707] Unable to handle kernel paging request at virtual address
ffffffffffffffd8
[ 568.558709] pgd =
ffff8000bbda1000
[ 568.558712] [
ffffffffffffffd8] *pgd=
00000000fb7ad003
[ 568.558714] , *pud=
00000000fb6a0003
[ 568.558715] , *pmd=
0000000000000000
...
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Mon, 25 Sep 2017 04:24:54 +0000 (12:24 +0800)]
MLK-16536-12 video: fbdev: dcss: flush cfifo once per frame
Change the cfifo flush to be once per frame to combine
possible multiple flush requests in one frame into one
flush to improve performance. And during one frame, only
flush requests from different channels can be combined,
and the different requests from the same channel cannot
be combined into one flush.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Fri, 22 Sep 2017 14:41:53 +0000 (22:41 +0800)]
MLK-16536-11 video: fbdev: dcss: add '__maybe_unused' to 'dtg_irq_mask()'
The function 'dtg_irq_mask()' is not used at this
moment which caused gcc compiler generate the build
warning:
"‘dtg_irq_mask’ defined but not used [-Wunused-function]"
So add attribute '__maybe_unused' to 'dtg_irq_mask()'
functon definition to avoid this build warning.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Fri, 22 Sep 2017 14:37:24 +0000 (22:37 +0800)]
MLK-16536-10 video: fbdev: dcss: unmask 'IRQ_TC_LINE1' by default
Unmask the 'IRQ_TC_LINE1' when initialize it by default,
since the vsync count can be used as a reference count or
timestamp.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Fri, 22 Sep 2017 14:19:02 +0000 (22:19 +0800)]
MLK-16536-9 video: fbdev: dcss: remove undesired variables in 'dcss_set_par()'
The variables 'cinfo' and 'chan_info' both refer to the
same 'struct dcss_channel_info' data. So remove 'chan_info'
and its related variables to make code more clean.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Fri, 22 Sep 2017 14:10:33 +0000 (22:10 +0800)]
MLK-16536-8 video: fbdev: dcss: move 'ctxld_list' field to 'struct ctxld_fifo'
The 'ctxld_list' is more closely related to 'struct ctxld_info'
structure. So moving its definition to this structure is more
reasonable.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Thu, 21 Sep 2017 03:44:38 +0000 (11:44 +0800)]
MLK-16536-7 video: fbdev: dcss: abstract cfifo wq flush operation
Abstract the cfifo workqueue flush operation to a separate
interface 'finish_cfifo()'.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Wed, 20 Sep 2017 09:51:50 +0000 (17:51 +0800)]
MLK-16536-6 video: fbdev: dcss: split 'commit_to_fifo' into three parts
This commit split the function 'commit_to_fifo' into three
parts: 'alloc_cc()', 'commit_cfifo()' and 'flush_cfifo()'.
So that each of the three parts can be used as required,
but not used all together.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Wed, 20 Sep 2017 09:41:43 +0000 (17:41 +0800)]
MLK-16536-5 video: fbdev: dcss: move 'ctxld_wq' to 'struct ctxld_fifo'
The 'ctxld_wq' is more closely related to 'struct ctxld_info'
structure. So moving its definition to this structure is more
reasonable.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Wed, 20 Sep 2017 07:24:13 +0000 (15:24 +0800)]
MLK-16536-4 video: fbdev: abstract cfifo 'in' operation
Abstract the process that copy data from 'cb' to 'cfifo'
to a separate function from 'commit_to_fifo()'. This is
a refinement.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Fancy Fang [Tue, 19 Sep 2017 10:47:13 +0000 (18:47 +0800)]
MLK-16536-3 video: fbdev: dcss: replace 'kfifo_esize()' by 'esize'
When doing ctxld config, the 'esize' variable is already
assigned to the value derived from 'kfifo_esize()'. So
using the exsiting value instead of deriving it again.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>