1
0
Fork 0
Commit Graph

721338 Commits (3612d5be22cdbef9b04782e7344c4da252eb31a2)

Author SHA1 Message Date
Viorel Suman 3612d5be22 MLK-17817-2: ASoC: imx-ak4458: enable 16 channels in TDM mode
In TDM mode with Daisy Chain enabled (CPLD mode 0x04) DAC1 and DAC2
AK4458 codecs on audio board are able to play 16 channels, so extend
the TDM mode constraint to 16 channels.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit bc8b6a74175c2d120383875b00b5a2a44def9dd0)
2018-12-06 16:42:30 +02:00
Viorel Suman a2531cbb14 MLK-17817-1: ASoC: ak4458: enable daisy chain
Enable Daisy Chain if in TDM mode and the number of played
channels is bigger than the maximum supported number of channels.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
(cherry picked from commit 5ae97f159bfd9c4a37e7e60cd20aa3437041b251)
2018-12-06 16:42:29 +02:00
Sandor Yu 9e8cb59e91 MLK-20518: hdp: Fix memory out of bounds access
Fix memory out of bounds access.
Change arry type for functopn avi info frame,
Align the arry type and its length.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 2fc41a88c9da514ae3f377e7cb73f4df886f038e)
2018-12-05 14:57:58 +08:00
Huang Chaofan 66620c3d28 MLK-20494: Adjust update stream function for the format that need add
start code

Adjust update stream function for the format that need add start code

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 3b29245bc201f1090e46c70ca60e61093e27675e)
2018-12-04 10:46:10 +08:00
ming_qian 5061a195c6 MLK-20429-2:fix conformance test fail due to the struff data and eos
firmware commit patch:
1. report uStrBuffWrPtr and uFrameSize
2. don't append any eos nal

driver do some change to adapt the firmware's change
and use scnprintf instread of snprintf

Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-12-04 10:46:19 +08:00
Daniel Baluta b96a6eb09e MLK-20095: arm64: dts: Add support for ASRC with QXP arm2 board
Similar with QXP MEK we switch to ASRC to support
multiple rates.

Thus we introduce:
	- asrc clocks
	- make asrc PD depend on esai PD

Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit d804a5cac96d7d6071a2b4808a6ebe262f20952c)
2018-12-03 15:45:03 +02:00
Robert Chiras 027f47f2b8 MA-13638-2: arch: arm64: dts: Add display-timins node for dcss-rm67191
DCSS needs special display timings for MIPI-DSI panel in order to do a
proper display on it.
In order to not break other display controller using this panel, add
custom display-timings for this specific use-case

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-12-03 15:43:43 +02:00
Laurentiu Palcu e820bcc7b9 MA-13638-1: Revert "MLK-20361: drm/panel/raydium: increase vsync_len to 4"
This reverts commit 3c53532c466add234ac3ca2e70cefe80ea308b4f.

This change affects iMX8MM functionality, generating flicker.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-12-03 15:43:42 +02:00
Liu Ying a530794d7e MLK-20508 drm/imx: dpu: plane: Revert a patch related to tile to linear fb switch
The root cause of the on-the-fly switch from tile to linear fb switch issue
is identified, so the full modeset workaround is no more needed.

Patch "MLK-20506 gpu: imx: imx8_dprc: Set CROP_ULC_X/Y to be zero for linear fb"
is the correct fix for this issue.

Revert "MLK-20470 drm/imx: dpu: plane: Do full modeset for tile to linear fb switch"

