1. 09 Apr, 2022 4 commits
  2. 08 Apr, 2022 10 commits
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · d00c50b3
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A small collection of fixes that have arrived since the merge window,
        the most noticable one is a fix for unmapping messages when the
        mapping was done with the struct device supplied to do the mapping
        overridden"
      
      * tag 'spi-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op()
        spi: cadence-quadspi: fix protocol setup for non-1-1-X operations
        spi: core: add dma_map_dev for __spi_unmap_msg()
        spi: mxic: Fix an error handling path in mxic_spi_probe()
        spi: rpc-if: Fix RPM imbalance in probe error path
      d00c50b3
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.18-rc1' of... · 98849765
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A few small driver specific fixes for v5.18, plus an update to the
        MAINTAINERS file"
      
      * tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        MAINTAINERS: Fix reviewer info for a few ROHM ICs
        regulator: atc260x: Fix missing active_discharge_on setting
        regulator: rtq2134: Fix missing active_discharge_on setting
        regulator: wm8994: Add an off-on delay for WM8994 variant
      98849765
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 0ccab014
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Improve API to make it clear that mmc_hw_reset() is for cards
         - Fixup support for writeback-cache for eMMC and SD
         - Check for errors after writes on SPI
      
        MMC host:
         - renesas_sdhi: A couple of fixes of TAP settings for eMMC HS400 mode
         - mmci_stm32: Fixup check of all elements in sg list
         - sdhci-xenon: Revert unnecessary fix for annoying 1.8V regulator warning"
      
      * tag 'mmc-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: core: improve API to make clear mmc_hw_reset is for cards
        mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete
        mmc: renesas_sdhi: special 4tap settings only apply to HS400
        mmc: core: Fixup support for writeback-cache for eMMC and SD
        mmc: block: Check for errors after write on SPI
        mmc: mmci: stm32: correctly check all elements of sg list
        Revert "mmc: sdhci-xenon: fix annoying 1.8V regulator warning"
      0ccab014
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 02994fd2
      Linus Torvalds authored
      Pull iommu fix from Joerg Roedel:
      
       - Fix boot regression due to a NULL-ptr dereference on OMAP machines
      
      * tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/omap: Fix regression in probe for NULL pointer dereference
      02994fd2
    • Matti Vaittinen's avatar
      MAINTAINERS: Fix reviewer info for a few ROHM ICs · 908b768f
      Matti Vaittinen authored
      The email backend used by ROHM keeps labeling patches as spam.
      Additionally, there have been reports of some emails been completely
      dropped. Finally also the email list (or shared inbox)
      linux-power@fi.rohmeurope.com inadvertly stopped working and has not
      been reviwed during the past few weeks.
      
      Remove no longer working list 'linux-power' list-entry and switch my
      email to use the personal gmail account instead of the company account.
      Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
      Link: https://lore.kernel.org/r/Yk/zAHusOdf4+h06@dc73szyh141qn5ck3nwqy-3.rev.dnainternet.fiSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      908b768f
    • Tony Lindgren's avatar
      iommu/omap: Fix regression in probe for NULL pointer dereference · 71ff461c
      Tony Lindgren authored
      Commit 3f6634d9 ("iommu: Use right way to retrieve iommu_ops") started
      triggering a NULL pointer dereference for some omap variants:
      
      __iommu_probe_device from probe_iommu_group+0x2c/0x38
      probe_iommu_group from bus_for_each_dev+0x74/0xbc
      bus_for_each_dev from bus_iommu_probe+0x34/0x2e8
      bus_iommu_probe from bus_set_iommu+0x80/0xc8
      bus_set_iommu from omap_iommu_init+0x88/0xcc
      omap_iommu_init from do_one_initcall+0x44/0x24
      
      This is caused by omap iommu probe returning 0 instead of ERR_PTR(-ENODEV)
      as noted by Jason Gunthorpe <jgg@ziepe.ca>.
      
      Looks like the regression already happened with an earlier commit
      6785eb91 ("iommu/omap: Convert to probe/release_device() call-backs")
      that changed the function return type and missed converting one place.
      
      Cc: Drew Fustini <dfustini@baylibre.com>
      Cc: Lu Baolu <baolu.lu@linux.intel.com>
      Cc: Suman Anna <s-anna@ti.com>
      Suggested-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
      Fixes: 6785eb91 ("iommu/omap: Convert to probe/release_device() call-backs")
      Fixes: 3f6634d9 ("iommu: Use right way to retrieve iommu_ops")
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Tested-by: default avatarDrew Fustini <dfustini@baylibre.com>
      Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Link: https://lore.kernel.org/r/20220331062301.24269-1-tony@atomide.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      71ff461c
    • Wolfram Sang's avatar
      mmc: core: improve API to make clear mmc_hw_reset is for cards · b71597ed
      Wolfram Sang authored
      To make it unambiguous that mmc_hw_reset() is for cards and not for
      controllers, we make the function argument mmc_card instead of mmc_host.
      Also, all users are converted.
      Suggested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Acked-by: default avatarKalle Valo <kvalo@kernel.org>
      Link: https://lore.kernel.org/r/20220408080045.6497-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b71597ed
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-04-08' of git://anongit.freedesktop.org/drm/drm · 1831fed5
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Main set of fixes for rc2, mostly amdgpu, but some dma-fence fixups as
        well, along with some other misc ones.
      
        dma-fence:
         - fix warning about fence containers
         - fix logic error in new fence merge code
         - handle empty dma_fence_arrays gracefully
      
        bridge:
         - Try all possible cases for bridge/panel detection.
      
        bindings:
         - Don't require input port for MIPI-DSI, and make width/height mandatory.
      
        fbdev:
         - Fix unregistering of framebuffers without device.
      
        nouveau:
         - Fix a crash when booting with nouveau on tegra.
      
        amdgpu:
         - GFX 10.3.7 fixes
         - noretry updates
         - VCN fixes
         - TMDS fix
         - zstate fix for freesync video
         - DCN 3.1.5 fix
         - Display stack size fix
         - Audio fix
         - DCN 3.1 pstate fix
         - TMZ VCN fix
         - APU passthrough fix
         - Misc other fixes
         - VCN 3.0 fixes
         - Misc display fixes
         - GC 10.3 golden register fix
         - Suspend fix
         - SMU 10 fix
      
        amdkfd:
         - Error handling fix
         - xgmi p2p fix
         - HWS VMIDs fix
         - Event fix
      
        panel:
         - ili9341: Fix optional regulator handling
      
        imx:
         - Catch an EDID allocation failure in imx-ldb
         - fix a leaked drm display mode on DT parsing error in parallel-display
         - properly remove the dw_hdmi bridge in case the component_add fails in dw_hdmi-imx
         - fix the IPU clock frequency debug printout in ipu-di"
      
      * tag 'drm-fixes-2022-04-08' of git://anongit.freedesktop.org/drm/drm: (61 commits)
        dt-bindings: display: panel: mipi-dbi-spi: Make width-mm/height-mm mandatory
        fbdev: Fix unregistering of framebuffers without device
        drm/amdgpu/smu10: fix SoC/fclk units in auto mode
        drm/amd/display: update dcn315 clock table read
        drm/amdgpu/display: change pipe policy for DCN 2.1
        drm/amd/display: Add configuration options for AUX wake work around.
        drm/amd/display: remove assert for odm transition case
        drm/amdgpu: don't use BACO for reset in S3
        drm/amd/display: Fix by adding FPU protection for dcn30_internal_validate_bw
        drm/amdkfd: Create file descriptor after client is added to smi_clients list
        drm/amdgpu: Sync up header and implementation to use the same parameter names
        drm/amdgpu: fix incorrect GCR_GENERAL_CNTL address
        amd/display: set backlight only if required
        drm/amd/display: Fix allocate_mst_payload assert on resume
        drm/amd/display: Revert FEC check in validation
        drm/amd/display: Add work around for AUX failure on wake.
        drm/amd/display: Clear optc false state when disable otg
        drm/amd/display: Enable power gating before init_pipes
        drm/amd/display: Remove redundant dsc power gating from init_hw
        drm/amd/display: Correct Slice reset calculation
        ...
      1831fed5
    • Linus Torvalds's avatar
      Merge tag '5.18-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 5a5dcfd1
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
      
       - reconnect fixes: one for DFS and one to avoid a reconnect race
      
       - small change to deal with upcoming behavior change of list iterators
      
      * tag '5.18-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: force new session setup and tcon for dfs
        cifs: remove check of list iterator against head past the loop body
        cifs: fix potential race with cifsd thread
      5a5dcfd1
    • Linus Torvalds's avatar
      Merge tag 'net-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 73b193f2
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from bpf and netfilter.
      
        Current release - new code bugs:
      
         - mctp: correct mctp_i2c_header_create result
      
         - eth: fungible: fix reference to __udivdi3 on 32b builds
      
         - eth: micrel: remove latencies support lan8814
      
        Previous releases - regressions:
      
         - bpf: resolve to prog->aux->dst_prog->type only for BPF_PROG_TYPE_EXT
      
         - vrf: fix packet sniffing for traffic originating from ip tunnels
      
         - rxrpc: fix a race in rxrpc_exit_net()
      
         - dsa: revert "net: dsa: stop updating master MTU from master.c"
      
         - eth: ice: fix MAC address setting
      
        Previous releases - always broken:
      
         - tls: fix slab-out-of-bounds bug in decrypt_internal
      
         - bpf: support dual-stack sockets in bpf_tcp_check_syncookie
      
         - xdp: fix coalescing for page_pool fragment recycling
      
         - ovs: fix leak of nested actions
      
         - eth: sfc:
            - add missing xdp queue reinitialization
            - fix using uninitialized xdp tx_queue
      
         - eth: ice:
            - clear default forwarding VSI during VSI release
            - fix broken IFF_ALLMULTI handling
            - synchronize_rcu() when terminating rings
      
         - eth: qede: confirm skb is allocated before using
      
         - eth: aqc111: fix out-of-bounds accesses in RX fixup
      
         - eth: slip: fix NPD bug in sl_tx_timeout()"
      
      * tag 'net-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits)
        drivers: net: slip: fix NPD bug in sl_tx_timeout()
        bpf: Adjust bpf_tcp_check_syncookie selftest to test dual-stack sockets
        bpf: Support dual-stack sockets in bpf_tcp_check_syncookie
        myri10ge: fix an incorrect free for skb in myri10ge_sw_tso
        net: usb: aqc111: Fix out-of-bounds accesses in RX fixup
        qede: confirm skb is allocated before using
        net: ipv6mr: fix unused variable warning with CONFIG_IPV6_PIMSM_V2=n
        net: phy: mscc-miim: reject clause 45 register accesses
        net: axiemac: use a phandle to reference pcs_phy
        dt-bindings: net: add pcs-handle attribute
        net: axienet: factor out phy_node in struct axienet_local
        net: axienet: setup mdio unconditionally
        net: sfc: fix using uninitialized xdp tx_queue
        rxrpc: fix a race in rxrpc_exit_net()
        net: openvswitch: fix leak of nested actions
        net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()
        net: openvswitch: don't send internal clone attribute to the userspace.
        net: micrel: Fix KS8851 Kconfig
        ice: clear cmd_type_offset_bsz for TX rings
        ice: xsk: fix VSI state check in ice_xsk_wakeup()
        ...
      73b193f2
  3. 07 Apr, 2022 13 commits
  4. 06 Apr, 2022 13 commits
    • Jason A. Donenfeld's avatar
      random: check for signals every PAGE_SIZE chunk of /dev/[u]random · e3c1c4fd
      Jason A. Donenfeld authored
      In 1448769c ("random: check for signal_pending() outside of
      need_resched() check"), Jann pointed out that we previously were only
      checking the TIF_NOTIFY_SIGNAL and TIF_SIGPENDING flags if the process
      had TIF_NEED_RESCHED set, which meant in practice, super long reads to
      /dev/[u]random would delay signal handling by a long time. I tried this
      using the below program, and indeed I wasn't able to interrupt a
      /dev/urandom read until after several megabytes had been read. The bug
      he fixed has always been there, and so code that reads from /dev/urandom
      without checking the return value of read() has mostly worked for a long
      time, for most sizes, not just for <= 256.
      
      Maybe it makes sense to keep that code working. The reason it was so
      small prior, ignoring the fact that it didn't work anyway, was likely
      because /dev/random used to block, and that could happen for pretty
      large lengths of time while entropy was gathered. But now, it's just a
      chacha20 call, which is extremely fast and is just operating on pure
      data, without having to wait for some external event. In that sense,
      /dev/[u]random is a lot more like /dev/zero.
      
      Taking a page out of /dev/zero's read_zero() function, it always returns
      at least one chunk, and then checks for signals after each chunk. Chunk
      sizes there are of length PAGE_SIZE. Let's just copy the same thing for
      /dev/[u]random, and check for signals and cond_resched() for every
      PAGE_SIZE amount of data. This makes the behavior more consistent with
      expectations, and should mitigate the impact of Jann's fix for the
      age-old signal check bug.
      
      ---- test program ----
      
        #include <unistd.h>
        #include <signal.h>
        #include <stdio.h>
        #include <sys/random.h>
      
        static unsigned char x[~0U];
      
        static void handle(int) { }
      
        int main(int argc, char *argv[])
        {
          pid_t pid = getpid(), child;
          signal(SIGUSR1, handle);
          if (!(child = fork())) {
            for (;;)
              kill(pid, SIGUSR1);
          }
          pause();
          printf("interrupted after reading %zd bytes\n", getrandom(x, sizeof(x), 0));
          kill(child, SIGTERM);
          return 0;
        }
      
      Cc: Jann Horn <jannh@google.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      e3c1c4fd
    • Thomas Zimmermann's avatar
      fbdev: Fix unregistering of framebuffers without device · 0f525289
      Thomas Zimmermann authored
      OF framebuffers do not have an underlying device in the Linux
      device hierarchy. Do a regular unregister call instead of hot
      unplugging such a non-existing device. Fixes a NULL dereference.
      An example error message on ppc64le is shown below.
      
        BUG: Kernel NULL pointer dereference on read at 0x00000060
        Faulting instruction address: 0xc00000000080dfa4
        Oops: Kernel access of bad area, sig: 11 [#1]
        LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
        [...]
        CPU: 2 PID: 139 Comm: systemd-udevd Not tainted 5.17.0-ae085d7f #1
        NIP:  c00000000080dfa4 LR: c00000000080df9c CTR: c000000000797430
        REGS: c000000004132fe0 TRAP: 0300   Not tainted  (5.17.0-ae085d7f)
        MSR:  8000000002009033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 28228282  XER: 20000000
        CFAR: c00000000000c80c DAR: 0000000000000060 DSISR: 40000000 IRQMASK: 0
        GPR00: c00000000080df9c c000000004133280 c00000000169d200 0000000000000029
        GPR04: 00000000ffffefff c000000004132f90 c000000004132f88 0000000000000000
        GPR08: c0000000015658f8 c0000000015cd200 c0000000014f57d0 0000000048228283
        GPR12: 0000000000000000 c00000003fffe300 0000000020000000 0000000000000000
        GPR16: 0000000000000000 0000000113fc4a40 0000000000000005 0000000113fcfb80
        GPR20: 000001000f7283b0 0000000000000000 c000000000e4a588 c000000000e4a5b0
        GPR24: 0000000000000001 00000000000a0000 c008000000db0168 c0000000021f6ec0
        GPR28: c0000000016d65a8 c000000004b36460 0000000000000000 c0000000016d64b0
        NIP [c00000000080dfa4] do_remove_conflicting_framebuffers+0x184/0x1d0
        [c000000004133280] [c00000000080df9c] do_remove_conflicting_framebuffers+0x17c/0x1d0 (unreliable)
        [c000000004133350] [c00000000080e4d0] remove_conflicting_framebuffers+0x60/0x150
        [c0000000041333a0] [c00000000080e6f4] remove_conflicting_pci_framebuffers+0x134/0x1b0
        [c000000004133450] [c008000000e70438] drm_aperture_remove_conflicting_pci_framebuffers+0x90/0x100 [drm]
        [c000000004133490] [c008000000da0ce4] bochs_pci_probe+0x6c/0xa64 [bochs]
        [...]
        [c000000004133db0] [c00000000002aaa0] system_call_exception+0x170/0x2d0
        [c000000004133e10] [c00000000000c3cc] system_call_common+0xec/0x250
      
      The bug [1] was introduced by commit 27599aac ("fbdev: Hot-unplug
      firmware fb devices on forced removal"). Most firmware framebuffers
      have an underlying platform device, which can be hot-unplugged
      before loading the native graphics driver. OF framebuffers do not
      (yet) have that device. Fix the code by unregistering the framebuffer
      as before without a hot unplug.
      
      Tested with 5.17 on qemu ppc64le emulation.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Fixes: 27599aac ("fbdev: Hot-unplug firmware fb devices on forced removal")
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Tested-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Cc: Zack Rusin <zackr@vmware.com>
      Cc: Javier Martinez Canillas <javierm@redhat.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: stable@vger.kernel.org # v5.11+
      Cc: Helge Deller <deller@gmx.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Zheyu Ma <zheyuma97@gmail.com>
      Cc: Xiyu Yang <xiyuyang19@fudan.edu.cn>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Link: https://lore.kernel.org/all/YkHXO6LGHAN0p1pq@debian/ # [1]
      Link: https://patchwork.freedesktop.org/patch/msgid/20220404194402.29974-1-tzimmermann@suse.de
      0f525289
    • Maxim Mikityanskiy's avatar
      bpf: Adjust bpf_tcp_check_syncookie selftest to test dual-stack sockets · 53968daf
      Maxim Mikityanskiy authored
      The previous commit fixed support for dual-stack sockets in
      bpf_tcp_check_syncookie. This commit adjusts the selftest to verify the
      fixed functionality.
      Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarArthur Fabre <afabre@cloudflare.com>
      Link: https://lore.kernel.org/bpf/20220406124113.2795730-2-maximmi@nvidia.com
      53968daf
    • Maxim Mikityanskiy's avatar
      bpf: Support dual-stack sockets in bpf_tcp_check_syncookie · 2e8702cc
      Maxim Mikityanskiy authored
      bpf_tcp_gen_syncookie looks at the IP version in the IP header and
      validates the address family of the socket. It supports IPv4 packets in
      AF_INET6 dual-stack sockets.
      
      On the other hand, bpf_tcp_check_syncookie looks only at the address
      family of the socket, ignoring the real IP version in headers, and
      validates only the packet size. This implementation has some drawbacks:
      
      1. Packets are not validated properly, allowing a BPF program to trick
         bpf_tcp_check_syncookie into handling an IPv6 packet on an IPv4
         socket.
      
      2. Dual-stack sockets fail the checks on IPv4 packets. IPv4 clients end
         up receiving a SYNACK with the cookie, but the following ACK gets
         dropped.
      
      This patch fixes these issues by changing the checks in
      bpf_tcp_check_syncookie to match the ones in bpf_tcp_gen_syncookie. IP
      version from the header is taken into account, and it is validated
      properly with address family.
      
      Fixes: 39904084 ("bpf: add helper to check for a valid SYN cookie")
      Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Acked-by: default avatarArthur Fabre <afabre@cloudflare.com>
      Link: https://lore.kernel.org/bpf/20220406124113.2795730-1-maximmi@nvidia.com
      2e8702cc
    • Alex Deucher's avatar
      drm/amdgpu/smu10: fix SoC/fclk units in auto mode · 2f25d8ce
      Alex Deucher authored
      SMU takes clock limits in Mhz units.  socclk and fclk were
      using 10 khz units in some cases.  Switch to Mhz units.
      Fixes higher than required SoC clocks.
      
      Fixes: 97cf3299 ("drm/amd/pm: Removed fixed clock in auto mode DPM")
      Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      2f25d8ce
    • Dmytro Laktyushkin's avatar
      drm/amd/display: update dcn315 clock table read · 28c25238
      Dmytro Laktyushkin authored
      [Why & How]
      Make dcn315 base its clock table off dcfclk rather than fclk.
      
      This change also adds some sanity checking to make sure an
      empty pmfw table does not result in invalid dal clocks.
      Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
      Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      28c25238
    • Benjamin Marty's avatar
      drm/amdgpu/display: change pipe policy for DCN 2.1 · 879791ad
      Benjamin Marty authored
      Fixes crash on MST Hub disconnect.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1849
      Fixes: ee2698cf ("drm/amd/display: Changed pipe split policy to allow for multi-display pipe split")
      Signed-off-by: default avatarBenjamin Marty <info@benjaminmarty.ch>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      879791ad
    • Jimmy Kizito's avatar
      drm/amd/display: Add configuration options for AUX wake work around. · 6e93d5b0
      Jimmy Kizito authored
      [Why]
      Work around to try to wake unresponsive DP sinks may need to be adjusted
      for certain sinks.
      
      [How]
      Add options to disable work around or adjust time spent trying to wake
      unresponsive DPRX.
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Reviewed-by: default avatarMartin Leung <Martin.Leung@amd.com>
      Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
      Signed-off-by: default avatarJimmy Kizito <Jimmy.Kizito@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6e93d5b0
    • Eric Bernstein's avatar
      drm/amd/display: remove assert for odm transition case · 7e8906dc
      Eric Bernstein authored
      Remove assert that will hit during odm transition case,
      since this is a valid case.
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
      Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
      Signed-off-by: default avatarEric Bernstein <eric.bernstein@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7e8906dc
    • Alex Deucher's avatar
      drm/amdgpu: don't use BACO for reset in S3 · ebc002e3
      Alex Deucher authored
      Seems to cause a reboots or hangs on some systems.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1924
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1953
      Fixes: daf8de08 ("drm/amdgpu: always reset the asic in suspend (v2)")
      Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ebc002e3
    • CHANDAN VURDIGERE NATARAJ's avatar
      drm/amd/display: Fix by adding FPU protection for dcn30_internal_validate_bw · ca119884
      CHANDAN VURDIGERE NATARAJ authored
      [Why]
      Below general protection fault observed when WebGL Aquarium is run for
      longer duration. If drm debug logs are enabled and set to 0x1f then the
      issue is observed within 10 minutes of run.
      
      [  100.717056] general protection fault, probably for non-canonical address 0x2d33302d32323032: 0000 [#1] PREEMPT SMP NOPTI
      [  100.727921] CPU: 3 PID: 1906 Comm: DrmThread Tainted: G        W         5.15.30 #12 d726c6a2d6ebe5cf9223931cbca6892f916fe18b
      [  100.754419] RIP: 0010:CalculateSwathWidth+0x1f7/0x44f
      [  100.767109] Code: 00 00 00 f2 42 0f 11 04 f0 48 8b 85 88 00 00 00 f2 42 0f 10 04 f0 48 8b 85 98 00 00 00 f2 42 0f 11 04 f0 48 8b 45 10 0f 57 c0 <f3> 42 0f 2a 04 b0 0f 57 c9 f3 43 0f 2a 0c b4 e8 8c e2 f3 ff 48 8b
      [  100.781269] RSP: 0018:ffffa9230079eeb0 EFLAGS: 00010246
      [  100.812528] RAX: 2d33302d32323032 RBX: 0000000000000500 RCX: 0000000000000000
      [  100.819656] RDX: 0000000000000001 RSI: ffff99deb712c49c RDI: 0000000000000000
      [  100.826781] RBP: ffffa9230079ef50 R08: ffff99deb712460c R09: ffff99deb712462c
      [  100.833907] R10: ffff99deb7124940 R11: ffff99deb7124d70 R12: ffff99deb712ae44
      [  100.841033] R13: 0000000000000001 R14: 0000000000000000 R15: ffffa9230079f0a0
      [  100.848159] FS:  00007af121212640(0000) GS:ffff99deba780000(0000) knlGS:0000000000000000
      [  100.856240] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  100.861980] CR2: 0000209000fe1000 CR3: 000000011b18c000 CR4: 0000000000350ee0
      [  100.869106] Call Trace:
      [  100.871555]  <TASK>
      [  100.873655]  ? asm_sysvec_reschedule_ipi+0x12/0x20
      [  100.878449]  CalculateSwathAndDETConfiguration+0x1a3/0x6dd
      [  100.883937]  dml31_ModeSupportAndSystemConfigurationFull+0x2ce4/0x76da
      [  100.890467]  ? kallsyms_lookup_buildid+0xc8/0x163
      [  100.895173]  ? kallsyms_lookup_buildid+0xc8/0x163
      [  100.899874]  ? __sprint_symbol+0x80/0x135
      [  100.903883]  ? dm_update_plane_state+0x3f9/0x4d2
      [  100.908500]  ? symbol_string+0xb7/0xde
      [  100.912250]  ? number+0x145/0x29b
      [  100.915566]  ? vsnprintf+0x341/0x5ff
      [  100.919141]  ? desc_read_finalized_seq+0x39/0x87
      [  100.923755]  ? update_load_avg+0x1b9/0x607
      [  100.927849]  ? compute_mst_dsc_configs_for_state+0x7d/0xd5b
      [  100.933416]  ? fetch_pipe_params+0xa4d/0xd0c
      [  100.937686]  ? dc_fpu_end+0x3d/0xa8
      [  100.941175]  dml_get_voltage_level+0x16b/0x180
      [  100.945619]  dcn30_internal_validate_bw+0x10e/0x89b
      [  100.950495]  ? dcn31_validate_bandwidth+0x68/0x1fc
      [  100.955285]  ? resource_build_scaling_params+0x98b/0xb8c
      [  100.960595]  ? dcn31_validate_bandwidth+0x68/0x1fc
      [  100.965384]  dcn31_validate_bandwidth+0x9a/0x1fc
      [  100.970001]  dc_validate_global_state+0x238/0x295
      [  100.974703]  amdgpu_dm_atomic_check+0x9c1/0xbce
      [  100.979235]  ? _printk+0x59/0x73
      [  100.982467]  drm_atomic_check_only+0x403/0x78b
      [  100.986912]  drm_mode_atomic_ioctl+0x49b/0x546
      [  100.991358]  ? drm_ioctl+0x1c1/0x3b3
      [  100.994936]  ? drm_atomic_set_property+0x92a/0x92a
      [  100.999725]  drm_ioctl_kernel+0xdc/0x149
      [  101.003648]  drm_ioctl+0x27f/0x3b3
      [  101.007051]  ? drm_atomic_set_property+0x92a/0x92a
      [  101.011842]  amdgpu_drm_ioctl+0x49/0x7d
      [  101.015679]  __se_sys_ioctl+0x7c/0xb8
      [  101.015685]  do_syscall_64+0x5f/0xb8
      [  101.015690]  ? __irq_exit_rcu+0x34/0x96
      
      [How]
      It calles populate_dml_pipes which uses doubles to initialize.
      Adding FPU protection avoids context switch and probable loss of vba context
      as there is potential contention while drm debug logs are enabled.
      Signed-off-by: default avatarCHANDAN VURDIGERE NATARAJ <chandan.vurdigerenataraj@amd.com>
      Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ca119884
    • Lee Jones's avatar
      drm/amdkfd: Create file descriptor after client is added to smi_clients list · e79a2398
      Lee Jones authored
      This ensures userspace cannot prematurely clean-up the client before
      it is fully initialised which has been proven to cause issues in the
      past.
      
      Cc: Felix Kuehling <Felix.Kuehling@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      e79a2398
    • Ma Jun's avatar
      drm/amdgpu: Sync up header and implementation to use the same parameter names · ef1a0808
      Ma Jun authored
      Sync up header and implementation to use the same parameter names
      in function amdgpu_ring_init.
      ring_size -> max_dw, prio -> hw_prio
      Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarMa Jun <Jun.Ma2@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      ef1a0808