18 Mar, 2021

7 commits


15 Mar, 2021

1 commit

  • Thread genpd_power_off_work_fn will hold genpd->mlock in genpd_power_off_work_fn,
    Then try to acquire prepare_lock in clk_unprepare.
    Initcall clk_disable_unused will hold prepare_lock in clk_disable_unused firstly,
    then try to acquire genpd->mlock in genpd_runtime_resume.
    The deadlock happen in case that genpd_power_off_work hold genpd->mlock and
    clk_disable_unused hold prepare_lock, And trying to hold each other.

    clk_disable_unused:
    [ 11.667711][ T108] -> #1 (&genpd->mlock){+.+.}-{3:3}:
    [ 11.675041][ T108] __lock_acquire+0xae4/0xef8
    [ 11.680093][ T108] lock_acquire+0xfc/0x2f8
    [ 11.684888][ T108] __mutex_lock+0x90/0x870
    [ 11.689685][ T108] mutex_lock_nested+0x44/0x50
    [ 11.694826][ T108] genpd_lock_mtx+0x18/0x24
    [ 11.699706][ T108] genpd_runtime_resume+0x90/0x214 (hold genpd->mlock)
    [ 11.705194][ T108] __rpm_callback+0x80/0x2c0
    [ 11.710160][ T108] rpm_resume+0x468/0x650
    [ 11.714866][ T108] __pm_runtime_resume+0x60/0x88
    [ 11.720180][ T108] clk_pm_runtime_get+0x28/0x9c
    [ 11.725410][ T108] clk_disable_unused_subtree+0x8c/0x144
    [ 11.731420][ T108] clk_disable_unused_subtree+0x124/0x144
    [ 11.737518][ T108] clk_disable_unused+0xa4/0x11c (hold prepare_lock)
    [ 11.742833][ T108] do_one_initcall+0x98/0x178
    [ 11.747888][ T108] do_initcall_level+0x9c/0xb8
    [ 11.753028][ T108] do_initcalls+0x54/0x94
    [ 11.757736][ T108] do_basic_setup+0x24/0x30
    [ 11.762614][ T108] kernel_init_freeable+0x70/0xa4
    [ 11.768014][ T108] kernel_init+0x14/0x18c
    [ 11.772722][ T108] ret_from_fork+0x10/0x18

    genpd_power_off_work_fn:
    [ 11.777512][ T108] -> #0 (prepare_lock){+.+.}-{3:3}:
    [ 11.784749][ T108] check_noncircular+0x134/0x13c
    [ 11.790064][ T108] validate_chain+0x590/0x2a04
    [ 11.795204][ T108] __lock_acquire+0xae4/0xef8
    [ 11.800258][ T108] lock_acquire+0xfc/0x2f8
    [ 11.805050][ T108] __mutex_lock+0x90/0x870
    [ 11.809841][ T108] mutex_lock_nested+0x44/0x50
    [ 11.814983][ T108] clk_unprepare+0x5c/0x100 ((hold prepare_lock))
    [ 11.819864][ T108] imx8m_pd_power_off+0xac/0x110
    [ 11.825179][ T108] genpd_power_off+0x1b4/0x2dc
    [ 11.830318][ T108] genpd_power_off_work_fn+0x38/0x58 (hold genpd->mlock)
    [ 11.835981][ T108] process_one_work+0x270/0x444
    [ 11.841208][ T108] worker_thread+0x280/0x4e4
    [ 11.846176][ T108] kthread+0x13c/0x14c
    [ 11.850621][ T108] ret_from_fork+0x10/0x18

    This patch is one workarround that break the lock in clk_disable_unused.
    Block runtime PM of audio-blk, media-blk and hdmi-blk. so that it can not
    be suspended at run time. We can change the runtime_PM status of
    audio-blk, media-blk and hdmi-blk in user space.

    Change-Id: Iab70469936883696dafe4a90047949d2ca7fddf2
    Signed-off-by: zhipeng.wang

    zhipeng.wang
     

12 Mar, 2021

1 commit


09 Mar, 2021