This reverts commit 9245bbf650fdeb79ebf869d48b6bd1b43c2bcf3b.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 7812bebe9c60a6ce954ce5ad504a6be002835462)
2018-12-03 17:20:07 +08:00
Liu Ying 805e90af5f MLK-20506 gpu: imx: imx8_dprc: Set CROP_ULC_X/Y to be zero for linear fb
Nonzero CROP_ULC_X/Y are only valid for tile framebuffer cropping.
Thus, we should set them to be zero for linear framebuffer, otherwise,
an on-the-fly switch from tile framebuffer(with cropping enabled) to
linear framebuffer would cause hardware malfunction.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 4fc67aed944526545e6ee44d582b013a6327c8d1)
2018-12-03 17:20:06 +08:00
Richard Zhu 48b2f12afd MLK-20507 arm64: dts: use clkreq as gpio
- Since the l1ss is not enabled yet, configure
the clkreq# as gpio on 8qm/qxp mek boards.
Re-configure the clkreq# as input and open
drain when l1ss is enabled later.
- Correct the perst# configurations of 8qm.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit cb7ec372ae90798a46b11e979243c3f058d8b26f)
2018-11-30 15:11:43 +08:00
Andy Duan c06b71e6b8 arm64: dts: imx8qm/qxp: correct the interrupt line for adv7535
Correct the interrupt line for adv7535.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Tested-by: Robert Chiras <robert.chiras@nxp.com>
Acked-by: Fancy Fang <chen.fang@nxp.com>
2018-11-29 13:14:36 +02:00
Huang Chaofan 452f75715f MLK-20489 VPU: Add record for kalloc size and correct the judge for
record queue release

Add record for kalloc size and correct the judge for record queue
release

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
2018-11-29 11:42:02 +08:00
Robert Chiras d5968fe8d2 Revert "MA-12957: arm64: dts: imx8qm/qxp mek: Configure interrupts for adv7535"
This commit is breaking suspend/resume, so reverting it until a fix is
provided.

This reverts commit 47427ff4ce.
2018-11-28 15:10:32 +02:00
Robert Chiras cceeb839f4 Revert "MA-12957: arm64: dts: imx8qm/qxp mek: Correct interrupts for adv7535"
This commit is breaking suspend/resume, so reverting it until a fix is
provided.

This reverts commit 4a004884a4.
2018-11-28 15:09:56 +02:00
Laurentiu Palcu a49ffcd97c MLK-20361: drm/panel/raydium: increase vsync_len to 4
This is a work-around for the shifted display issue when using DCSS with
the DDR self-refresh disabled.

Also, make sure it works with LCDIF as well.

Increasing VSYNC length gives DCSS more time to fetch the data from RAM
before the next frame kicks in.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit 3c53532c466add234ac3ca2e70cefe80ea308b4f)
2018-11-28 13:47:45 +02:00
Liu Ying bab01e6580 MLK-20486 drm/imx: ldb: Cleanup enc&conn in ->unbind() if necessary
When the master imx-drm-core binding fails, component_bind_all()
in imx-drm-core ->bind() callback will unbind all bound components
first and then call drm_mode_config_cleanup().  Since the encoder
and connector(located in imx_ldb.imx_ldb_channel) are freed after
the ldb ->unbind() callback, drm_mode_config_cleanup() would
accidentally access the freed encoder and connector again.  To fix
this issue, we should cleanup the encoder and connector, i.e.,
remove them from the global encoder and connector lists, in the
->unbind() callback, so that, drm_mode_config_cleanup() won't find
them again in the lists.  However, we have to make sure they exist
before the cleanup in the ->unbind() callback, because imx-drm-core
->unbind() calls drm_mode_config_cleanup() first and then unbinds
all components via component_unbind_all().  Moreover, the connector
isn't created at the first place if a bridge exists, so the check
before the cleanup makes sense for this reason as well.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 6d3fd1316d67ff0e62fae4067b61fd3f2809dfa5)
2018-11-28 19:36:14 +08:00
Liu Ying 4c828b1d06 MLK-16302-2 drm/imx: dpu: crtc: Cleanup crtc in ->unbind() if necessary
When the master imx-drm-core binding fails, component_bind_all()
in imx-drm-core ->bind() callback will unbind all bound components
first and then call drm_mode_config_cleanup().  Since the crtc as
a member(base) of dpu_crtc is freed after the dpu crtc ->unbind()
callback, drm_mode_config_cleanup() would accidentally access the
freed crtc again.  To fix this issue, we should cleanup the crtc,
i.e., remove the crtc from the global crtc list, in the ->unbind()
callback, so that drm_mode_config_cleanup() won't find the crtc
again in the list.  However, we have to make sure the crtc exists
before the cleanup in the ->unbind() callback, because imx-drm-core
->unbind() calls drm_mode_config_cleanup() first and then unbinds
all components via component_unbind_all().

There is a probe deferral caused by the LDB component(later probed
GPIO resource) on some platforms(e.g., i.MX8QXP MEK), which causes
multiple times to try binding and triggers the issue described above.

