30 Dec, 2020

40 commits

  • [ Upstream commit 6016df8fe874e1cf36f6357d71438b384198ce06 ]

    The selftests/bpf Makefile includes system include directories from
    the host, when building BPF programs. On RISC-V glibc requires that
    __riscv_xlen is defined. This is not the case for "clang -target bpf",
    which messes up __WORDSIZE (errno.h -> ... -> wordsize.h) and breaks
    the build.

    By explicitly defining __risc_xlen correctly for riscv, we can
    workaround this.

    Fixes: 167381f3eac0 ("selftests/bpf: Makefile fix "missing" headers on build with -idirafter")
    Signed-off-by: Björn Töpel
    Signed-off-by: Andrii Nakryiko
    Acked-by: Luke Nelson
    Link: https://lore.kernel.org/bpf/20201118071640.83773-2-bjorn.topel@gmail.com
    Signed-off-by: Sasha Levin

    Björn Töpel
     
  • [ Upstream commit 03fc41afaa6549baa2dab7a84e1afaf5cadb5b18 ]

    pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference leak in mxs_spi_probe, so we should fix it.

    Fixes: b7969caf41a1d ("spi: mxs: implement runtime pm")
    Signed-off-by: Zhang Qilong
    Link: https://lore.kernel.org/r/20201106012421.95420-1-zhangqilong3@huawei.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit 5a569343e8a618dc73edebe0957eb42f2ab476bd ]

    retval may be reassigned to 0 after max3421_of_vbus_en_pin(),
    if allocate memory failed after this, max3421_probe() cann't
    return ENOMEM, fix this by moving assign retval afther max3421_probe().

    Fixes: 721fdc83b31b ("usb: max3421: Add devicetree support")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Link: https://lore.kernel.org/r/20201117061500.3454223-1-yangyingliang@huawei.com
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Yang Yingliang
     
  • [ Upstream commit f4d0b39c842585c74bce8f8a80553369181b72df ]

    Functions parse_ev_cfg() and parse_ch_cfg() access mhi_cntrl->mhi_dev
    before it is set in function mhi_register_controller(),
    use cntrl_dev instead of mhi_dev.

    Fixes: 0cbf260820fa ("bus: mhi: core: Add support for registering MHI controllers")
    Signed-off-by: Carl Yin
    Reviewed-by: Bhaumik Bhatt
    Reviewed-by: Hemant Kumar
    Reviewed-by: Manivannan Sadhasivam
    Signed-off-by: Manivannan Sadhasivam
    Signed-off-by: Sasha Levin

    Carl Yin
     
  • [ Upstream commit 9b627c25e70816a5e1dca940444b5029065b4d60 ]

    There is double acquisition of the pm_lock from mhi_driver_remove()
    function. Remove the read_lock_bh/read_unlock_bh calls for pm_lock
    taken during a call to mhi_device_put() as the lock is acquired
    within the function already. This will help avoid a potential
    kernel panic.

    Fixes: 189ff97cca53 ("bus: mhi: core: Add support for data transfer")
    Reported-by: Shuah Khan
    Signed-off-by: Bhaumik Bhatt
    Reviewed-by: Manivannan Sadhasivam
    Signed-off-by: Manivannan Sadhasivam
    Signed-off-by: Sasha Levin

    Bhaumik Bhatt
     
  • [ Upstream commit 03e2c9c782f721b661a0e42b1b58f394b5298544 ]

    req->sample[1] is not naturally aligned at word boundary, and therefore we
    should use get_unaligned_be16() when accessing it.

    Fixes: 3eac5c7e44f3 ("Input: ads7846 - extend the driver for ads7845 controller support")
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Dmitry Torokhov
     
  • [ Upstream commit 820830ec918f6c3dcd77a54a1c6198ab57407916 ]

    In some rare cases the 32 bit Rt value will overflow if z2 and x is max,
    z1 is minimal value and x_plate_ohms is relatively high (for example 800
    ohm). This would happen on some screen age with low pressure.

    There are two possible fixes:
    - make Rt 64bit
    - reorder calculation to avoid overflow

    The second variant seems to be preferable, since 64 bit calculation on
    32 bit system is a bit more expensive.

    Fixes: ffa458c1bd9b6f653008d450f337602f3d52a646 ("spi: ads7846 driver")
    Co-developed-by: David Jander
    Signed-off-by: David Jander
    Signed-off-by: Oleksij Rempel
    Link: https://lore.kernel.org/r/20201113112240.1360-1-o.rempel@pengutronix.de
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    Oleksij Rempel
     
  • [ Upstream commit e52cd628a03f72a547dbf90ccb703ee64800504a ]

    If touchscreen is released while busy reading HWMON device, the release
    can be missed. The IRQ thread is not started because no touch is active
    and BTN_TOUCH release event is never sent.

    Fixes: f5a28a7d4858f94a ("Input: ads7846 - avoid pen up/down when reading hwmon")
    Co-developed-by: Oleksij Rempel
    Signed-off-by: David Jander
    Signed-off-by: Oleksij Rempel
    Link: https://lore.kernel.org/r/20201027105416.18773-1-o.rempel@pengutronix.de
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Sasha Levin

    David Jander
     
  • [ Upstream commit 68dd9d89eaf56dfab8d46bf25610aa4650247617 ]

    Commit 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function")
    introduced intel_iommu_sva_invalidate() when CONFIG_INTEL_IOMMU_SVM.
    This function uses the dedicated static variable inv_type_granu_table
    and functions to_vtd_granularity() and to_vtd_size().

    These parts are unused when !CONFIG_INTEL_IOMMU_SVM, and hence,
    make CC=clang W=1 warns with an -Wunused-function warning.

    Include these parts conditionally on CONFIG_INTEL_IOMMU_SVM.

    Fixes: 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function")
    Signed-off-by: Lukas Bulwahn
    Acked-by: Lu Baolu
    Link: https://lore.kernel.org/r/20201115205951.20698-1-lukas.bulwahn@gmail.com
    Signed-off-by: Will Deacon
    Signed-off-by: Sasha Levin

    Lukas Bulwahn
     
  • [ Upstream commit 9a207228bdf0a4933b794c944d7111564353ea94 ]

    The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs.
    Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about
    this driver when configuring a kernel without Intel Keem Bay platform
    support.

    Fixes: c544912bcc2dc806 ("ASoC: Intel: Add makefiles and kconfig changes for KeemBay")
    Signed-off-by: Geert Uytterhoeven
    Link: https://lore.kernel.org/r/20201110145001.3280479-1-geert+renesas@glider.be
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Geert Uytterhoeven
     
  • [ Upstream commit b33340e33acdfe5ca6a5aa1244709575ae1e0432 ]

    Removing the meson-dw-hdmi module and re-inserting it results in a hang
    as the driver writes to HDMITX_TOP_SW_RESET. Similar effects can be seen
    when booting with mainline u-boot and using the u-boot provided DT (which
    is highly desirable).

    The reason for the hang seem to be that the clocks are not always
    enabled by the time we enter meson_dw_hdmi_init(). Moving this call
    *after* dw_hdmi_probe() ensures that the clocks are enabled.

    Fixes: 1374b8375c2e ("drm/meson: dw_hdmi: add resume/suspend hooks")
    Signed-off-by: Marc Zyngier
    Acked-by: Neil Armstrong
    Signed-off-by: Neil Armstrong
    Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-5-maz@kernel.org
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit 0405f94a1ae0586ca237aec0e859f1b796d6325d ]

    Removing the meson-dw-hdmi module results in the following splat:

    i[ 43.340509] WARNING: CPU: 0 PID: 572 at drivers/regulator/core.c:2125 _regulator_put.part.0+0x16c/0x174
    [...]
    [ 43.454870] CPU: 0 PID: 572 Comm: modprobe Tainted: G W E 5.10.0-rc4-00049-gd274813a4de3-dirty #2147
    [ 43.465042] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
    [ 43.471945] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
    [ 43.477896] pc : _regulator_put.part.0+0x16c/0x174
    [ 43.482638] lr : regulator_put+0x44/0x60
    [...]
    [ 43.568715] Call trace:
    [ 43.571132] _regulator_put.part.0+0x16c/0x174
    [ 43.575529] regulator_put+0x44/0x60
    [ 43.579067] devm_regulator_release+0x20/0x2c
    [ 43.583380] release_nodes+0x1c8/0x2b4
    [ 43.587087] devres_release_all+0x44/0x6c
    [ 43.591056] __device_release_driver+0x1a0/0x23c
    [ 43.595626] driver_detach+0xcc/0x160
    [ 43.599249] bus_remove_driver+0x68/0xe0
    [ 43.603130] driver_unregister+0x3c/0x6c
    [ 43.607011] platform_driver_unregister+0x20/0x2c
    [ 43.611678] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
    [ 43.618485] __arm64_sys_delete_module+0x1bc/0x294

    as the HDMI regulator is still enabled on release.

    In order to address this, register a callback that will deal with
    the disabling when the driver is unbound, solving the problem.

    Fixes: 161a803fe32d ("drm/meson: dw_hdmi: Add support for an optional external 5V regulator")
    Signed-off-by: Marc Zyngier
    Acked-by: Neil Armstrong
    Signed-off-by: Neil Armstrong
    Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-4-maz@kernel.org
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit e78ad18ba3658fbc8c63629e034b68d8e51acbf1 ]

    Removing the meson DRM module results in the following splats:

    [ 42.689228] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_irq.c:192 drm_irq_uninstall+0x130/0x160 [drm]
    [...]
    [ 42.812820] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
    [ 42.819723] pstate: 80400089 (Nzcv daIf +PAN -UAO -TCO BTYPE=--)
    [ 42.825737] pc : drm_irq_uninstall+0x130/0x160 [drm]
    [ 42.830647] lr : drm_irq_uninstall+0xc4/0x160 [drm]
    [...]
    [ 42.917614] Call trace:
    [ 42.920086] drm_irq_uninstall+0x130/0x160 [drm]
    [ 42.924612] meson_drv_unbind+0x68/0xa4 [meson_drm]
    [ 42.929436] component_del+0xc0/0x180
    [ 42.933058] meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi]
    [ 42.938576] platform_drv_remove+0x38/0x60
    [ 42.942628] __device_release_driver+0x190/0x23c
    [ 42.947198] driver_detach+0xcc/0x160
    [ 42.950822] bus_remove_driver+0x68/0xe0
    [ 42.954702] driver_unregister+0x3c/0x6c
    [ 42.958583] platform_driver_unregister+0x20/0x2c
    [ 42.963243] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
    [ 42.970057] __arm64_sys_delete_module+0x1bc/0x294
    [ 42.974801] el0_svc_common.constprop.0+0x80/0x240
    [ 42.979542] do_el0_svc+0x30/0xa0
    [ 42.982821] el0_svc+0x18/0x50
    [ 42.985839] el0_sync_handler+0x198/0x404
    [ 42.989806] el0_sync+0x158/0x180

    immediatelly followed by

    [ 43.002296] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_mode_config.c:504 drm_mode_config_cleanup+0x2a8/0x304 [drm]
    [...]
    [ 43.128150] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
    [ 43.135052] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
    [ 43.141062] pc : drm_mode_config_cleanup+0x2a8/0x304 [drm]
    [ 43.146492] lr : drm_mode_config_cleanup+0xac/0x304 [drm]
    [...]
    [ 43.233979] Call trace:
    [ 43.236451] drm_mode_config_cleanup+0x2a8/0x304 [drm]
    [ 43.241538] drm_mode_config_init_release+0x1c/0x2c [drm]
    [ 43.246886] drm_managed_release+0xa8/0x120 [drm]
    [ 43.251543] drm_dev_put+0x94/0xc0 [drm]
    [ 43.255380] meson_drv_unbind+0x78/0xa4 [meson_drm]
    [ 43.260204] component_del+0xc0/0x180
    [ 43.263829] meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi]
    [ 43.269344] platform_drv_remove+0x38/0x60
    [ 43.273398] __device_release_driver+0x190/0x23c
    [ 43.277967] driver_detach+0xcc/0x160
    [ 43.281590] bus_remove_driver+0x68/0xe0
    [ 43.285471] driver_unregister+0x3c/0x6c
    [ 43.289352] platform_driver_unregister+0x20/0x2c
    [ 43.294011] meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
    [ 43.300826] __arm64_sys_delete_module+0x1bc/0x294
    [ 43.305570] el0_svc_common.constprop.0+0x80/0x240
    [ 43.310312] do_el0_svc+0x30/0xa0
    [ 43.313590] el0_svc+0x18/0x50
    [ 43.316608] el0_sync_handler+0x198/0x404
    [ 43.320574] el0_sync+0x158/0x180
    [ 43.323852] ---[ end trace d796a3072dab01da ]---
    [ 43.328561] [drm:drm_mode_config_cleanup [drm]] *ERROR* connector HDMI-A-1 leaked!

    both triggered by the fact that the HDMI subsystem is still active,
    and the DRM removal doesn't result in the connectors being torn down.

    Call drm_atomic_helper_shutdown() and component_unbind_all() to safely
    tear the module down.

    Fixes: 2d8f92897ad8 ("drm/meson: Uninstall IRQ handler")
    Signed-off-by: Marc Zyngier
    Acked-by: Neil Armstrong
    Signed-off-by: Neil Armstrong
    Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-3-maz@kernel.org
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit fa62ee25280ff6ae1f720f363263cb5e7743a8c8 ]

    Removing the meson DRM module results in the following splat:

    [ 2179.451346] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
    [ 2179.458316] Workqueue: events drm_mode_rmfb_work_fn [drm]
    [ 2179.463597] pstate: 80c00009 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
    [ 2179.469558] pc : meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
    [ 2179.475243] lr : meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
    [ 2179.480930] sp : ffffffc01212bb70
    [ 2179.484207] x29: ffffffc01212bb70 x28: ffffff8044f66f00
    [ 2179.489469] x27: ffffff8045b13800 x26: 0000000000000001
    [ 2179.494730] x25: 0000000000000000 x24: 0000000000000001
    [ 2179.499991] x23: 0000000000000000 x22: 0000000000000000
    [ 2179.505252] x21: 0000000000280000 x20: 0000000000001a01
    [ 2179.510513] x19: ffffff8046029480 x18: 0000000000000000
    [ 2179.515775] x17: 0000000000000000 x16: 0000000000000000
    [ 2179.521036] x15: 0000000000000000 x14: 0000000000000000
    [ 2179.526297] x13: 0040000000000326 x12: 0309030303260300
    [ 2179.531558] x11: 03000000054004a0 x10: 0418054004000400
    [ 2179.536820] x9 : ffffffc008fe4914 x8 : ffffff8040a1adc0
    [ 2179.542081] x7 : 0000000000000000 x6 : ffffff8042aa0080
    [ 2179.547342] x5 : ffffff8044f66f00 x4 : ffffffc008fe5bc8
    [ 2179.552603] x3 : 0000000000010101 x2 : 0000000000000001
    [ 2179.557865] x1 : 0000000000000000 x0 : 0000000000000000
    [ 2179.563127] Call trace:
    [ 2179.565548] meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
    [ 2179.570894] meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
    [ 2179.576241] meson_plane_atomic_disable+0x38/0xb0 [meson_drm]
    [ 2179.581966] drm_atomic_helper_commit_planes+0x1e0/0x21c [drm_kms_helper]
    [ 2179.588684] drm_atomic_helper_commit_tail_rpm+0x68/0xb0 [drm_kms_helper]
    [ 2179.595410] commit_tail+0xac/0x190 [drm_kms_helper]
    [ 2179.600326] drm_atomic_helper_commit+0x16c/0x390 [drm_kms_helper]
    [ 2179.606484] drm_atomic_commit+0x58/0x70 [drm]
    [ 2179.610880] drm_framebuffer_remove+0x398/0x434 [drm]
    [ 2179.615881] drm_mode_rmfb_work_fn+0x68/0x8c [drm]
    [ 2179.620575] process_one_work+0x1cc/0x49c
    [ 2179.624538] worker_thread+0x200/0x444
    [ 2179.628246] kthread+0x14c/0x160
    [ 2179.631439] ret_from_fork+0x10/0x38

    caused by the fact that the RDMA buffer has already been freed,
    resulting in meson_rdma_writel_sync() getting a NULL pointer.

    Move the afbcd reset and meson_rdma_free calls after the DRM
    unregistration is complete so that the teardown can safely complete.

    Fixes: d1b5e41e13a7 ("drm/meson: Add AFBCD module driver")
    Signed-off-by: Marc Zyngier
    Acked-by: Neil Armstrong
    Signed-off-by: Neil Armstrong
    Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-2-maz@kernel.org
    Signed-off-by: Sasha Levin

    Marc Zyngier
     
  • [ Upstream commit 723ae803218da993143387bf966042eccefac077 ]

    Return -ENOMEM when allocating refill memory failed.

    Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Signed-off-by: Thomas Zimmermann
    Link: https://patchwork.freedesktop.org/patch/msgid/20201117061045.3452287-1-yangyingliang@huawei.com
    Signed-off-by: Sasha Levin

    Yang Yingliang
     
  • [ Upstream commit fcc541fea394d67ad607ee41acfa891e79fe17a2 ]

    'busy_timeout' is in msecs, not in jiffies. Use the correct factor.

    Fixes: 5e958e4aacf4 ("sdhci: tegra: Implement Tegra specific set_timeout callback")
    Signed-off-by: Wolfram Sang
    Acked-by: Sowjanya Komatineni
    Acked-by: Thierry Reding
    Link: https://lore.kernel.org/r/20201116132206.23518-1-wsa+renesas@sang-engineering.com
    Signed-off-by: Ulf Hansson
    Signed-off-by: Sasha Levin

    Wolfram Sang
     
  • [ Upstream commit ba236455ee750270f33998df57f982433cea4d8e ]

    If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init()
    can't return -ENOMEM, fix this by putting the error code in loop.

    Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Signed-off-by: Thomas Zimmermann
    Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com
    Signed-off-by: Sasha Levin

    Yang Yingliang
     
  • [ Upstream commit dcdff74fa6bc00c32079d0bebd620764c26f2d89 ]

    Fix to goto snd_error in error handling case when fails
    to do snd_ctl_add, as done elsewhere in this function.

    Fixes: 28cae868cd24 ("[media] solo6x10: move out of staging into drivers/media/pci.")
    Reported-by: Hulk Robot
    Signed-off-by: Qinglang Miao
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Qinglang Miao
     
  • [ Upstream commit eff5ce02e170125936c43ca96c7dc701a86681ed ]

    As per current implementation, video driver is unvoting "videom-mem" path
    for last video session during vdec_session_release().
    While video playback when we try to suspend device, we see video clock
    warnings since votes are already removed during vdec_session_release().

    corrected this by putting dummy vote on "video-mem" after last video
    session release and unvoting it during suspend.

    suspend")

    Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
    Signed-off-by: Mansur Alisha Shaik
    Reviewed-by: Stephen Boyd
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Mansur Alisha Shaik
     
  • [ Upstream commit 2e4209b3806cda9b89c30fd5e7bfecb7044ec78b ]

    The current implementation of scsi_vpd_lun_id() uses the designator length
    as an implicit measure of priority. This works most of the time, but not
    always. For example, some Hitachi storage arrays return this in VPD 0x83:

    VPD INQUIRY: Device Identification page
    Designation descriptor number 1, descriptor length: 24
    designator_type: T10 vendor identification, code_set: ASCII
    associated with the Addressed logical unit
    vendor id: HITACHI
    vendor specific: 5030C3502025
    Designation descriptor number 2, descriptor length: 6
    designator_type: vendor specific [0x0], code_set: Binary
    associated with the Target port
    vendor specific: 08 03
    Designation descriptor number 3, descriptor length: 20
    designator_type: NAA, code_set: Binary
    associated with the Addressed logical unit
    NAA 6, IEEE Company_id: 0x60e8
    Vendor Specific Identifier: 0x7c35000
    Vendor Specific Identifier Extension: 0x30c35000002025
    [0x60060e8007c350000030c35000002025]

    The current code would use the first descriptor because it's longer than
    the NAA descriptor. But this is wrong, the kernel is supposed to prefer NAA
    descriptors over T10 vendor ID. Designator length should only be used to
    compare designators of the same type.

    This patch addresses the issue by separating designator priority and
    length.

    Link: https://lore.kernel.org/r/20201029170846.14786-1-mwilck@suse.com
    Fixes: 9983bed3907c ("scsi: Add scsi_vpd_lun_id()")
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin Wilck
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Martin Wilck
     
  • [ Upstream commit 1241f0787578136ab58f49adc52f2dcd2bbc4bf2 ]

    Fix build error for spi-dw-bt1.o by selecting MULTIPLEXER.

    hppa-linux-ld: drivers/spi/spi-dw-bt1.o: in function `dw_spi_bt1_sys_init':
    (.text+0x1ac): undefined reference to `devm_mux_control_get'

    Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
    Reported-by: kernel test robot
    Signed-off-by: Randy Dunlap
    Cc: Serge Semin
    Cc: Ramil Zaripov
    Cc: Mark Brown
    Cc: linux-spi@vger.kernel.org
    Acked-by: Serge Semin
    Link: https://lore.kernel.org/r/20201116040721.8001-1-rdunlap@infradead.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Randy Dunlap
     
  • [ Upstream commit 299fe9937dbd1a4d9a1da6a2b6f222298534ca57 ]

    When compiled with CONFIG_HAVE_CLK, the kernel need to get provider for the
    clock API. This is usually selected by the platform and the sound drivers
    should not really care about this. However COMPILE_TEST is special and the
    platform required may not have been selected, leading to this type of
    error:

    > aiu-encoder-spdif.c:(.text+0x3a0): undefined reference to `clk_set_parent'

    Since we need a sane provider of the API with COMPILE_TEST, depends on
    COMMON_CLK.

    Fixes: 6dc4fa179fb8 ("ASoC: meson: add axg fifo base driver")
    Reported-by: kernel test robot
    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20201116172423.546855-1-jbrunet@baylibre.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Jerome Brunet
     
  • [ Upstream commit c80a0c52d85c49a910d0dc0e342e8d8898677dc0 ]

    Don't silently continue if rdma_listen() fails but destroy previously
    created CM_ID and return an error to the caller.

    Fixes: d02d1f5359e7 ("RDMA/cma: Fix deadlock destroying listen requests")
    Link: https://lore.kernel.org/r/20201104144008.3808124-5-leon@kernel.org
    Signed-off-by: Leon Romanovsky
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Sasha Levin

    Leon Romanovsky
     
  • [ Upstream commit e44fb034b03231cd117d6db73fb8048deab6ea41 ]

    As per bandwidth table video driver is voting with average bandwidth
    for "video-mem" and "cpu-cfg" paths as peak bandwidth is zero
    in bandwidth table.

    suspend")

    Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
    Signed-off-by: Mansur Alisha Shaik
    Reviewed-by: Stephen Boyd
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Mansur Alisha Shaik
     
  • [ Upstream commit 9e8efdb5787986cc0d0134925cf5c4f001bb3f2e ]

    Currently video driver is voting for venus0-ebi path during buffer
    processing with an average bandwidth of all the instances and
    unvoting during session release.

    While video streaming when we try to do XO-SD using the command
    "echo mem > /sys/power/state command" , device is not entering
    to suspend state and from interconnect summary seeing votes for venus0-ebi

    Corrected this by voting for venus0-ebi path in venus_runtime_resume()
    and unvote during venus_runtime_suspend().

    suspend")

    Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
    Signed-off-by: Mansur Alisha Shaik
    Reviewed-by: Stephen Boyd
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Mansur Alisha Shaik
     
  • [ Upstream commit 21926d466e3a4f35c2536244d1d56512cc81a0a9 ]

    Currently video driver is voting after clk enable and un voting
    before clk disable. This is incorrect, video driver should vote
    before clk enable and unvote after clk disable.

    Corrected this by changing the order of clk enable and clk disable.

    suspend")

    Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device
    Signed-off-by: Mansur Alisha Shaik
    Reviewed-by: Stephen Boyd
    Signed-off-by: Stanimir Varbanov
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Mansur Alisha Shaik
     
  • [ Upstream commit 0d72f489995bb8565f6fe30539d4504c88356a9e ]

    if mtk_jpeg_clk_init() succeed, mtk_jpeg_probe() and mtk_jpeg_remove()
    doesn't have a corresponding put_device(). Thus add a new helper
    mtk_jpeg_clk_release() to fix it.

    Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver")
    Signed-off-by: Yu Kuai
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit 940727bf22f74cbdef8de327de34c4ae565c89ea ]

    pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference leak in cedrus_start_streaming. We should fix it.

    Fixes: d5aecd289babf ("media: cedrus: Implement runtime PM")
    Signed-off-by: Zhang Qilong
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit 4cbbe2aaa0536b0e7b3dfbd7febc3bc2ec300559 ]

    pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference imbalance in rkisp1_vb2_start_streaming, so we
    should fix it.

    Fixes: 56e3b29f9f6b2 ("media: staging: rkisp1: add streaming paths")
    Signed-off-by: Zhang Qilong
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit 68579b32e786f9680e7c6b6c7d17e26943bb02b3 ]

    Fix PCLK polarity not being taken into account.
    Add comments about BT656 register control.
    Remove useless ov5640_set_stream_bt656() function.
    Refine comments about MIPI IO register control.

    Fixes: 4039b03720f7 ("media: i2c: ov5640: Add support for BT656 mode")
    Signed-off-by: Hugues Fruchet
    Reviewed-by: Jacopo Mondi
    Tested-by: Lad Prabhakar
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Hugues Fruchet
     
  • [ Upstream commit b3cc73d2bf14e7c6e0376fa9433e708349e9ddfc ]

    Document that the caller of v4l2_fwnode_endpoint_parse() must init the
    fields of struct v4l2_fwnode_endpoint (vep argument) fields.

    It used to be that the fields were zeroed by v4l2_fwnode_endpoint_parse
    when bus type was set to V4L2_MBUS_UNKNOWN but with recent changes (Fixes:
    line below) that no longer makes sense.

    Fixes: bb4bba9232fc ("media: v4l2-fwnode: Make bus configuration a struct")
    Signed-off-by: Sakari Ailus
    Reviewed-by: Niklas Söderlund
    Reviewed-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Sakari Ailus
     
  • [ Upstream commit 69baf338fc16a4d55c78da8874ce3f06feb38c78 ]

    Return -EINVAL if invalid bus-type is detected while parsing endpoints.

    Fixes: 26c1126c9b56 ("media: v4l: fwnode: Use media bus type for bus parser selection")
    Signed-off-by: Lad Prabhakar
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Lad Prabhakar
     
  • [ Upstream commit 4affafd7bec7c65da31777f18bd20420f1aeb5f8 ]

    if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have
    a corresponding put_device(). Thus add jump target to fix the exception
    handling for this function implementation.

    Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
    Signed-off-by: Yu Kuai
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit 27c3943683f74e35e1d390ceb2e3639eff616ad6 ]

    mtk_vcodec_release_dec_pm() will be called in two places:

    a. mtk_vcodec_init_dec_pm() succeed while mtk_vcodec_probe() return error.
    b. mtk_vcodec_dec_remove().

    In both cases put_device() call is needed, since of_find_device_by_node()
    was called in mtk_vcodec_init_dec_pm() previously.

    Thus add put_devices() call in mtk_vcodec_release_dec_pm()

    Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
    Signed-off-by: Yu Kuai
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit 5d4fa2c50125c9cda9e380d89268757cc5fa743d ]

    if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have
    a corresponding put_device(). Thus add jump target to fix the exception
    handling for this function implementation.

    Fixes: 590577a4e525 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver")
    Signed-off-by: Yu Kuai
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit f28a81a3b64270da3588174feff4628c36e0ff4e ]

    if of_find_device_by_node() succeeds, mtk_jpeg_clk_init() doesn't have
    a corresponding put_device(). Thus add put_device() to fix the exception
    handling for this function implementation.

    Fixes: 648372a87cee ("media: platform: Change the call functions of getting/enable/disable the jpeg's clock")
    Signed-off-by: Yu Kuai
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Yu Kuai
     
  • [ Upstream commit a08ad6339e0441ca12533969ed94a87e3655426e ]

    The are two instances of sizeof() being used incorrectly. The
    sizeof(void *) is incorrect because urb_buffer is a char ** pointer,
    fix this by using sizeof(*dev->urb_buffer). The sizeof(dma_addr_t *)
    is incorrect, it should be sizeof(*dev->urb_dma), which is a dma_addr_t
    and not a dma_addr_t *. This errors did not cause any issues because
    it just so happens the sizes are the same.

    Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")

    Fixes: 16427faf2867 ("[media] tm6000: Add parameter to keep urb bufs allocated")
    Signed-off-by: Colin Ian King
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Sasha Levin

    Colin Ian King
     
  • [ Upstream commit 81dbc24147f9250c186ae5875b3ed3136e9e293b ]

    Instead of having two different ways of expressing the same
    sleepability concept, using opposite logic, we can rework the
    from_ndo to can_sleep for a more consistent usage.

    Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.")
    Signed-off-by: Shannon Nelson
    Reviewed-by: Saeed Mahameed
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Sasha Levin

    Shannon Nelson
     
  • [ Upstream commit e94f76bb206333efcd0c02da5dbb142518c941a2 ]

    The _ionic_lif_rx_mode() is only used once and really doesn't
    need to be broken out.

    Signed-off-by: Shannon Nelson
    Reviewed-by: Saeed Mahameed
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Sasha Levin

    Shannon Nelson
     
  • [ Upstream commit e0243e1966592859da4c6ffe6d43e1576ec3c457 ]

    We should be using the multicast sync routines for the multicast
    filters. Also, let's just flatten the logic a bit and pull
    the small unicast routine back into ionic_set_rx_mode().

    Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.")
    Signed-off-by: Shannon Nelson
    Reviewed-by: Saeed Mahameed
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Sasha Levin

    Shannon Nelson