3 commits

  • - M865SW-692: VSI V4L2 Engineer release package 20210307
    M865SW-543: [VPU/V4L2] decode: some MJPEG decoded frames have mosaic
    M865SW-597: [VPU/V4L2] Easy to met hang issue when handle errors or exceptions
    M865SW-650: [VPU/V4L2] Calculate h264 level before encoding since ctrl sw will check it
    M865SW-675: [VPU/V4L2] Need to implement different ctrls based on encoder or decoder
    M865SW-677: [VPU/V4L2] DTRC: need to report rfc luma/chroma offset of output buffer to app
    M865SW-685: [VPU/V4L2] decoder: 8MQ: adding new format for DTRC & RFC
    M865SW-419: [VPU/V4L2] Pass stress test for resolution change stream
    M865SW-523: [VPU/V4L2] decoder: correctly handle stream file that contained codec data only
    M865SW-571: [VPU/V4L2] decoder: input has 240 frames, output only get 239 pictures
    M865SW-658: [VPU/V4L2] encoder: support resolution change stream transcoding.
    M865SW-662: [VPU/V4l2] H264EncSetRateCtrl return error if GOP length is larger than 300

    Signed-off-by: Zhou Peng
    Change-Id: Ifd78246208056de2d72a7a82d39bb62887828e1e

    Zhou Peng
     
  • Release all resources before returning error exit ioctl_dma_map by using goto out label

    Signed-off-by: Florinel Iordache

    Florinel Iordache
     
  • Clear all string buffers memory locations in ioctl_compat before using strncpy to copy the string name

    Signed-off-by: Florinel Iordache

    Florinel Iordache
     

08 Mar, 2021

1 commit

  • ISI has DMA overwrite issue on some format. To workaround it, allocate
    max size of the format that ISI supported, which is w*h*4.

    For multi-planes, w*h*4 maybe a lilttle large. But on android, only YUV422I
    or RGB888 are used, they are just 1 plan. And we don't know how far is the
    overwrite, better to use max size for each plan.

    Note: The change is not suitable for memory type V4L2_MEMORY_MMAP. Need
    carefully refine code, or may imapct realted registers.
    On android, memory type is V4L2_MEMORY_DMABUF, the pending queue buffer size
    can be controled in userspace.

    Change-Id: If3d7387f4ec03dc032046bb95fcfbacc532783ba
    Signed-off-by: fang hui

    fang hui
     

06 Mar, 2021

1 commit

  • After reduce the panel RM67191's pixel clock from 132MHz to
    121MHz by 'commit 4193a9c3254b ("MLK-3056-2 drm/panel: rm67191:
    change clock rate to 121MHz for default mod")', the disp_apb
    clock rate needs to be configured properly to avoid the issue
    described in LF-33886 ticket with currrent disp_apb clock config
    like below:

    sys1_pll_out 5 5 0 800000000 0 0 50000
    sys1_pll_800m 5 5 0 800000000 0 0 50000
    disp_apb 1 1 0 133333334 0 0 50000
    disp_apb_root_clk 2 2 0 133333334 0 0 50000

    And configure disp_apb rate to 25MHz like below can solve this
    issue:

    sys1_pll_out 5 5 0 800000000 0 0 50000
    sys1_pll_800m 5 5 0 800000000 0 0 50000
    disp_apb 1 1 0 25000000 0 0 50000
    disp_apb_root_clk 2 2 0 25000000 0 0 50000

    Signed-off-by: Fancy Fang
    Reviewed-by: Robby Cai
    Acked-by: Jason Liu

    Fancy Fang
     

05 Mar, 2021

2 commits

  • After reduce the panel RM67191's pixel clock from 132MHz to
    121MHz by 'commit 4193a9c3254b ("MLK-3056-2 drm/panel: rm67191:
    change clock rate to 121MHz for default mod")', the disp_apb
    clock rate needs to be configured properly to avoid the issue
    described in LF-33886 ticket with currrent disp_apb clock config
    like below:

    sys1_pll_out 5 5 0 800000000 0 0 50000
    sys1_pll_800m 5 5 0 800000000 0 0 50000
    disp_apb 1 1 0 133333334 0 0 50000
    disp_apb_root_clk 2 2 0 133333334 0 0 50000

    And configure disp_apb rate to 25MHz like below can solve this
    issue:

    sys1_pll_out 5 5 0 800000000 0 0 50000
    sys1_pll_800m 5 5 0 800000000 0 0 50000
    disp_apb 1 1 0 25000000 0 0 50000
    disp_apb_root_clk 2 2 0 25000000 0 0 50000

    Signed-off-by: Fancy Fang
    Reviewed-by: Robby Cai

    Fancy Fang
     
  • Change-Id: I9dd6b8dd4ff1d25608a9264ecc1facb2df649818

    zhang sanshan
     