This patch may fix the issue reported by KASAN:
[    3.217996] BUG: KASAN: use-after-free in drm_mode_config_cleanup+0x220/0x448
[    3.225149] Read of size 8 at addr ffff80000ad719b0 by task swapper/0/1
[    3.231769]
[    3.233279] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.78-05529-ge53ea0dba88e-dirty #43
[    3.241642] Hardware name: Freescale i.MX8QXP MEK (DT)
[    3.246793] Call trace:
[    3.249270] [<ffff20000808e7d0>] dump_backtrace+0x0/0x390
[    3.254690] [<ffff20000808eb74>] show_stack+0x14/0x20
[    3.259769] [<ffff20000968a108>] dump_stack+0xf8/0x158
[    3.264932] [<ffff20000830db10>] print_address_description+0x60/0x270
[    3.271396] [<ffff20000830dff0>] kasan_report+0x210/0x2f0
[    3.276818] [<ffff20000830c6f4>] __asan_load8+0x84/0xa8
[    3.282065] [<ffff200008ad4380>] drm_mode_config_cleanup+0x220/0x448
[    3.288447] [<ffff200008afa7b4>] imx_drm_bind+0x2b4/0x358
[    3.293863] [<ffff200008b2024c>] try_to_bring_up_master+0x20c/0x278
[    3.300148] [<ffff200008b20438>] component_add+0x180/0x300
[    3.305653] [<ffff200008b0b530>] dpu_bliteng_probe+0x30/0x48
[    3.311339] [<ffff200008b2e13c>] platform_drv_probe+0x74/0x108
[    3.317198] [<ffff200008b2b3c8>] driver_probe_device+0x3a0/0x4a8
[    3.323226] [<ffff200008b2b5a0>] __driver_attach+0xd0/0xd8
[    3.328735] [<ffff200008b27e78>] bus_for_each_dev+0xc0/0x140
[    3.334419] [<ffff200008b2a618>] driver_attach+0x30/0x40
[    3.339749] [<ffff200008b29d48>] bus_add_driver+0x2a8/0x320
[    3.345344] [<ffff200008b2c54c>] driver_register+0xb4/0x190
[    3.350941] [<ffff200008b2e054>] __platform_driver_register+0x7c/0x88
[    3.357410] [<ffff20000a228118>] dpu_bliteng_driver_init+0x1c/0x24
[    3.363613] [<ffff200008084540>] do_one_initcall+0xe0/0x260
[    3.369211] [<ffff20000a1c10f0>] kernel_init_freeable+0x230/0x2d8
[    3.375330] [<ffff2000096aa4a8>] kernel_init+0x10/0x118
[    3.380574] [<ffff2000080863c8>] ret_from_fork+0x10/0x18
[    3.385894]
[    3.387393] Allocated by task 1:
[    3.390642]  kasan_kmalloc+0xd0/0x180
[    3.394322]  kasan_slab_alloc+0x14/0x20
[    3.398174]  __kmalloc_node_track_caller+0x1ec/0x278
[    3.403157]  devm_kmalloc+0x8c/0x128
[    3.406753]  dpu_crtc_bind+0x38/0xbe0
[    3.410434]  component_bind_all+0x254/0x438
[    3.414638]  imx_drm_bind+0x1b0/0x358
[    3.418314]  try_to_bring_up_master+0x20c/0x278
[    3.422857]  component_add+0x180/0x300
[    3.426622]  dpu_bliteng_probe+0x30/0x48
[    3.430559]  platform_drv_probe+0x74/0x108
[    3.434676]  driver_probe_device+0x3a0/0x4a8
[    3.438966]  __driver_attach+0xd0/0xd8
[    3.442730]  bus_for_each_dev+0xc0/0x140
[    3.446663]  driver_attach+0x30/0x40
[    3.450251]  bus_add_driver+0x2a8/0x320
[    3.454103]  driver_register+0xb4/0x190
[    3.457960]  __platform_driver_register+0x7c/0x88
[    3.462687]  dpu_bliteng_driver_init+0x1c/0x24
[    3.467147]  do_one_initcall+0xe0/0x260
[    3.470997]  kernel_init_freeable+0x230/0x2d8
[    3.475366]  kernel_init+0x10/0x118
[    3.478867]  ret_from_fork+0x10/0x18
[    3.482447]
[    3.483941] Freed by task 1:
[    3.486837]  kasan_slab_free+0x88/0x198
[    3.490691]  kfree+0x70/0x210
[    3.493672]  release_nodes+0x538/0x5c0
[    3.497432]  devres_release_group+0x164/0x200
[    3.501801]  component_unbind.isra.4+0x98/0xb8
[    3.506257]  component_bind_all+0x3c8/0x438
[    3.510456]  imx_drm_bind+0x1b0/0x358
[    3.514131]  try_to_bring_up_master+0x20c/0x278
[    3.518671]  component_add+0x180/0x300
[    3.522434]  dpu_bliteng_probe+0x30/0x48
[    3.526375]  platform_drv_probe+0x74/0x108
[    3.530490]  driver_probe_device+0x3a0/0x4a8
[    3.534781]  __driver_attach+0xd0/0xd8
[    3.538551]  bus_for_each_dev+0xc0/0x140
[    3.542488]  driver_attach+0x30/0x40
[    3.546083]  bus_add_driver+0x2a8/0x320
[    3.549941]  driver_register+0xb4/0x190
[    3.553793]  __platform_driver_register+0x7c/0x88
[    3.558519]  dpu_bliteng_driver_init+0x1c/0x24
[    3.562979]  do_one_initcall+0xe0/0x260
[    3.566827]  kernel_init_freeable+0x230/0x2d8
[    3.571199]  kernel_init+0x10/0x118
[    3.574698]  ret_from_fork+0x10/0x18
[    3.578277]
[    3.579783] The buggy address belongs to the object at ffff80000ad71980
[    3.579783]  which belongs to the cache kmalloc-2048 of size 2048
[    3.592501] The buggy address is located 48 bytes inside of
[    3.592501]  2048-byte region [ffff80000ad71980, ffff80000ad72180)
[    3.604258] The buggy address belongs to the page:
[    3.609072] page:ffff7e00002b5c00 count:1 mapcount:0 mapping:          (null) index:0x0 compound_mapcount: 0
[    3.618926] flags: 0xfffc00000008100(slab|head)
[    3.623484] raw: 0fffc00000008100 0000000000000000 0000000000000000 00000001800f000f
[    3.631252] raw: dead000000000100 dead000000000200 ffff800010703400 0000000000000000
[    3.639007] page dumped because: kasan: bad access detected
[    3.644590]
[    3.646086] Memory state around the buggy address:
[    3.650898]  ffff80000ad71880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[    3.658134]  ffff80000ad71900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[    3.665370] >ffff80000ad71980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[    3.672599]                                      ^
[    3.677402]  ffff80000ad71a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[    3.684641]  ffff80000ad71a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 5fc482dbf423fff005214db5ac4ac2dcd5cae028)
2018-11-28 19:36:13 +08:00
Liu Ying aed3e47d01 MLK-16302-1 drm/imx: dpu: plane: Free dpu_plane when bailout from dpu_plane_init
The dpu_plane is allocated with kzalloc() in dpu_plane_init().
In case, dpu_plane_init() fails after that allocation, the bailout path
should free the dpu_plane, otherwise, there will be memory leakage.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 99cb80f855aafbe524519db635c3d03bd4cc8d85)
2018-11-28 19:35:54 +08:00
ming_qian a767b27ad8 MLK-20485: VPU Encoder:check encoder stream buf desc
1.avoid illegal wptr, rptr, start and end.
2.function show_instance_info is too long, split it into several small
functions
3.export dma detail info

Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-28 18:21:02 +08:00
Daniel Baluta 51a120cf6d MLK-20095-3: ASoC: fsl: dsp: Add ASRC clocks
We enable the ASRC clocks from CPU side. We only need
the following clocks: "mem", "ipg" and "asrc0..3".

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 586297d7d5855cf75e25f629ca495b8ac5c1bb96)
2018-11-28 11:48:51 +02:00
Daniel Baluta 7c5c84b7fe MLK-20095-2: arm64: dts: Make pd_asrc0 dependent on pd_esai0
Because now DSP supports ASRC we need to power up pd_asrc0
each time pd_esai0 is powered up.

