12 Feb, 2019

40 commits

  • Add helper functions backlight_enable and backlight_disable to
    enable/disable a backlight device. These helper functions can
    then be used by different drm and tinydrm drivers to avoid
    repetition of code and also to enforce a uniform and consistent
    way to enable/disable a backlight device.

    Acked-by: Daniel Thompson
    Reviewed-by: Noralf Trønnes
    Reviewed-by: Sean Paul
    Signed-off-by: Meghana Madhyastha
    Signed-off-by: Sean Paul
    Link: https://patchwork.freedesktop.org/patch/msgid/39b5bf0a02008a8072d910bdf8231c431e9ef504.1516810725.git.meghana.madhyastha@gmail.com

    Meghana Madhyastha
     
  • Android auto use sai0 for bluetooth phone audio output,
    so enable sai0 for android auto.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • 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
     
  • 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
     
  • 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
     
  • Fix several coverity issues, inlcudes
    - Unsigned compared against 0
    - Logically dead code
    - Unchecked retuen value
    - Dereference before null check

    Signed-off-by: ming_qian

    ming_qian
     
  • Fix several coverity issues, inlcudes
    - Use of untrusted scalar value
    - Value overwrite

    Signed-off-by: Zhou Peng

    Zhou Peng
     
  • Fix several coverity issues, inlcudes
    - Logically dead code
    - Use of untrusted scalar value
    - Value overwrite

    Signed-off-by: Zhou Peng

    Zhou Peng
     
  • If the input scatter gather table is wrongly built (no entries), the
    code will try to copy memory which is not allowed.

    Coverity Explanation:
    drivers/crypto/mxs-dcp.c:388: CID 5233058 (#1 of 1):
    Type: Out-of-bounds access (OVERRUN)
    Classification: Unclassified
    Severity: Unspecified
    Action: Modeling Required
    Owner: nxa21133
    First detected on 2018-10-16.
    drivers/crypto/mxs-dcp.c:297:
    1. alias: Assigning: "out_buf" = "sdcp->coh->aes_out_buf". "out_buf"
    now points to byte 0 of "sdcp->coh->aes_out_buf" (which consists of
    4096 bytes).
    drivers/crypto/mxs-dcp.c:301:
    2. assignment: Assigning: "last_out_len" = "0U".
    drivers/crypto/mxs-dcp.c:316:
    3. path: Condition "!rctx->ecb", taking true branch.
    drivers/crypto/mxs-dcp.c:321:
    4. path: Falling through to end of if statement.
    drivers/crypto/mxs-dcp.c:325:
    5. path: Condition "i < nents", taking false branch.
    drivers/crypto/mxs-dcp.c:386:
    6. path: Condition "!rctx->ecb", taking true branch.
    drivers/crypto/mxs-dcp.c:387:
    7. path: Condition "rctx->enc", taking true branch.
    drivers/crypto/mxs-dcp.c:388:
    8. overrun-buffer-arg: Overrunning buffer pointed to by "out_buf +
    (last_out_len - 16U)" of 4096 bytes by passing it to a function which
    accesses it at byte offset 4294967295 using argument "16U".

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • When building on a platform with a 32bit DMA address, taking the
    upper 32 bits makes no sense.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • Some keyslot values were used during deallocation
    but were not initiliazed nor set properly.

    drivers/crypto/caam/sm_test.c:446: CID 3901091 (#1 of 1):
    Type: Uninitialized scalar variable (UNINIT)
    Classification: Unclassified
    Severity: Unspecified
    Action: Modeling Required
    Owner: nxa21133
    Defect only exists locally.
    drivers/crypto/caam/sm_test.c:98:
    1. var_decl: Declaring variable "keyslot24" without initializer.
    drivers/crypto/caam/sm_test.c:113:
    2. path: Condition "!ctrlpriv", taking false branch.
    drivers/crypto/caam/sm_test.c:118:
    3. path: Condition "kspriv == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:123:
    4. path: Condition "!units", taking false branch.
    drivers/crypto/caam/sm_test.c:130:
    5. path: Condition "units < 2", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    6. path: Condition "blob8 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    7. path: Condition "blob16 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    8. path: Condition "blob24 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    9. path: Condition "blob32 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:178:
    10. path: Condition "sm_keystore_slot_alloc(ksdev, unit,
    (16U /* (8 % 16) ? (8 >> 4) + 1 << 4 : 8 */), &keyslot8)", taking true
    branch.
    drivers/crypto/caam/sm_test.c:179:
    11. path: Jumping to label "dealloc".
    drivers/crypto/caam/sm_test.c:446:
    12. uninit_use_in_call: Using uninitialized value "keyslot24" when
    calling "sm_keystore_slot_dealloc".
    drivers/crypto/caam/sm_store.c:771:
    12.1. path: Condition "smpriv->slot_alloc == NULL", taking false branch.
    drivers/crypto/caam/sm_store.c:771:
    12.2. path: Condition "smpriv->pagedesc[unit].ksdata == NULL", taking
    false branch.
    drivers/crypto/caam/sm_store.c:775:
    12.3. read_parm: Reading a parameter value.

    drivers/crypto/caam/sm_test.c:445: CID 3901093 (#1 of 1):
    Type: Uninitialized scalar variable (UNINIT)
    Classification: Unclassified
    Severity: Unspecified
    Action: Modeling Required
    Owner: nxa21133
    Defect only exists locally.
    drivers/crypto/caam/sm_test.c:98:
    1. var_decl: Declaring variable "keyslot16" without initializer.
    drivers/crypto/caam/sm_test.c:113:
    2. path: Condition "!ctrlpriv", taking false branch.
    drivers/crypto/caam/sm_test.c:118:
    3. path: Condition "kspriv == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:123:
    4. path: Condition "!units", taking false branch.
    drivers/crypto/caam/sm_test.c:130:
    5. path: Condition "units < 2", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    6. path: Condition "blob8 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    7. path: Condition "blob16 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    8. path: Condition "blob24 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:150:
    9. path: Condition "blob32 == NULL", taking false branch.
    drivers/crypto/caam/sm_test.c:178:
    10. path: Condition "sm_keystore_slot_alloc(ksdev, unit,
    (16U /* (8 % 16) ? (8 >> 4) + 1 << 4 : 8 */), &keyslot8)", taking true
    branch.
    drivers/crypto/caam/sm_test.c:179:
    11. path: Jumping to label "dealloc".
    drivers/crypto/caam/sm_test.c:445:
    12. uninit_use_in_call: Using uninitialized value "keyslot16" when
    calling "sm_keystore_slot_dealloc".
    drivers/crypto/caam/sm_store.c:771:
    12.1. path: Condition "smpriv->slot_alloc == NULL", taking false branch.
    drivers/crypto/caam/sm_store.c:771:
    12.2. path: Condition "smpriv->pagedesc[unit].ksdata == NULL", taking
    false branch.
    drivers/crypto/caam/sm_store.c:775:
    12.3. read_parm: Reading a parameter value.

    Signed-off-by: Franck LENORMAND
    Reviewed-by: Horia Geantă

    Franck LENORMAND
     
  • There was some code to free the keystore but the current
    state of the function make this code unreachable so
    remove it.

    Coverity explanation:
    drivers/crypto/caam/sm_store.c:654: CID 17839 (#1 of 1):
    Type: Logically dead code (DEADCODE)
    Classification: Bug
    Severity: Major
    Action: Fix Required
    Owner: nxa21133
    Defect only exists locally.
    drivers/crypto/caam/sm_store.c:625:
    cond_null: Condition "keystore_data == NULL", taking true branch. Now
    the value of "keystore_data" is "NULL".
    drivers/crypto/caam/sm_store.c:653:
    null: At condition "keystore_data != NULL", the value of "keystore_data"
    must be "NULL".
    drivers/crypto/caam/sm_store.c:653:
    dead_error_condition: The condition "keystore_data != NULL" cannot be
    true.
    drivers/crypto/caam/sm_store.c:654:
    dead_error_line: Execution cannot reach this statement:
    "kfree(keystore_data);".

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • 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
    Signed-off-by: Daniel Baluta

    Daniel Baluta
     
  • 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
    Signed-off-by: Laurentiu Palcu

    Robert Chiras
     
  • This reverts commit 3c53532c466add234ac3ca2e70cefe80ea308b4f.

    This change affects iMX8MM functionality, generating flicker.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • Configure 'FORCEBTA' mandatorily for every packet send may
    cause some packet send timeout in a low possibility. And
    until now, this timeout issue only happens during panel
    disable callback with the below error log:

    "
    imx_sec_dsim_drv 32e10000.mipi_dsi: wait pkthdr tx done time out
    panel-raydium-rm67191 32e10000.mipi_dsi.0: [drm:rad_panel_disable] *ERROR* Failed to enter sleep mode (-16)
    imx_sec_dsim_drv 32e10000.mipi_dsi: panel disable failed: -16
    panel-raydium-rm67191 32e10000.mipi_dsi.0: [drm:rad_panel_unprepare] *ERROR* Panel still enabled!
    imx_sec_dsim_drv 32e10000.mipi_dsi: panel unprepare failed: -1
    "

    The root cause for this error is not clear, but remove
    'FORCEBTA' can avoid it and won't cause any side effect.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • 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

    Liu Ying
     
  • 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

    Liu Ying
     
  • For lpspi test, add these two features, use lpspi2 without cs-gpio.
    Still support spi-nor using lpspi0 with cs-gpio mode.

    - fsl-imx8dx.dtsi:
    Add node to support lpspi2.
    - fsl-imx8qxp-lpddr4-arm2-lpspi.dts:
    Add lpspi2 support for imx8qxp-lpddr4-arm2 board.
    - fsl-imx8qxp-lpddr4-arm2-lpspi-slave.dts:
    Enable spi slave mode for lpspi2.

    NOTE: lpspi2 of imx8qxp-lpddr4-arm2 uses the same pins with lpspi3 of
    imx8qm-lpddr4-arm2 on Base Board.

    Signed-off-by: Clark Wang

    Clark Wang
     
  • 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
     
  • - 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

    Richard Zhu
     
  • start code

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

    Signed-off-by: Huang Chaofan

    Huang Chaofan
     
  • Correct the interrupt line for adv7535.

    Fixes: 0f43068a7028 ("Correct interrupts for adv7535")

    Signed-off-by: Fugang Duan
    Tested-by: Robert Chiras
    Acked-by: Fancy Fang

    Andy Duan
     
  • Add spi slave mode supprot and enable spi slave time/system control
    functions.

    - Slave time:
    The host sends 8 bytes of dummy data to get the current time
    that the slave starts counting after powering on.
    - System control:
    The host controls the slave to shut down, restart and so on
    by sending 2-byte special data.

    For more details of these two functions, please see the head of
    spi-slave-time.c and spi-slave-system-control.c files.

    Signed-off-by: Clark Wang

    Clark Wang
     
  • For lpspi test, add these two features, use lpspi3 without cs-gpio.
    Still support spi-nor using lpspi0 with cs-gpio mode.

    - fsl-imx8qm-device.dtsi:
    Add node to support lpspi3.
    - fsl-imx8qm-lpddr4-arm2-lpspi.dts:
    Add lpspi3 support for imx8qm-lpddr4-arm2 board.
    - fsl-imx8qm-lpddr4-arm2-lpspi-slave.dts:
    Enable spi slave mode for lpspi3.

    Signed-off-by: Clark Wang

    Clark Wang
     
  • Add cs-gpio feature. Use fsl_lpspi_prepare_message() and
    fsl_lpspi_unprepare_message() to enable and control cs line.
    These two functions will be only called at the beginning and the ending
    of a message transfer.

    Still can use the mode without cs-gpio. The two ways can refer to
    fsl-imx8qm-lpddr4-arm2-lpspi.dts for setting the lpspi configration in
    dts file.

    Signed-off-by: Clark Wang

    Clark Wang
     
  • record queue release

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

    Signed-off-by: Huang Chaofan

    Huang Chaofan
     
  • 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
     
  • This reverts commit f1c3972844f8de1a52802a636f0eca1a51af7731.

    Setting vsync_len to 10 breaks LCDIF usage with the panel.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • 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

    Liu Ying
     
  • 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] [] dump_backtrace+0x0/0x390
    [ 3.254690] [] show_stack+0x14/0x20
    [ 3.259769] [] dump_stack+0xf8/0x158
    [ 3.264932] [] print_address_description+0x60/0x270
    [ 3.271396] [] kasan_report+0x210/0x2f0
    [ 3.276818] [] __asan_load8+0x84/0xa8
    [ 3.282065] [] drm_mode_config_cleanup+0x220/0x448
    [ 3.288447] [] imx_drm_bind+0x2b4/0x358
    [ 3.293863] [] try_to_bring_up_master+0x20c/0x278
    [ 3.300148] [] component_add+0x180/0x300
    [ 3.305653] [] dpu_bliteng_probe+0x30/0x48
    [ 3.311339] [] platform_drv_probe+0x74/0x108
    [ 3.317198] [] driver_probe_device+0x3a0/0x4a8
    [ 3.323226] [] __driver_attach+0xd0/0xd8
    [ 3.328735] [] bus_for_each_dev+0xc0/0x140
    [ 3.334419] [] driver_attach+0x30/0x40
    [ 3.339749] [] bus_add_driver+0x2a8/0x320
    [ 3.345344] [] driver_register+0xb4/0x190
    [ 3.350941] [] __platform_driver_register+0x7c/0x88
    [ 3.357410] [] dpu_bliteng_driver_init+0x1c/0x24
    [ 3.363613] [] do_one_initcall+0xe0/0x260
    [ 3.369211] [] kernel_init_freeable+0x230/0x2d8
    [ 3.375330] [] kernel_init+0x10/0x118
    [ 3.380574] [] 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

    Liu Ying
     
  • 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

    Liu Ying
     
  • This is a work-around for the shifted display issue when using DCSS with
    the DDR self-refresh disabled.

    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
     
  • 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
     
  • Add hdmi rx cec running status.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Fix incorrect function return variable type.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Print hdmi rx video mode info.
    use dev_xxx instead of pr_xxx in mxc-hdmi-hw.c.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • We enable the ASRC clocks from CPU side. We only need
    the following clocks: "mem", "ipg" and "asrc0..3".

    Signed-off-by: Daniel Baluta
    Reviewed-by: Shengjiu Wang

    Daniel Baluta
     
  • 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
    Reviewed-by: Shengjiu Wang

    Daniel Baluta
     
  • 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
    Reviewed-by: Shengjiu Wang

    Daniel Baluta