04 Mar, 2021

5 commits


03 Mar, 2021

1 commit

  • On the remove path, there is a need to teardown the IRQs and disconnect
    from the PHY only if the DPMAC is not in TYPE_FIXED.
    Update the remove path so that we do not end up accesing an invalid MC
    portal.

    Signed-off-by: Ioana Ciornei

    Ioana Ciornei
     

02 Mar, 2021

2 commits

  • android display hal has refined the logic to use block commit when
    there is overlay but without android out fence. This android out
    fence patch can be reverted now.

    Revert "MA-14133 Enable android out fence and normal out fence simultaneously"

    This reverts commit d5d94e0e13b5bdf8b3ab4f60341e00898bbaf3c2.

    Change-Id: I8ef48ba46350324965e055e5314c837472aead6d
    Signed-off-by: Richard Liu

    Richard Liu
     
  • …s wrong and text becomes unreadable if use user build images

    don't re-init the console port when resume from suspend if have no sh.
    Don't startup the console port when user space has no bash environment
    than getty service cannot start up.

    This patch save the early console configure to tty->termios.c_cflag.
    reset the uart according the saved info when startup.

    Change-Id: I62ece4f6fc866d59e557722144e49b07de6b4179
    Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
    Tested-by: zhang sanshan <sanshan.zhang@nxp.com>

    Fugang Duan
     

01 Mar, 2021

1 commit

  • - M865SW-681: VSI V4L2 Engineer release package 20210226
    M865SW-595: [VPU/V4L2] report hdr10 metadata to userspace
    M865SW-608: [VPU/V4L2] decoder: enumerate CAPTURE formats according to the currently established coded format
    M865SW-655: [VPU/V4l2] Refine assert reference for Android build
    M865SW-663: [VPU/V4L2] decoder: app can't receive codec error event
    M865SW-668: [VPU/V4L2] daemon: update vsidaemon ts manager to fix Android GTS issue
    M865SW-671: [VPU/V4L2] decoder: seek a resolution changed vp9 stream meet decoding error
    M865SW-676: [VPU/V4L2] decoder: please add new formats into verfiyPlanesize()
    M865SW-678: [VPU/V4L2] decoder: please add 10bit depth into vsiv4l2_decidepixeldepth()
    M865SW-572: [VPU/V4L2] decoder/encoder: one frame stream can't receive EOS
    M865SW-674: [VPU/V4L2] the dtrc and dtrx output is incorrect when decoding 10bit stream

    Signed-off-by: Zhou Peng
    Change-Id: I61a196742dade4255c806b0549da77d9d261d32e

    Zhou Peng
     

26 Feb, 2021

1 commit


25 Feb, 2021

1 commit


23 Feb, 2021