Current power domain tree looks like this:

	* pd_audio
	  * pd_audio_clk0
	    * pd_audio_clk1
	      * pd_dma0_chan6
	        * pd_dma0_chan7
	          * pd_esai0
	      * pd_dma0_chan0
	        * pd_dma0_chan1
	          [....]
	         * pd_asrc0

We need to make pd_asrc0 dependent on pd_esai0, thus we move
pd_dm0_chan6 node as a child of pd_asrc0.

Thus, the new power domain hierarch will look like this:

	* pd_audio
	  * pd_audio_clk0
	    * pd_audio_clk1
	      * pd_dma0_chan0
	        * pd_dma0_chan1
	          [....]
	         * pd_asrc0
	           * pd_dma0_chan6
	             * pd_dma0_chan7
	              * pd_esai0

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 04c4825baad9344e5f3dfa1c69de3957199d3ab0)
2018-11-28 11:48:45 +02:00
Daniel Baluta 15b3af77cd MLK-20095-1: arm64: dts: Trim ASRC resources for DSP
We introduce ASRC clocks (only "ipg", "mem", "asrc0..3" are
relevant for us), then remove ASRC related EDMA channels and
interrupts lines because they will be managed by DSP.

There is one more step required: fire up the power domain for ASRC
this is tricky and will be done in the next patch.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit e9e613dc18a732e82227028f1c822862448ddc22)
2018-11-28 11:48:39 +02:00
Huang Chaofan 7e11e44fc9 MLK-20484 VPU: Remove debug log when boot and adjust some other codes
1. Remove debug log when boot
2. Add 8 for the vp8 frame length
3. correct some codes

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 1cbc438fade80f4d91851f1495852e43d2807f9d)
2018-11-28 17:27:42 +08:00
Andy Duan 7e0a54c772 MLK-20482 arm64: dts: imx8qm/imx8qxp: remove the LP 32KHz input for Murata 1CQ module
Once 32Khz low power clock enable for Murata 1CQ module, Bluetooth core
may enter low power idle status that cause HCI communication error when
HCI device is down for 2 seconds after initialization.
Currently, remove the LP 32Khz input for the module.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-11-28 16:58:12 +08:00
Sandor Yu e3bc8fb1b4 MLK-20481: hdp: change hdmi keep-alive check mechanism
The current keep-alive check mechanism uses a static variable
that is initialized to 0. When the function is first called, it may
happen to catch the 8-bit keep-alive counter right when it
overflows, hence returning BUSY.

