1. 19 Apr, 2024 2 commits
  2. 18 Apr, 2024 1 commit
  3. 17 Apr, 2024 9 commits
  4. 16 Apr, 2024 2 commits
  5. 15 Apr, 2024 9 commits
    • Lyude Paul's avatar
      drm/nouveau/dp: Don't probe eDP ports twice harder · bf52d7f9
      Lyude Paul authored
      I didn't pay close enough attention the last time I tried to fix this
      problem - while we currently do correctly take care to make sure we don't
      probe a connected eDP port more then once, we don't do the same thing for
      eDP ports we found to be disconnected.
      
      So, fix this and make sure we only ever probe eDP ports once and then leave
      them at that connector state forever (since without HPD, it's not going to
      change on its own anyway). This should get rid of the last few GSP errors
      getting spit out during runtime suspend and resume on some machines, as we
      tried to reprobe eDP ports in response to ACPI hotplug probe events.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240404233736.7946-3-lyude@redhat.com
      (cherry picked from commit fe6660b6)
      bf52d7f9
    • Lyude Paul's avatar
      drm/nouveau/kms/nv50-: Disable AUX bus for disconnected DP ports · ee7e980d
      Lyude Paul authored
      GSP has its own state for keeping track of whether or not a given display
      connector is plugged in or not, and enforces this state on the driver. In
      particular, AUX transactions on a DisplayPort connector which GSP says is
      disconnected can never succeed - and can in some cases even cause
      unexpected timeouts, which can trickle up to cause other problems. A good
      example of this is runtime power management: where we can actually get
      stuck trying to resume the GPU if a userspace application like fwupd tries
      accessing a drm_aux_dev for a disconnected port. This was an issue I hit a
      few times with my Slimbook Executive 16 - where trying to offload something
      to the discrete GPU would wake it up, and then potentially cause it to
      timeout as fwupd tried to immediately access the dp_aux_dev nodes for
      nouveau.
      
      Likewise: we don't really have any cases I know of where we'd want to
      ignore this state and try an aux transaction anyway - and failing pointless
      aux transactions immediately can even speed things up. So - let's start
      enabling/disabling the aux bus in nouveau_dp_detect() to fix this. We
      enable the aux bus during connector probing, and leave it enabled if we
      discover something is actually on the connector. Otherwise, we just shut it
      off.
      
      This should fix some people's runtime PM issues (like myself), and also get
      rid of quite of a lot of GSP error spam in dmesg.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240404233736.7946-2-lyude@redhat.com
      (cherry picked from commit 9c8a10bf)
      ee7e980d
    • Maíra Canal's avatar
      drm/v3d: Don't increment `enabled_ns` twice · 35f4f8c9
      Maíra Canal authored
      The commit 509433d8 ("drm/v3d: Expose the total GPU usage stats on sysfs")
      introduced the calculation of global GPU stats. For the regards, it used
      the already existing infrastructure provided by commit 09a93cc4 ("drm/v3d:
      Implement show_fdinfo() callback for GPU usage stats"). While adding
      global GPU stats calculation ability, the author forgot to delete the
      existing one.
      
      Currently, the value of `enabled_ns` is incremented twice by the end of
      the job, when it should be added just once. Therefore, delete the
      leftovers from commit 509433d8 ("drm/v3d: Expose the total GPU usage
      stats on sysfs").
      
      Fixes: 509433d8 ("drm/v3d: Expose the total GPU usage stats on sysfs")
      Reported-by: default avatarTvrtko Ursulin <tursulin@igalia.com>
      Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@igalia.com>
      Reviewed-by: default avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240403203517.731876-2-mcanal@igalia.com
      35f4f8c9
    • Zack Rusin's avatar
      drm/vmwgfx: Sort primary plane formats by order of preference · d4c972bf
      Zack Rusin authored
      The table of primary plane formats wasn't sorted at all, leading to
      applications picking our least desirable formats by defaults.
      
      Sort the primary plane formats according to our order of preference.
      
      Nice side-effect of this change is that it makes IGT's kms_atomic
      plane-invalid-params pass because the test picks the first format
      which for vmwgfx was DRM_FORMAT_XRGB1555 and uses fb's with odd sizes
      which make Pixman, which IGT depends on assert due to the fact that our
      16bpp formats aren't 32 bit aligned like Pixman requires all formats
      to be.
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Fixes: 36cc79bc ("drm/vmwgfx: Add universal plane support")
      Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v4.12+
      Acked-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240412025511.78553-6-zack.rusin@broadcom.com
      d4c972bf
    • Zack Rusin's avatar
      drm/vmwgfx: Fix crtc's atomic check conditional · a60ccade
      Zack Rusin authored
      The conditional was supposed to prevent enabling of a crtc state
      without a set primary plane. Accidently it also prevented disabling
      crtc state with a set primary plane. Neither is correct.
      
      Fix the conditional and just driver-warn when a crtc state has been
      enabled without a primary plane which will help debug broken userspace.
      
      Fixes IGT's kms_atomic_interruptible and kms_atomic_transition tests.
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Fixes: 06ec4190 ("drm/vmwgfx: Add and connect CRTC helper functions")
      Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v4.12+
      Reviewed-by: default avatarIan Forbes <ian.forbes@broadcom.com>
      Reviewed-by: default avatarMartin Krastev <martin.krastev@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240412025511.78553-5-zack.rusin@broadcom.com
      a60ccade
    • Zack Rusin's avatar
      drm/vmwgfx: Fix prime import/export · b32233ac
      Zack Rusin authored
      vmwgfx never supported prime import of external buffers. Furthermore the
      driver exposes two different objects to userspace: vmw_surface's and
      gem buffers but prime import/export only worked with vmw_surfaces.
      
      Because gem buffers are used through the dumb_buffer interface this meant
      that the driver created buffers couldn't have been prime exported or
      imported.
      
      Fix prime import/export. Makes IGT's kms_prime pass.
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Fixes: 8afa13a0 ("drm/vmwgfx: Implement DRIVER_GEM")
      Cc: <stable@vger.kernel.org> # v6.6+
      Reviewed-by: default avatarMartin Krastev <martin.krastev@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240412025511.78553-4-zack.rusin@broadcom.com
      b32233ac
    • Christian König's avatar
      drm/ttm: stop pooling cached NUMA pages v2 · b6976f32
      Christian König authored
      We only pool write combined and uncached allocations because they
      require extra overhead on allocation and release.
      
      If we also pool cached NUMA it not only means some extra unnecessary
      overhead, but also that under memory pressure it can happen that
      pages from the wrong NUMA node enters the pool and are re-used
      over and over again.
      
      This can lead to performance reduction after running into memory
      pressure.
      
      v2: restructure and cleanup the code a bit from the internal hack to
          test this.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Fixes: 4482d3c9 ("drm/ttm: add NUMA node id to the pool")
      CC: stable@vger.kernel.org
      Reviewed-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240415134821.1919-1-christian.koenig@amd.com
      b6976f32
    • Mikhail Kobuk's avatar
      drm: nv04: Fix out of bounds access · cf92bb77
      Mikhail Kobuk authored
      When Output Resource (dcb->or) value is assigned in
      fabricate_dcb_output(), there may be out of bounds access to
      dac_users array in case dcb->or is zero because ffs(dcb->or) is
      used as index there.
      The 'or' argument of fabricate_dcb_output() must be interpreted as a
      number of bit to set, not value.
      
      Utilize macros from 'enum nouveau_or' in calls instead of hardcoding.
      
      Found by Linux Verification Center (linuxtesting.org) with SVACE.
      
      Fixes: 2e5702af ("drm/nouveau: fabricate DCB encoder table for iMac G4")
      Fixes: 670820c0 ("drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200.")
      Signed-off-by: default avatarMikhail Kobuk <m.kobuk@ispras.ru>
      Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240411110854.16701-1-m.kobuk@ispras.ru
      cf92bb77
    • Dave Airlie's avatar
      nouveau: fix instmem race condition around ptr stores · fff1386c
      Dave Airlie authored
      Running a lot of VK CTS in parallel against nouveau, once every
      few hours you might see something like this crash.
      
      BUG: kernel NULL pointer dereference, address: 0000000000000008
      PGD 8000000114e6e067 P4D 8000000114e6e067 PUD 109046067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP PTI
      CPU: 7 PID: 53891 Comm: deqp-vk Not tainted 6.8.0-rc6+ #27
      Hardware name: Gigabyte Technology Co., Ltd. Z390 I AORUS PRO WIFI/Z390 I AORUS PRO WIFI-CF, BIOS F8 11/05/2021
      RIP: 0010:gp100_vmm_pgt_mem+0xe3/0x180 [nouveau]
      Code: c7 48 01 c8 49 89 45 58 85 d2 0f 84 95 00 00 00 41 0f b7 46 12 49 8b 7e 08 89 da 42 8d 2c f8 48 8b 47 08 41 83 c7 01 48 89 ee <48> 8b 40 08 ff d0 0f 1f 00 49 8b 7e 08 48 89 d9 48 8d 75 04 48 c1
      RSP: 0000:ffffac20c5857838 EFLAGS: 00010202
      RAX: 0000000000000000 RBX: 00000000004d8001 RCX: 0000000000000001
      RDX: 00000000004d8001 RSI: 00000000000006d8 RDI: ffffa07afe332180
      RBP: 00000000000006d8 R08: ffffac20c5857ad0 R09: 0000000000ffff10
      R10: 0000000000000001 R11: ffffa07af27e2de0 R12: 000000000000001c
      R13: ffffac20c5857ad0 R14: ffffa07a96fe9040 R15: 000000000000001c
      FS:  00007fe395eed7c0(0000) GS:ffffa07e2c980000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000008 CR3: 000000011febe001 CR4: 00000000003706f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
      
      ...
      
       ? gp100_vmm_pgt_mem+0xe3/0x180 [nouveau]
       ? gp100_vmm_pgt_mem+0x37/0x180 [nouveau]
       nvkm_vmm_iter+0x351/0xa20 [nouveau]
       ? __pfx_nvkm_vmm_ref_ptes+0x10/0x10 [nouveau]
       ? __pfx_gp100_vmm_pgt_mem+0x10/0x10 [nouveau]
       ? __pfx_gp100_vmm_pgt_mem+0x10/0x10 [nouveau]
       ? __lock_acquire+0x3ed/0x2170
       ? __pfx_gp100_vmm_pgt_mem+0x10/0x10 [nouveau]
       nvkm_vmm_ptes_get_map+0xc2/0x100 [nouveau]
       ? __pfx_nvkm_vmm_ref_ptes+0x10/0x10 [nouveau]
       ? __pfx_gp100_vmm_pgt_mem+0x10/0x10 [nouveau]
       nvkm_vmm_map_locked+0x224/0x3a0 [nouveau]
      
      Adding any sort of useful debug usually makes it go away, so I hand
      wrote the function in a line, and debugged the asm.
      
      Every so often pt->memory->ptrs is NULL. This ptrs ptr is set in
      the nv50_instobj_acquire called from nvkm_kmap.
      
      If Thread A and Thread B both get to nv50_instobj_acquire around
      the same time, and Thread A hits the refcount_set line, and in
      lockstep thread B succeeds at refcount_inc_not_zero, there is a
      chance the ptrs value won't have been stored since refcount_set
      is unordered. Force a memory barrier here, I picked smp_mb, since
      we want it on all CPUs and it's write followed by a read.
      
      v2: use paired smp_rmb/smp_wmb.
      
      Cc: <stable@vger.kernel.org>
      Fixes: be55287a ("drm/nouveau/imem/nv50: embed nvkm_instobj directly into nv04_instobj")
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240411011510.2546857-1-airlied@gmail.com
      fff1386c
  6. 14 Apr, 2024 10 commits
  7. 13 Apr, 2024 5 commits
    • Linus Torvalds's avatar
      Merge tag 'ata-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 7efd0a74
      Linus Torvalds authored
      Pull ata fixes from Damien Le Moal:
      
       - Add the mask_port_map parameter to the ahci driver. This is a
         follow-up to the recent snafu with the ASMedia controller and its
         virtual port hidding port-multiplier devices. As ASMedia confirmed
         that there is no way to determine if these slow-to-probe virtual
         ports are actually representing the ports of a port-multiplier
         devices, this new parameter allow masking ports to significantly
         speed up probing during system boot, resulting in shorter boot times.
      
       - A fix for an incorrect handling of a port unlock in
         ata_scsi_dev_rescan().
      
       - Allow command duration limits to be detected for ACS-4 devices are
         there are such devices out in the field.
      
      * tag 'ata-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        ata: libata-core: Allow command duration limits detection for ACS-4 drives
        ata: libata-scsi: Fix ata_scsi_dev_rescan() error path
        ata: ahci: Add mask_port_map module parameter
      7efd0a74
    • Linus Torvalds's avatar
      Merge tag 'zonefs-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 76b0e9c4
      Linus Torvalds authored
      Pull zonefs fix from Damien Le Moal:
      
       - Suppress a coccicheck warning using str_plural()
      
      * tag 'zonefs-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: Use str_plural() to fix Coccinelle warning
      76b0e9c4
    • Linus Torvalds's avatar
      Merge tag 'v6.9-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · fa4022cb
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - fix for oops in cifs_get_fattr of deleted files
      
       - fix for the remote open counter going negative in some directory
         lease cases
      
       - fix for mkfifo to instantiate dentry to avoid possible crash
      
       - important fix to allow handling key rotation for mount and remount
         (ie cases that are becoming more common when password that was used
         for the mount will expire soon but will be replaced by new password)
      
      * tag 'v6.9-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: fix broken reconnect when password changing on the server by allowing password rotation
        smb: client: instantiate when creating SFU files
        smb3: fix Open files on server counter going negative
        smb: client: fix NULL ptr deref in cifs_mark_open_handles_for_deleted_file()
      fa4022cb
    • Igor Pylypiv's avatar
      ata: libata-core: Allow command duration limits detection for ACS-4 drives · c0297e7d
      Igor Pylypiv authored
      Even though the command duration limits (CDL) feature was first added
      in ACS-5 (major version 12), there are some ACS-4 (major version 11)
      drives that implement CDL as well.
      
      IDENTIFY_DEVICE, SUPPORTED_CAPABILITIES, and CURRENT_SETTINGS log pages
      are mandatory in the ACS-4 standard so it should be safe to read these
      log pages on older drives implementing the ACS-4 standard.
      
      Fixes: 62e4a60e ("scsi: ata: libata: Detect support for command duration limits")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarIgor Pylypiv <ipylypiv@google.com>
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      c0297e7d
    • Damien Le Moal's avatar
      ata: libata-scsi: Fix ata_scsi_dev_rescan() error path · 79336504
      Damien Le Moal authored
      Commit 0c76106c ("scsi: sd: Fix TCG OPAL unlock on system resume")
      incorrectly handles failures of scsi_resume_device() in
      ata_scsi_dev_rescan(), leading to a double call to
      spin_unlock_irqrestore() to unlock a device port. Fix this by redefining
      the goto labels used in case of errors and only unlock the port
      scsi_scan_mutex when scsi_resume_device() fails.
      
      Bug found with the Smatch static checker warning:
      
      	drivers/ata/libata-scsi.c:4774 ata_scsi_dev_rescan()
      	error: double unlocked 'ap->lock' (orig line 4757)
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Fixes: 0c76106c ("scsi: sd: Fix TCG OPAL unlock on system resume")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarNiklas Cassel <cassel@kernel.org>
      79336504
  8. 12 Apr, 2024 2 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8f2c0577
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix the TLBI RANGE operand calculation causing live migration under
        KVM/arm64 to miss dirty pages due to stale TLB entries"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: tlb: Fix TLBI RANGE operand
      8f2c0577
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 678e14c7
      Linus Torvalds authored
      Pull SoC fixes from Arnd Bergmann:
       "The device tree changes this time are all for NXP i.MX platforms,
        addressing issues with clocks and regulators on i.MX7 and i.MX8.
      
        The old OMAP2 based Nokia N8x0 tablet get a couple of code fixes for
        regressions that came in.
      
        The ARM SCMI and FF-A firmware interfaces get a couple of minor bug
        fixes.
      
        A regression fix for RISC-V cache management addresses a problem with
        probe order on Sifive cores"
      
      * tag 'soc-fixes-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (23 commits)
        MAINTAINERS: Change Krzysztof Kozlowski's email address
        arm64: dts: imx8qm-ss-dma: fix can lpcg indices
        arm64: dts: imx8-ss-dma: fix can lpcg indices
        arm64: dts: imx8-ss-dma: fix adc lpcg indices
        arm64: dts: imx8-ss-dma: fix pwm lpcg indices
        arm64: dts: imx8-ss-dma: fix spi lpcg indices
        arm64: dts: imx8-ss-conn: fix usb lpcg indices
        arm64: dts: imx8-ss-lsio: fix pwm lpcg indices
        ARM: dts: imx7s-warp: Pass OV2680 link-frequencies
        ARM: dts: imx7-mba7: Use 'no-mmc' property
        arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order
        arm64: dts: freescale: imx8mp-venice-gw73xx-2x: fix USB vbus regulator
        arm64: dts: freescale: imx8mp-venice-gw72xx-2x: fix USB vbus regulator
        cache: sifive_ccache: Partially convert to a platform driver
        firmware: arm_scmi: Make raw debugfs entries non-seekable
        firmware: arm_scmi: Fix wrong fastchannel initialization
        firmware: arm_ffa: Fix the partition ID check in ffa_notification_info_get()
        ARM: OMAP2+: fix USB regression on Nokia N8x0
        mmc: omap: restore original power up/down steps
        mmc: omap: fix deferred probe
        ...
      678e14c7