summary refs log tree commit diff
path: root/drivers
AgeCommit message (Collapse)Author
2023-12-15Input: xpad - add HyperX Clutch Gladiate SupportMax Nguyen
Add HyperX controller support to xpad_device and xpad_table. Suggested-by: Chris Toledanes <chris.toledanes@hp.com> Reviewed-by: Carl Ng <carl.ng@hp.com> Signed-off-by: Max Nguyen <maxwell.nguyen@hp.com> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com> Link: https://lore.kernel.org/r/20230906231514.4291-1-hphyperxdev@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit e28a0974d749e5105d77233c0a84d35c37da047e) Signed-off-by: Vicki Pfau <vi@endrift.com>
2023-12-07Revert "uinput: Hold mutex while destroying udev"Vicki Pfau
This reverts commit f476acbd4e6c9ce0ee397e993dd21a5d6fbb10d5.
2023-12-06HID: nintendo: Prevent divide-by-zero on codeGuilherme G. Piccoli
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
2023-12-03drm/amdgpu: Enable tunneling on high-priority compute queuesFriedrich Vock
This improves latency if the GPU is already busy with other work. This is useful for VR compositors that submit highly latency-sensitive compositing work on high-priority compute queues while the GPU is busy rendering the next frame. Userspace merge request: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26462 Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de>
2023-12-03drm/amd/display: Revert some of the vrr always on hackJoshua Ashton
Fixes frame timings on some non)-VRR external displays going all whacky. This makes us not use the late vblank irq handler (backporch line 0) and instead send the vblank event immediately on page flip when we know where the vblank is going to be. Should also improve latency/stutter on internal display potentially too.
2023-11-30uinput: Hold mutex while destroying udevVicki Pfau
There exists a race condition where closing a uinput device while another thread is preparing a request can lead to the request being submitted and waiting until it times out as the queue had already been flushed in preparation of destroying the udev object. While the request will eventually time out, it would ideally not be submitted in the first place and error out beforehand. By holding the mutex, we can guarantee that the device is actually properly destroyed before the request gets prepared, and thus is correctly seen as unavailable for requests. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218183 Signed-off-by: Vicki Pfau <vi@endrift.com> (cherry picked from commit 7cc7c60b27cc550ad7af0b83a57f542637372681)
2023-11-30uinput: Allow uinput_request_submit wait interruptingVicki Pfau
Currently, uinput_request_submit will only fail if the request wait times out. However, in other places this wait is interruptable, and in this specific location it can lead to issues, such as causing system suspend to hang until the request times out. Since the timeout is so long, this can cause the appearance of a total system freeze. Making the wait interruptable resolves this and possibly further issues. Signed-off-by: Vicki Pfau <vi@endrift.com> (cherry picked from commit 15ca4637d3a9b38fe154555999d7f87fd73a0b2f)
2023-11-22mfd: steamdeck: Expose controller board power in sysfsAndrey Smirnov
As of version 118 Deck's BIOS implements "SCBP" method that allows gating power of the controller board (VBUS). Add a basic WO method to our root MFD device to allow toggling that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> (cherry picked from commit f97f32718acc10cbb51fef925842392e80904d74)
2023-11-22leds-steamdeck: Add support for LED birghtness multiplierAndrey Smirnov
Add support for LED birghtness multiplier exposed via custom sysfs attribute (led_brightness_multiplier). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> (cherry picked from commit c4ea057992e189ec8821cde3a65e2cc0529a5088)
2023-11-22amdgpu_dm: remove debug spewPierre-Loup A. Griffais
2023-11-22Merge branch 'rolandor/wlan_debug_cleanup' into 'frog/6.1.52'John Schoenick
wifi: ath11k: remove extra warning message, move to debug See merge request jupiter/linux-integration!30
2023-11-22Revert "PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device" 6.1.52-valve8-no-drdAndres Rodriguez
This reverts commit a4904c47fcd7fc9152b6b04409feac1130e2033d. This results in some USB devices to fail to enumerate. Revert pending further investigation.
2023-11-21Add 2s delay before enabling DP link for dockSwapnil Patel
2023-11-17wifi: ath11k: remove extra warning message, move to debugqingzong.ma
2023-11-09[Zhongjun.yu][BT]: Added host changes related to the BR/EDR/LE gamepad wake-up.Rolando Roca
<Change Type>: FR(Feature Request) <<< Test Notes >>> <Test-Proposal>: 1)BT function(power on/restart/connect/disconnect/iop) 2)BT BR/EDR gamepad wakeup function 3)BT BLE gamepad wakeup function <Stress-Test>: Y
2023-11-08amdgpu: fix Galileo desktop brightness overflowingPierre-Loup A. Griffais
500k uNits * 65k max brightness range overflows in the conversion code. Scale back brightness range to 12bit max.
2023-11-07Revert "Galileo-only workaround for backlight settings"Pierre-Loup A. Griffais
This reverts commit f1f63fbd6a31efad6165f4b35b20ba65f25f877b.
2023-11-02Disable modes with >1200 MHz Pixel clocks when connected via dockSwapnil Patel
(cherry picked from commit 36301114e8a32e7f13985cbbeff7282d4c599aed)
2023-11-02drm/amd/display: Remove erroneous color_mgmt_changed check in ↵Joshua Ashton
amdgpu_dm_plane_set_color_properties Pure luck we didn't run into this before. Could be a newly allocated dc_plane_state. Signed-off-by: Joshua Ashton <joshua@froggi.es>
2023-11-02drm/amd/display: Duplicate color management plane blobs correctlyJoshua Ashton
This was done on the new copy rather the old one, so it was never actually duplicating any of this state. Signed-off-by: Joshua Ashton <joshua@froggi.es>
2023-11-02drm/amd/display: Debug logging for resumeJoshua Ashton
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2023-11-02drm/amd/display: Set color_mgmt_changed to true on unsuspendJoshua Ashton
Otherwise we can end up with a frame on unsuspend where color management is not applied when userspace has not committed themselves. Fixes re-applying color management on Steam Deck/Gamescope on S3 resume. Signed-off-by: Joshua Ashton <joshua@froggi.es>
2023-11-02wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too earlycnssbldsw
We are seeing below error randomly in one MSI case: kernel: ath11k_pci 0000:03:00.0: wmi command 16387 timeout The reason is, currently, in ath11k_pcic_ext_irq_enable(), ATH11K_FLAG_EXT_IRQ_ENABLED is set before NAPI is enabled, this results in a race condition: after ATH11K_FLAG_EXT_IRQ_ENABLED is set but before NAPI enabled, CE interrupt breaks in, in one MSI case, since IRQ is shared, ath11k_pcic_ext_interrupt_handler() is called where IRQ is disabled. Because NAPI is not enaled at that time, it is not scheduled, meaning ath11k_pcic_ext_grp_napi_poll() will not be called at last, so we have no chance to enable IRQ and finally get above error. Fix it by setting ATH11K_FLAG_EXT_IRQ_ENABLED after all NAPI and IRQ work are done. Signed-off-by: cnssbldsw <cnssbldsw@qualcomm.com>
2023-11-02drm/amd/display: Don't add common modes for eDP connectorSwapnil Patel
[Why] Currently, we are adding various common modes to drm_connector for DP and eDP connection even if they aren't part of EDID. This results in unsupported modes getting added to eDP connector. [How] Add common modes to drm_connector only for DP connection. Signed-off-by: Swapnil Patel <swapnil.patel@amd.com>
2023-11-02drm/amd/display: change default edp brightness check to min 1 nitKeith Mikoleit
2023-11-02Revert "mhi: host: wake up device in mhi_intvec_threaded_handler"Christian Marcheselli
This reverts commit 3bcc6695165be2fee1e2a2b0216b890348436ac3. Reverting debugging commits
2023-11-02Revert "mhi: host: assert wake DB only in valid PM state in ↵Christian Marcheselli
mhi_intvec_threaded_handler" This reverts commit 4cb8ca7274de547cfa8f3bb42e4a0164a91de952. Reverting debugging commits~
2023-11-02wifi: ath11k: Send 11d scan start before WMI_START_SCAN_CMDIDManikanta Pubbisetty
Firmwares advertising the support of triggering 11d algorithm on the scan results of a regular scan expects driver to send WMI_11D_SCAN_START_CMDID before sending WMI_START_SCAN_CMDID. Triggering 11d algorithm on the scan results of a normal scan helps in completely avoiding a separate 11d scan for determining regdomain. This indirectly helps in speeding up connections on station interfaces on the chipsets supporting 11D scan. To enable this feature, send WMI_11D_SCAN_START_CMDID just before sending WMI_START_SCAN_CMDID if the firmware advertises WMI_TLV_SERVICE_SUPPORT_11D_FOR_HOST_SCAN service flag. WCN6750 & WCN6855 supports this feature. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1 Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230315161817.29627-1-quic_mpubbise@quicinc.com
2023-11-02Revert "wifi: ath11k: force add set 55 for WMI_VDEV_PARAM_SET_HEMU_MODE as cld"Pierre-Loup A. Griffais
This reverts commit 047982b7295b07ed26fd877d5cdec203d018cb01.
2023-11-02drm/amd/display: Don't consider vblank passed if currently in vertical front ↵Joshua Ashton
porch time Changing refresh rates on OLED displays works differently to typical LCD panels in that instead of changing the clock, the vertical porch is extended significantly for lower rates. This can mean that the vertical porch can be incredibly large for non-base refresh rates eg. 60Hz on a 90Hz display. This isn't an issue for X11/typical compositors as their present slop is 1/2th of the refresh interval so the issue never manifests. However in Gamescope, the present slop very small and tuned to be optimal in real-time to try and reduce display latency significantly. This results in us queueing up the atomic commit inside the vertical porch region which, due to legacy X11/sync control reasons, means that AMDGPU must target the next vblank. This patch changes that behaviour to make FRR displays match what occurs on VRR/Freesync displays where the vertical porch time is not included in determining what vblank to target and solves the issue. This means that smarter compositors can get large input latency reductions when using OLED displays at lower than base refresh rates. For upstreaming this patch, it will need to be considered what the best solution is to enable this behaviour from the userspace side. Obviously the X11/legacy stuff probably cannot change here -- so we either need to enable this new behaviour globally for all DRM atomic clients (ie. basically Wayland compositors) or have a new DRM_MODE_ATOMIC flag. Signed-off-by: Joshua Ashton <joshua@froggi.es>
2023-11-02"ungate_before_suspend_gfx.patch"Pierre-Loup A. Griffais
2023-11-02"ring_commit.patch"Pierre-Loup A. Griffais
2023-11-02drm/amdgpu: remove duplicated CSIB command when system resumes from S3Pierre-Loup A. Griffais
The CSIB command pocket was sent to GFX block while amdgpu driver loading or S3 resuming time. PREAMBLE_CNTL packet coming in the ring after PG event where the RLC already sent its copy of CSIB, send another CSIB pocket will cause Gfx IB testing timeout when system resume from S3. And ME FW is jumping to the next Program Stream from the ring that is IB1. when the INDIRCET_BUFFER packet comes from the test PFP jumps to IB1, but ME was already in IB1 and jumps to IB2. So they are not aligned anymore. Driver change is only sending PREAMBLE_CNTL packet once at booting time. no need to send it during S3 resume. Error dmesg log: amdgpu 0000:04:00.0: [drm:amdgpu_ib_ring_tests [amdgpu]] *ERROR* IB test failed on gfx_0.0.0 (-110). [drm:amdgpu_device_delayed_init_work_handler [amdgpu]] *ERROR* ib ring test failed (-110). PM: resume of devices complete after 2373.995 msecs PM: Finishing wakeup. Signed-off-by: Perry Yuan <perry.yuan@amd.com>
2023-11-02drm/amdgpu: optimize RLC powerdown notification on VangoghPierre-Loup A. Griffais
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
2023-11-02anx7580: remove refresh rate interrupt handling and debug printsKeith Mikoleit
2023-11-02enable backlight control for galileoKeith Mikoleit
2023-11-02wifi: ath11k: fix double free of peer rx_tid during reo cmd failureHarshitha Prem
Peer rx_tid is locally copied thrice during peer_rx_tid_cleanup to send REO_CMD_UPDATE_RX_QUEUE followed by REO_CMD_FLUSH_CACHE to flush all aged REO descriptors from HW cache. When sending REO_CMD_FLUSH_CACHE fails, we do dma unmap of already mapped rx_tid->vaddr and free it. This is not checked during reo_cmd_list_cleanup() and dp_reo_cmd_free() before trying to free and unmap again. Fix this by setting rx_tid->vaddr NULL in rx tid delete and also wherever freeing it to check in reo_cmd_list_cleanup() and reo_cmd_free() before trying to free again. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230403182420.23375-2-quic_hprem@quicinc.com
2023-11-02wifi: ath11k: fix undefined behavior with __fls in dpHarshitha Prem
"__fls" would have an undefined behavior if the argument is passed as "0". Hence, added changes to handle the same. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com
2023-11-02wifi: ath11k: Fix invalid management rx frame length issueBhagavathi Perumal S
The WMI management rx event has multiple arrays of TLVs, however the common WMI TLV parser won't handle multiple TLV tags of same type. So the multiple array tags of WMI management rx TLV is parsed incorrectly and the length calculated becomes wrong when the target sends multiple array tags. Add separate TLV parser to handle multiple arrays for WMI management rx TLV. This fixes invalid length issue when the target sends multiple array tags. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Bhagavathi Perumal S <quic_bperumal@quicinc.com> Co-developed-by: Nagarajan Maran <quic_nmaran@quicinc.com> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230320133840.30162-1-quic_nmaran@quicinc.com
2023-11-02wifi: ath11k: BACKPORT: Trigger sta disconnect on hardware restartYoughandhar Chintala
Currently after the hardware restart triggered from the driver, the station interface connection remains intact, since a disconnect trigger is not sent to userspace. This can lead to a problem in targets where the wifi mac sequence is added by the firmware. After the target restart, its wifi mac sequence number gets reset to zero. Hence AP to which our device is connected will receive frames with a wifi mac sequence number jump to the past, thereby resulting in the AP dropping all these frames, until the frame arrives with a wifi mac sequence number which AP was expecting. To avoid such frame drops, its better to trigger a station disconnect upon target hardware restart which can be done with API ieee80211_reconfig_disconnect exposed to mac80211. The other targets are not affected by this change, since the hardware params flag is not set. Reported-by: kernel test robot <lkp@intel.com> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala <quic_youghand@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20221104085403.11025-1-quic_youghand@quicinc.com accepted upstream changes
2023-11-02wifi: ath11k: Fix firmware crash on vdev delete race conditionSowmiya Sree Elavalagan
Current code does not wait for vdev delete completion on vdev create failures and tries to send another vdev create followed by vdev set param to firmware with same vdev id. This causes firmware crash. Fix this crash by waiting for vdev delete completion on vdev create failures. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.6.0.1-00905-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20221011095346.3901-1-quic_ssreeela@quicinc.com
2023-11-02wifi: ath11k: Don't exit on wakeup failureBaochen Qiang
Currently, ath11k_pcic_read() returns an error if wakeup() fails, this makes firmware crash debug quite hard because we can get nothing. Change to go ahead on wakeup failure, in that case we still may get something valid to check. There should be no mislead due to incorrect content because we are aware of the failure with the log printed. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220928015140.5431-1-quic_bqiang@quicinc.com
2023-11-02wifi: ath11k: stop tx queues immediately upon firmware exitAditya Kumar Singh
Currently, recovery flag is set immediately upon firmware exit but tx queues are stopped once firmware arrives back and is ready which is during ath11k_core_restart. Once ieee80211 hw restart is completed, tx queues are resumed. If during the time delta between firmware exit and firmware ready, mac80211 send packets, currently ath11k will drop it since recovery flag will be set. But warning prints will come - "ath11k c000000.wifi: failed to transmit frame -108" If more tx packets are there, this could lead to flooding of above print. However, actually tx queues should be stopped immediately when firmware leaves. This will prevent packets to get dropped when firmware is recovering. Add fix to stop tx queues immediately after firmware exit. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220923170235.18873-1-quic_adisi@quicinc.com
2023-11-02mhi: host: assert wake DB only in valid PM state in mhi_intvec_threaded_handlerBaochen Qiang
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
2023-11-02mhi: host: wake up device in mhi_intvec_threaded_handlerBaochen Qiang
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
2023-11-02wifi: ath11k: change coex_isolation to true for QCA206XBaochen Qiang
don't know why it is false now, change it back to true.
2023-11-02wifi: ath11k: change to match new 6 GHz definition of WMI enumWen Gong
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
2023-11-02wifi: ath11k: send TPC power to firmware for 6 GHz stationWen Gong
When station is connected to a 6 GHz AP, it has 2 way to configure the power limit to firmware. The first way is to send 2 wmi command WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G to firmware, the second way is to send WMI_VDEV_SET_TPC_POWER_CMDID to firmware which include more parameters for power control. The first way is disabled in previous patch "ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHz". Prepare the parameter for wmi command WMI_VDEV_SET_TPC_POWER_CMDID and send the firmware after vdev start response success from firmware, it is for the second way of power control. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
2023-11-02wifi: ath11k: add handler for WMI_VDEV_SET_TPC_POWER_CMDIDWen Gong
Add the handler for WMI_VDEV_SET_TPC_POWER_CMDID, it is for 6 GHz band. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
2023-11-02wifi: ath11k: discard BSS_CHANGED_TXPOWER when EXT_TPC_REG_SUPPORT for 6 GHzWen Gong
When station is connected to a 6 GHz AP, it has 2 way to configure the power limit to firmware. The first way is to send 2 wmi command WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G to firmware, the second way is to send WMI_VDEV_SET_TPC_POWER_CMDID to firmware which include more parameters for power control. When firmware support SERVICE_EXT_TPC_REG, it means firmware support the second way for WMI_VDEV_SET_TPC_POWER_CMDID, then ath11k discard BSS_CHANGED_TXPOWER flag from mac80211 which is used to the first way for 6 GHz band in this patch and select the second way in the subsequent patch. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Wen Gong <quic_wgong@quicinc.com>