This patch will keep checking the counter for 10us, every 1us,
but it will immediately return if the keep-alive counter changed.

Signed-off-by: Laurentiu Palcu<laurentiu.palcu@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 4ad828b95e78a652f509110688a6f907fc286ea9)
2018-11-28 16:42:52 +08:00
Richard Zhu 4de7601b82 MLK-20472 arm64: dts: correct the pad configurations of pcie
Correct the pad confirations of the pcie perst and epdev_on
on 8qm/qxp platforms.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 28d5b68c1fa7568a2444915b71fab12e8a2d4350)
2018-11-28 16:40:03 +08:00
Xianzhong 84dc472873 MGS-3083 [#imx-662] fix kernel build error with kasan config
hal/kernel/gc_hal_kernel_command.c: In function gckCOMMAND_Commit:
hal/kernel/gc_hal_kernel_command.c:2718:1:
error: the frame size of 2288 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

removed _commandBufferObject instrance, use kmalloc to avoid kasan error.

Date: Jul 13, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit d8d57e43a24bd02b375d7c6bd633ed236db19337)
(cherry picked from commit 484e3073adf47d27581482f268b01fe5fe219d18)
2018-11-28 21:37:57 +08:00
Ivan.liu d95ae967a0 MA-13450-1 [#ccc] Switch layer memory allocation to virtual pool to improve performance.
Add DRM_VIV_GEM_VIRTUAL_POOL flags.
Switch to virtual pool when this flag is set.

Change-Id: I6e1e799cd0b4f81ed1ffbfdabe8f105325fa9644
Signed-off-by: Ivan.liu <xiaowen.liu@nxp.com>
(cherry picked from commit c4bd0fc803409c54d06e3554f4857922d6640925)
2018-11-28 21:37:50 +08:00
ming_qian 87307dfc28 MLK-20478:VPU Encoder:drop invalid frame
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-28 10:40:09 +08:00
Fancy Fang a2eb45252d MLK-20337 drm/imx: lcdif: block 'active CRTC with no plane' commit
When an atomic commit contains an active CRTC with no plane,
it may cause two potential issues:

First, this CRTC will fetch its last attached plane data
or has no data can be fetched depending on the plane
driver's atomic_disable() implementation.

Second, this CRTC's 'plane_changed' will be false during
the whole commit tail stage, and this will make vblank
wait to be bypassed which directly causes the later wait
flip done timeout.

So add this commit case check to the LCDIF CRTC's atomic
check to block this kind of commits.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 67ced65259a4dbf040ce4a931325be6ba97e5131)
2018-11-28 10:14:48 +08:00
ming_qian 7239adb681 MLK-20476:VPU Encoder:define max resolution and framerate in dts
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-28 09:09:45 +08:00
Huang Chaofan 0813ced0f1 MLK-20475 VPU: Enable debugfs to export some firmware internal log
Enable debugfs to export some firmware internal log

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit d4ccecbec66b27c305b2a4a4b79d28f176fb499b)
2018-11-27 19:28:41 +08:00
Liu Ying 2e4a928dd9 MLK-20470 drm/imx: dpu: plane: Do full modeset for tile to linear fb switch
When pixel combiner is used, it turns out that on-the-fly switch from
tile framebuffer to linear framebuffer would cause hardware malfunction
- right half display would be missing and master&slave content shadow
load done event won't come.  Thus, go for a full modeset as a workaround.
Note that we check if the original framebuffer is tile or not for both
primary and overlay planes.  So, this could be over-kill.  The issue was
found when we use 32bit GPU super tile as the original framebuffer on the
primary plane(restart Weston frequently).  However, since we usually
don't do this kind of switch in real graphics, it should be fine.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 9245bbf650fdeb79ebf869d48b6bd1b43c2bcf3b)
2018-11-27 16:29:41 +08:00
Sandor Yu 7f31a41bae MLK-20471-2: ARM64: dtsi: imx8qm-hdmi: Move sai_hdmi_rx to right file
Move sai_hdmi_rx to fsl-imx8qm-mek-hdmi-in.dts.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit f9e95e95796830ed6c22b95f96be9370461796fe)
2018-11-27 16:06:26 +08:00
Sandor Yu 29c3ead874 MLK-20471-1: ARM64: dtsi: imx8qm-hdmi-in: Connect HDMI RX to ISI2
ISI channel 0,1 or 2,3 could concatenate to support 4K image.
ISI channel 1,2 couldn't support such function,
otherwise image will lost line data.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 18d3cf890a41ac773aefddd2ebe285d4b0197f5d)
2018-11-27 16:06:26 +08:00
Huang Chaofan 9a7c1e9d7b MLK-20454 [iMX8QXP/Bon-Auto] VPU initializing time is too long
1. get boot size and rpc size from dts file
 2. set p[18]=1 in vpu_firmware_download()

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit b859b67f2cc6ea05ece69294a960e85eb198d61e)
2018-11-27 16:17:34 +08:00
Huang Chaofan 9c3c107ff2 MLK-20426 VPU: Adding more statistic info for debug
Adding more statistic info for debug

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit ebef17b0a54a307a5f98d5912a7848b922bb863d)
2018-11-27 16:17:34 +08:00
Huang Chaofan f105e7c308 MLK-20462 VPU: Modify buffer alloc action and delay the free of instance file
1. Add dma memory counting
	2. Delay the free of instance file when firmware hang

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 431eb4f32b31ef82500c2405c690775c6eb87d33)
2018-11-27 16:17:33 +08:00
Huang Chaofan 31d0ff6109 MLK-20400 VPU: Modified EOS filling size and add mb() for cmd and msg
update function

    1. Modified EOS filling size
    2. add mb() before function rpc_update_cmd_buffer_ptr and
    rpc_update_msg_buffer_ptr
    3. modify some log print function

Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit b58bbfe0e75568e7f3104589a06519d1eaddb01a)
2018-11-27 16:17:33 +08:00
ming_qian b2fde8a468 MLK-20468:VPU Encoder:reduce memory alloc and free
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-27 15:18:29 +08:00
Guoniu.Zhou 4bfc24b232 MLK-20469: ov5640: correct parallel ov5640 QVGA frame rate setting
Register setting for ov5640 30fps is the same with 15fps, so
correct it

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 80b4f71476ffa3f45de01ccbac88fb131a3c444c)
2018-11-27 14:59:25 +08:00
Andy Duan 1903129efe MLK-20456 arm64: dts: imx8qm: keep wlreg_on regulator during system suspended
Keep wlreg_on regulator on during system suspended status due to
external wifi module power requirement. Also keep the old Murata
1CQ M.2 card support.