8 commits

  • Move media, hdmi and audio blk ctrl data from clk-imx8mp
    to clk-blk-ctrl driver to fix below kernel dump met when built as module:

    [ 1.909525][ T1] init: Loading module /lib/modules/clk-blk-ctrl.ko with args ""
    [ 1.918640][ T1] Unable to handle kernel paging request at virtual address ffffffc0118a9b54
    [ 1.927265][ T1] Mem abort info:
    [ 1.930764][ T1] ESR = 0x96000007
    [ 1.934528][ T1] EC = 0x25: DABT (current EL), IL = 32 bits
    [ 1.940542][ T1] SET = 0, FnV = 0
    [ 1.944299][ T1] EA = 0, S1PTW = 0
    [ 1.948142][ T1] Data abort info:
    [ 1.951719][ T1] ISV = 0, ISS = 0x00000007
    [ 1.956256][ T1] CM = 0, WnR = 0
    [ 1.959927][ T1] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000041de3000
    [ 1.967329][ T1] [ffffffc0118a9b54] pgd=00000001bffff003, p4d=00000001bffff003, pud=00000001bffff003, pmd=00000001bfffc003, pte=0000000000000000
    [ 1.980570][ T1] Internal error: Oops: 96000007 [#1] PREEMPT SMP
    [ 1.986840][ T1] Modules linked in: clk_blk_ctrl(+) imx2_wdt imx gpio_mxc pinctrl_imx8mp pinctrl_imx irq_imx_irqsteer busfreq_imx8mq timer_imx_sysctr
    [ 2.000527][ T1] CPU: 3 PID: 1 Comm: init Not tainted 5.10.9-00012-g9da899adc4fd #10
    [ 2.008530][ T1] Hardware name: NXP i.MX8MPlus EVK board (DT)
    [ 2.014542][ T1] pstate: 20400005 (nzCv daif +PAN -UAO -TCO BTYPE=--)
    [ 2.021254][ T1] pc : imx_blk_ctrl_probe+0x68/0x414 [clk_blk_ctrl]
    [ 2.027702][ T1] lr : imx_blk_ctrl_probe+0x68/0x414 [clk_blk_ctrl]
    [ 2.034142][ T1] sp : ffffffc011b6b860
    [ 2.038153][ T1] x29: ffffffc011b6b890 x28: ffffffc011b6bda0
    [ 2.044164][ T1] x27: 0000000000000100 x26: ffffffc008f05190
    [ 2.050175][ T1] x25: ffffff80c3a5e430 x24: 0000000000000010
    [ 2.056187][ T1] x23: ffffffc011b15000 x22: ffffffc0119fc510
    [ 2.062198][ T1] x21: ffffff80c3b23e80 x20: ffffff80c0915400
    [ 2.068211][ T1] x19: ffffff80c0915410 x18: ffffffc011b550a0
    [ 2.074225][ T1] x17: 0000000000000031 x16: ffffffc012361000
    [ 2.080238][ T1] x15: ffffffc012350000 x14: 0000000000000086
    [ 2.086249][ T1] x13: 0000000000000042 x12: 0000000000000000
    [ 2.092260][ T1] x11: fffffffefe6880a1 x10: fffffffefe6880a0
    [ 2.098271][ T1] x9 : 0000000100000000 x8 : 0000000100000000
    [ 2.104282][ T1] x7 : 01fefefefefefeff x6 : 8080808080808000
    [ 2.110293][ T1] x5 : 0080808080808080 x4 : 6e6f63737973ffff
    [ 2.116305][ T1] x3 : 6701000008000000 x2 : 0300000000000000
    [ 2.122319][ T1] x1 : 0000000000000000 x0 : ffffffc0118a9b40
    [ 2.128332][ T1] Call trace:
    [ 2.131480][ T1] imx_blk_ctrl_probe+0x68/0x414 [clk_blk_ctrl]
    [ 2.137579][ T1] platform_drv_probe+0x94/0xbc
    [ 2.142285][ T1] really_probe+0x1d4/0x4b4
    [ 2.146646][ T1] driver_probe_device+0x64/0xb8
    [ 2.151439][ T1] device_driver_attach+0x6c/0xac

    Signed-off-by: Jindong Yue
    Change-Id: Ib7e00602734cfe3465641f7d37ebd4e59b7ea563

    Jindong Yue
     
  • Allow i.mx8m power domain driver to be loaded as module.
    Do not select IMX8M_PM_DOMAINS by default after enable ARCH_MXC.

    Signed-off-by: Jindong Yue
    Change-Id: I19c9978762136d1a6314ffcb3545536ae2598faa

    Jindong Yue
     
  • Add CONFIG_SOC_IMX_MU to control whether build this driver.
    Add module license and description to support building it as module.

    Default set it to y for ARCH_MXC && ARM64

    Signed-off-by: Jindong Yue
    Change-Id: I8970f264cfddbb4407e223dc8e51065ac7f77b0c

    Jindong Yue
     
  • Modify config as tristate and add module license to support
    building imx8m soc driver as module.

    Signed-off-by: Jindong Yue
    Change-Id: Ia441670abc7ebae4fd931006b010b2822815ff85

    Jindong Yue
     
  • Revert "MA-18223-4 Cannot access /sys/class/thermal/thermal_zoneX/temp on 8mp"
    This reverts commit d92b2486d24c07fa31adb7b9c4a1c0c048f81633.

    this patch is not needed now, we have enable runtime cpu hotplug in Thermal hal

    Change-Id: Ic70491573d6401498639d2c02a0433b76e15cf3e

    Dandan Sun
     
  • In sdhci_esdhc_imx_remove() the SDHCI_INT_STATUS in read. Under some
    circumstances, this may be done while the device is runtime suspended,
    triggering the below splat.

    Fix the problem by adding a pm_runtime_get_sync(), before reading the
    register, which will turn on clocks etc making the device accessible again.

    [ 1811.323148] mmc1: card aaaa removed
    [ 1811.347483] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
    [ 1811.354988] Modules linked in: sdhci_esdhc_imx(-) sdhci_pltfm sdhci cqhci mmc_block mmc_core [last unloaded: mmc_core]
    [ 1811.365726] CPU: 0 PID: 3464 Comm: rmmod Not tainted 5.10.1-sd-99871-g53835a2e8186 #5
    [ 1811.373559] Hardware name: Freescale i.MX8DXL EVK (DT)
    [ 1811.378705] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
    [ 1811.384723] pc : sdhci_esdhc_imx_remove+0x28/0x15c [sdhci_esdhc_imx]
    [ 1811.391090] lr : platform_drv_remove+0x2c/0x50
    [ 1811.395536] sp : ffff800012c7bcb0
    [ 1811.398855] x29: ffff800012c7bcb0 x28: ffff00002c72b900
    [ 1811.404181] x27: 0000000000000000 x26: 0000000000000000
    [ 1811.409497] x25: 0000000000000000 x24: 0000000000000000
    [ 1811.414814] x23: ffff0000042b3890 x22: ffff800009127120
    [ 1811.420131] x21: ffff00002c4c9580 x20: ffff0000042d0810
    [ 1811.425456] x19: ffff0000042d0800 x18: 0000000000000020
    [ 1811.430773] x17: 0000000000000000 x16: 0000000000000000
    [ 1811.436089] x15: 0000000000000004 x14: ffff000004019c10
    [ 1811.441406] x13: 0000000000000000 x12: 0000000000000020
    [ 1811.446723] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
    [ 1811.452040] x9 : fefefeff6364626d x8 : 7f7f7f7f7f7f7f7f
    [ 1811.457356] x7 : 78725e6473607372 x6 : 0000000080808080
    [ 1811.462673] x5 : 0000000000000000 x4 : 0000000000000000
    [ 1811.467990] x3 : ffff800011ac1cb0 x2 : 0000000000000000
    [ 1811.473307] x1 : ffff8000091214d4 x0 : ffff8000133a0030
    [ 1811.478624] Call trace:
    [ 1811.481081] sdhci_esdhc_imx_remove+0x28/0x15c [sdhci_esdhc_imx]
    [ 1811.487098] platform_drv_remove+0x2c/0x50
    [ 1811.491198] __device_release_driver+0x188/0x230
    [ 1811.495818] driver_detach+0xc0/0x14c
    [ 1811.499487] bus_remove_driver+0x5c/0xb0
    [ 1811.503413] driver_unregister+0x30/0x60
    [ 1811.507341] platform_driver_unregister+0x14/0x20
    [ 1811.512048] sdhci_esdhc_imx_driver_exit+0x1c/0x3a8 [sdhci_esdhc_imx]
    [ 1811.518495] __arm64_sys_delete_module+0x19c/0x230
    [ 1811.523291] el0_svc_common.constprop.0+0x78/0x1a0
    [ 1811.528086] do_el0_svc+0x24/0x90
    [ 1811.531405] el0_svc+0x14/0x20
    [ 1811.534461] el0_sync_handler+0x1a4/0x1b0
    [ 1811.538474] el0_sync+0x174/0x180
    [ 1811.541801] Code: a9025bf5 f9403e95 f9400ea0 9100c000 (b9400000)
    [ 1811.547902] ---[ end trace 3fb1a3bd48ff7be5 ]---

    Signed-off-by: Frank Li
    Cc: stable@vger.kernel.org # v4.0+
    Link: https://lore.kernel.org/r/20210210181933.29263-1-Frank.Li@nxp.com
    [Ulf: Clarified the commit message a bit]
    Signed-off-by: Ulf Hansson

    Frank Li
     
  • When M4 boots from flexspi, linux should not use that, otherwise
    M4 will hang.

    Reviewed-by: Richard Zhu
    Signed-off-by: Peng Fan
    (cherry picked from commit 1f49d90ebaf77492bcb2e9f8a8e5a8d4d7aee58a)
    Acked-by: Jason Liu

    Peng Fan
     
  • when killing the vlan, the rx_clk from the phy need to be enabled.
    The patch checks the phy's status before killing the vlan. If the phy
    is stopped, enable it, remove the vlan, and then stop the phy.

    Reviewed-by: Frank Li
    Signed-off-by: Shenwei Wang
    Acked-by: Jason Liu

    Shenwei Wang
     

22 Feb, 2021

1 commit


21 Feb, 2021

3 commits


19 Feb, 2021

1 commit