1. 13 Jun, 2023 10 commits
    • Sonny Jiang's avatar
      drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1 · 9db5ec1c
      Sonny Jiang authored
      Only vcn0 can process AV1 codecx. In order to use both vcn0 and
      vcn1 in h264/265 transcode to AV1 cases, set vcn0 sched score to 1
      at initialization time.
      Signed-off-by: default avatarSonny Jiang <sonjiang@amd.com>
      Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.1.x
      9db5ec1c
    • Thomas Zimmermann's avatar
      drm/radeon: Disable outputs when releasing fbdev client · 7ac9be96
      Thomas Zimmermann authored
      Disable the modesetting pipeline before release the radeon's fbdev
      client. Fixes the following error:
      
      [   17.217408] WARNING: CPU: 5 PID: 1464 at drivers/gpu/drm/ttm/ttm_bo.c:326 ttm_bo_release+0x27e/0x2d0 [ttm]
      [   17.217418] Modules linked in: edac_mce_amd radeon(+) drm_ttm_helper ttm video drm_suballoc_helper drm_display_helper kvm irqbypass drm_kms_helper syscopyarea crc32_pclmul sysfillrect sha512_ssse3 sysimgblt sha512_generic cfbfillrect cfbimgblt wmi_bmof aesni_intel cfbcopyarea crypto_simd cryptd k10temp acpi_cpufreq wmi dm_mod
      [   17.217432] CPU: 5 PID: 1464 Comm: systemd-udevd Not tainted 6.4.0-rc4+ #1
      [   17.217436] Hardware name: Micro-Star International Co., Ltd. MS-7A38/B450M PRO-VDH MAX (MS-7A38), BIOS B.G0 07/26/2022
      [   17.217438] RIP: 0010:ttm_bo_release+0x27e/0x2d0 [ttm]
      [   17.217444] Code: 48 89 43 38 48 89 43 40 48 8b 5c 24 30 48 8b b5 40 08 00 00 48 8b 6c 24 38 48 83 c4 58 e9 7a 49 f7 e0 48 89 ef e9 6c fe ff ff <0f> 0b 48 83 7b 20 00 0f 84 b7 fd ff ff 0f 0b 0f 1f 00 e9 ad fd ff
      [   17.217448] RSP: 0018:ffffc9000095fbb0 EFLAGS: 00010202
      [   17.217451] RAX: 0000000000000001 RBX: ffff8881052c8de0 RCX: 0000000000000000
      [   17.217453] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881052c8de0
      [   17.217455] RBP: ffff888104a66e00 R08: ffff8881052c8de0 R09: ffff888104a7cf08
      [   17.217457] R10: ffffc9000095fbe0 R11: ffffc9000095fbe8 R12: ffff8881052c8c78
      [   17.217458] R13: ffff8881052c8c78 R14: dead000000000100 R15: ffff88810528b108
      [   17.217460] FS:  00007f319fcbb8c0(0000) GS:ffff88881a540000(0000) knlGS:0000000000000000
      [   17.217463] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   17.217464] CR2: 000055dc8b0224a0 CR3: 000000010373d000 CR4: 0000000000750ee0
      [   17.217466] PKRU: 55555554
      [   17.217468] Call Trace:
      [   17.217470]  <TASK>
      [   17.217472]  ? __warn+0x97/0x160
      [   17.217476]  ? ttm_bo_release+0x27e/0x2d0 [ttm]
      [   17.217481]  ? report_bug+0x1ec/0x200
      [   17.217487]  ? handle_bug+0x3c/0x70
      [   17.217490]  ? exc_invalid_op+0x1f/0x90
      [   17.217493]  ? preempt_count_sub+0xb5/0x100
      [   17.217496]  ? asm_exc_invalid_op+0x16/0x20
      [   17.217500]  ? ttm_bo_release+0x27e/0x2d0 [ttm]
      [   17.217505]  ? ttm_resource_move_to_lru_tail+0x1ab/0x1d0 [ttm]
      [   17.217511]  radeon_bo_unref+0x1a/0x30 [radeon]
      [   17.217547]  radeon_gem_object_free+0x20/0x30 [radeon]
      [   17.217579]  radeon_fbdev_fb_destroy+0x57/0x90 [radeon]
      [   17.217616]  unregister_framebuffer+0x72/0x110
      [   17.217620]  drm_client_dev_unregister+0x6d/0xe0
      [   17.217623]  drm_dev_unregister+0x2e/0x90
      [   17.217626]  drm_put_dev+0x26/0x90
      [   17.217628]  pci_device_remove+0x44/0xc0
      [   17.217631]  really_probe+0x257/0x340
      [   17.217635]  __driver_probe_device+0x73/0x120
      [   17.217638]  driver_probe_device+0x2c/0xb0
      [   17.217641]  __driver_attach+0xa0/0x150
      [   17.217643]  ? __pfx___driver_attach+0x10/0x10
      [   17.217646]  bus_for_each_dev+0x67/0xa0
      [   17.217649]  bus_add_driver+0x10e/0x210
      [   17.217651]  driver_register+0x5c/0x120
      [   17.217653]  ? __pfx_radeon_module_init+0x10/0x10 [radeon]
      [   17.217681]  do_one_initcall+0x44/0x220
      [   17.217684]  ? kmalloc_trace+0x37/0xc0
      [   17.217688]  do_init_module+0x64/0x240
      [   17.217691]  __do_sys_finit_module+0xb2/0x100
      [   17.217694]  do_syscall_64+0x3b/0x90
      [   17.217697]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
      [   17.217700] RIP: 0033:0x7f319feaa5a9
      [   17.217702] Code: 08 89 e8 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 27 08 0d 00 f7 d8 64 89 01 48
      [   17.217706] RSP: 002b:00007ffc6bf3e7f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [   17.217709] RAX: ffffffffffffffda RBX: 00005607204f3170 RCX: 00007f319feaa5a9
      [   17.217710] RDX: 0000000000000000 RSI: 00007f31a002eefd RDI: 0000000000000018
      [   17.217712] RBP: 00007f31a002eefd R08: 0000000000000000 R09: 00005607204f1860
      [   17.217714] R10: 0000000000000018 R11: 0000000000000246 R12: 0000000000020000
      [   17.217716] R13: 0000000000000000 R14: 0000560720522450 R15: 0000560720255899
      [   17.217718]  </TASK>
      [   17.217719] ---[ end trace 0000000000000000 ]---
      
      The buffer object backing the fbdev emulation got pinned twice: by the
      fb_probe helper radeon_fbdev_create_pinned_object() and the modesetting
      code when the framebuffer got displayed. It only got unpinned once by
      the fbdev helper radeon_fbdev_destroy_pinned_object(). Hence TTM's BO-
      release function complains about the pin counter. Forcing the outputs
      off also undoes the modesettings pin increment.
      Tested-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reported-by: default avatarBorislav Petkov <bp@alien8.de>
      Closes: https://lore.kernel.org/dri-devel/20230603174814.GCZHt83pN+wNjf63sC@fat_crate.local/Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Fixes: e317a69f ("drm/radeon: Implement client-based fbdev emulation")
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7ac9be96
    • Kenneth Feng's avatar
      drm/amd/pm: workaround for compute workload type on some skus · 7ca302d4
      Kenneth Feng authored
      On smu 13.0.0, the compute workload type cannot be set on all the skus
      due to some other problems. This workaround is to make sure compute workload type
      can also run on some specific skus.
      
      v2: keep the variable consistent
      Signed-off-by: default avatarKenneth Feng <kenneth.feng@amd.com>
      Acked-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Reviewed-by: default avatarFeifei Xu <Feifei.Xu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.1.x
      7ca302d4
    • Mario Limonciello's avatar
      drm/amd: Tighten permissions on VBIOS flashing attributes · 7ab1a491
      Mario Limonciello authored
      Non-root users shouldn't be able to try to trigger a VBIOS flash
      or query the flashing status.  This should be reserved for users with the
      appropriate permissions.
      
      Cc: stable@vger.kernel.org
      Fixes: 8424f2cc ("drm/amdgpu/psp: Add vbflash sysfs interface support")
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7ab1a491
    • Mario Limonciello's avatar
      drm/amd: Make sure image is written to trigger VBIOS image update flow · 3eb1a3a0
      Mario Limonciello authored
      The VBIOS image update flow requires userspace to:
      1) Write the image to `psp_vbflash`
      2) Read `psp_vbflash`
      3) Poll `psp_vbflash_status` to check for completion
      
      If userspace reads `psp_vbflash` before writing an image, it's
      possible that it causes problems that can put the dGPU into an invalid
      state.
      
      Explicitly check that an image has been written before letting a read
      succeed.
      
      Cc: stable@vger.kernel.org
      Fixes: 8424f2cc ("drm/amdgpu/psp: Add vbflash sysfs interface support")
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3eb1a3a0
    • Alex Deucher's avatar
      drm/amdgpu: add missing radeon secondary PCI ID · e61f6774
      Alex Deucher authored
      0x5b70 is a missing RV370 secondary id.  Add it so
      we don't try and probe it with amdgpu.
      
      Cc: michel@daenzer.net
      Reviewed-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
      Tested-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      e61f6774
    • Jiadong Zhu's avatar
      drm/amdgpu: Implement gfx9 patch functions for resubmission · 5b711e7f
      Jiadong Zhu authored
      Patch the packages including CONTEXT_CONTROL and WRITE_DATA for gfx9
      during the resubmission scenario.
      Signed-off-by: default avatarJiadong Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.3.x
      5b711e7f
    • Jiadong Zhu's avatar
      drm/amdgpu: Modify indirect buffer packages for resubmission · 87af86ae
      Jiadong Zhu authored
      When the preempted IB frame resubmitted to cp, we need to modify the frame
      data including:
      1. set PRE_RESUME 1 in CONTEXT_CONTROL.
      2. use meta data(DE and CE) read from CSA in WRITE_DATA.
      
      Add functions to save the location the first time IBs emitted and callback
      to patch the package when resubmission happens.
      Signed-off-by: default avatarJiadong Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.3.x
      87af86ae
    • Jiadong Zhu's avatar
      drm/amdgpu: Program gds backup address as zero if no gds allocated · 94034b30
      Jiadong Zhu authored
      It is firmware requirement to set gds_backup_addrlo and gds_backup_addrhi
      of DE meta both zero if no gds partition is allocated for the frame.
      Signed-off-by: default avatarJiadong Zhu <Jiadong.Zhu@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.3.x
      94034b30
    • Jiadong Zhu's avatar
      drm/amdgpu: Reset CP_VMID_PREEMPT after trailing fence signaled · 1dbcf770
      Jiadong Zhu authored
      When MEC executes unmap_queue for mid command buffer preemption, it will
      kick the write pointer of the gfx ring, set CP_VMID_PREEMPT to trigger the
      preemption and wait for CP_VMID_PREEMPT becomes zero after the preemption
      done. There is a race condition that PFP may excute the resetting command
      before MEC set CP_VMID_PREEMPT. As a result, hang happens as
      CP_VMID_PREEMPT is always 0xffff.
      
      To avoid this, we send resetting CP_VMID_PREEMPT command after the trailing
      fence is siganled and update gfx write pointer explicitly.
      Signed-off-by: default avatarJiadong Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.3.x
      Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2535
      1dbcf770
  2. 11 Jun, 2023 3 commits
    • Linus Torvalds's avatar
      Linux 6.4-rc6 · 858fd168
      Linus Torvalds authored
      858fd168
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4c605260
      Linus Torvalds authored
      Pull x86 fix from Borislav Petkov:
      
       - Set up the kernel CS earlier in the boot process in case EFI boots
         the kernel after bypassing the decompressor and the CS descriptor
         used ends up being the EFI one which is not mapped in the identity
         page table, leading to early SEV/SNP guest communication exceptions
         resulting in the guest crashing
      
      * tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed
      4c605260
    • Linus Torvalds's avatar
      Merge tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd · 65d7ca59
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
       "Five smb3 server fixes, all also for stable:
      
         - Fix four slab out of bounds warnings: improve checks for protocol
           id, and for small packet length, and for create context parsing,
           and for negotiate context parsing
      
         - Fix for incorrect dereferencing POSIX ACLs"
      
      * tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd:
        ksmbd: validate smb request protocol id
        ksmbd: check the validation of pdu_size in ksmbd_conn_handler_loop
        ksmbd: fix posix_acls and acls dereferencing possible ERR_PTR()
        ksmbd: fix out-of-bound read in parse_lease_state()
        ksmbd: fix out-of-bound read in deassemble_neg_contexts()
      65d7ca59
  3. 10 Jun, 2023 3 commits
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 022ce886
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Biggest news is that Andi Shyti steps in for maintaining the
        controller drivers. Thank you very much!
      
        Other than that, one new driver maintainer and the rest is usual
        driver bugfixes. at24 has a Kconfig dependecy fix"
      
      * tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        MAINTAINERS: Add entries for Renesas RZ/V2M I2C driver
        eeprom: at24: also select REGMAP
        i2c: sprd: Delete i2c adapter in .remove's error path
        i2c: mv64xxx: Fix reading invalid status value in atomic mode
        i2c: designware: fix idx_write_cnt in read loop
        i2c: mchp-pci1xxxx: Avoid cast to incompatible function type
        i2c: img-scb: Fix spelling mistake "innacurate" -> "inaccurate"
        MAINTAINERS: Add myself as I2C host drivers maintainer
      022ce886
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · 6be5e47b
      Linus Torvalds authored
      Pull soundwire fixes from Vinod Koul:
       "Core fix for missing flag clear, error patch handling in qcom driver
        and BIOS quirk for HP Spectre x360:
      
         - HP Spectre x360 soundwire DMI quirk
      
         - Error path handling for qcom driver
      
         - Core fix for missing clear of alloc_slave_rt"
      
      * tag 'soundwire-6.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: stream: Add missing clear of alloc_slave_rt
        soundwire: qcom: add proper error paths in qcom_swrm_startup()
        soundwire: dmi-quirks: add new mapping for HP Spectre x360
      6be5e47b
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 859c7459
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Most of the changes this time are for the Qualcomm Snapdragon
        platforms.
      
        There are bug fixes for error handling in Qualcomm icc-bwmon,
        rpmh-rsc, ramp_controller and rmtfs driver as well as the AMD tee
        firmware driver and a missing initialization in the Arm ff-a firmware
        driver. The Qualcomm RPMh and EDAC drivers need some rework to work
        correctly on all supported chips.
      
        The DT fixes include:
      
         - i.MX8 fixes for gpio, pinmux and clock settings
      
         - ADS touchscreen gpio polarity settings in several machines
      
         - Address dtb warnings for caches, panel and input-enable properties
           on Qualcomm platforms
      
         - Incorrect data on qualcomm platforms fir SA8155P power domains,
           SM8550 LLCC, SC7180-lite SDRAM frequencies and SM8550 soundwire
      
         - Remoteproc firmware paths are corrected for Sony Xperia 10 IV"
      
      * tag 'arm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (36 commits)
        firmware: arm_ffa: Set handle field to zero in memory descriptor
        ARM: dts: Fix erroneous ADS touchscreen polarities
        arm64: dts: imx8mn-beacon: Fix SPI CS pinmux
        arm64: dts: imx8-ss-dma: assign default clock rate for lpuarts
        arm64: dts: imx8qm-mek: correct GPIOs for USDHC2 CD and WP signals
        EDAC/qcom: Get rid of hardcoded register offsets
        EDAC/qcom: Remove superfluous return variable assignment in qcom_llcc_core_setup()
        arm64: dts: qcom: sm8550: Use the correct LLCC register scheme
        dt-bindings: cache: qcom,llcc: Fix SM8550 description
        arm64: dts: qcom: sc7180-lite: Fix SDRAM freq for misidentified sc7180-lite boards
        arm64: dts: qcom: sm8550: use uint16 for Soundwire interval
        soc: qcom: rpmhpd: Add SA8155P power domains
        arm64: dts: qcom: Split out SA8155P and use correct RPMh power domains
        dt-bindings: power: qcom,rpmpd: Add SA8155P
        soc: qcom: Rename ice to qcom_ice to avoid module name conflict
        soc: qcom: rmtfs: Fix error code in probe()
        soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe()
        ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc
        ARM: at91: pm: fix imbalanced reference counter for ethernet devices
        arm64: dts: qcom: sm6375-pdx225: Fix remoteproc firmware paths
        ...
      859c7459
  4. 09 Jun, 2023 23 commits
  5. 08 Jun, 2023 1 commit