To set the PIN to "latch" status before the GPIO controller is power
off during suspend, and set the PIN to "PASS" status after GPIO
controller status restored during system resume back.

Reviewed-by: yang.tian <yang.tian@nxp.com>
Tested-by: yang.tian <yang.tian@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit: 015599e40fd5cc942f8f6a8d4b6c3475440a114e)
2018-11-27 12:55:56 +08:00
ming_qian b2d5c65131 MLK-20276:VPU Encoder:split encoder memory into separate parts
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-27 09:59:38 +08:00
ming_qian 5eb7a99a71 MLK-19878:VPU Encoder:calculate actual fps in driver
Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-27 09:59:29 +08:00
ming_qian 2d624d2625 MLK-20429:VPU Encoder:strip some stuff data at the end of frame
1.get frame size from uFrameSize reported by frame_done event
2.strip stuff data at the end of frame
3.avoid merging two frames into one

Signed-off-by: ming_qian <ming.qian@nxp.com>
2018-11-27 09:59:19 +08:00
Robert Chiras 4a004884a4 MA-12957: arm64: dts: imx8qm/qxp mek: Correct interrupts for adv7535
This patch fixes the interrupts used by ADV7535. Initial patch
configured the GPIO0 IO00 as IO pin for the DSI_INT, used by ADV7535,
but the correct one is IO01, since IO00 is used by PWM.

Fixes: c2f1eceb5629 ("arm64: dts: imx8qm/qxp mek: Configure interrupts
for adv7535")
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-11-26 13:27:57 +02:00
Joakim Zhang 8220d7d4e8 MLK-20166 can: flexcan: fix CAN can't wakeup system during suspend
The system can be wakeuped only when system is totally suspend, when the
wakeup event comes during suspend will cause the system hang. For the reason
that CAN will not call flexcan_noirq_resume() callback if the wakeup event
comes before noirq suspend stage.

The way to fix the issue is that assure the system to call
flexcan_noirq_suspend() during suspend and then call
flexcan_noirq_resume() during resume.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2018-11-26 17:54:01 +08:00
Fugang Duan 0a182dbafc MLK-20131 can: flexcan: fix CAN can't suspend/resume when CAN is only capable of wakeup
When dev->power.can_wakeup set to true, device_prepare() may runtime resume the device:
dpm_suspend_start()
	dpm_prepare(state);
		dev->driver->pm->prepare()
			pm_genpd_prepare()
				if (resume_needed(dev, genpd))
				    pm_runtime_resume(dev);

And imx8qm/qxp power domain driver don't implement the active_wakeup() callback, then
resume_needed() always return "true" when dev->power.can_wakeup is true.

Once CAN device is runtime active status, then CAN's clock's count is 1 during system
suspend. And CAN0/CAN1/CAN2 share the same module clock, so we can say all CAN's module
clock is enabled during system suspended.

flexcan_runtime_resume()
	flexcan_clks_enable(priv);

i.MX8QM/QXP SCU code clock logic requires linux kernel clocks should be disabled during
suspend, otherwise SCU don't enable them after system resume back.

There are two ways to fix the issue:
1. CAN driver should check the runtime status to ensure all clocks are disabled  during
system suspend.
2. Don't set CAN wakeup capability during probe, move it into flexcan_open().

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2018-11-26 17:54:01 +08:00
Ye Li 0c50d24e76 MLK-20463 arm64: dts: Disable flexspi in iMX8MM EVK M4 DTS
M4 will run flexspi XIP image on iMX8MM. Thus, we have to disable flexspi
in M4 dedicated DTS, otherwise the M4 will crash because flexspi probe
in kernel will re-configure the controller.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit 2a370901a663bb518303ed2d5e774f1faa41f5fd)
2018-11-26 00:30:44 -08:00