1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00
Commit Graph

91612 Commits

Author SHA1 Message Date
jsg
4a839efc44 drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp
From Zicheng Qu
020002c76147ecfdafe95c44abd3240e216b6316 in linux-6.6.y/6.6.64
2bc96c95070571c6c824e0d4c7783bee25a37876 in mainline linux
2024-12-10 02:41:59 +00:00
jsg
631ad31c18 drm/radeon: Fix spurious unplug event on radeon HDMI
From Steven 'Steve' Kendall
756f30dc27ae8c5ee4b87cd66e026cfe5421725f in linux-6.6.y/6.6.64
7037bb04265ef05c6ffad56d884b0df76f57b095 in mainline linux
2024-12-10 02:38:05 +00:00
jsg
33a3edb177 drm/radeon: change rdev->ddev to rdev_to_drm(rdev)
From Wu Hoi Pok
5e3a0f772d97a6d50163ad7694beec823c802d54 in linux-6.6.y/6.6.64
fb1b5e1dd53fc834e12f69749cbc8484382599c4 in mainline linux
2024-12-10 02:35:56 +00:00
jsg
21ee691064 drm/radeon: add helper rdev_to_drm(rdev)
From Wu Hoi Pok
28f6a86a2f6613967e947dd116b20d3e8d97e23c in linux-6.6.y/6.6.64
a6e23bec8ed184ed2a11080b28cdbd7a3024f0c0 in mainline linux
2024-12-10 02:31:55 +00:00
jsg
e6965b2641 drm/amdkfd: Fix wrong usage of INIT_WORK()
From Yuan Can
38e3d796f65438d58791e6e75181948a63299beb in linux-6.6.y/6.6.64
21cae8debc6a1d243f64fa82cd1b41cb612b5c61 in mainline linux
2024-12-10 02:28:44 +00:00
jsg
c9876c597d drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused
From Andy Shevchenko
2ee46de426cc9555e507afd0dc390a98e8947332 in linux-6.6.y/6.6.64
53bd7c1c0077db533472ae32799157758302ef48 in mainline linux
2024-12-10 02:26:38 +00:00
jsg
4c7926800d drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe
From Srinivasan Shanmugam
68f75e6f08aad66069a629db8d7840919156c761 in linux-6.6.y/6.6.64
8e4ed3cf1642df0c4456443d865cff61a9598aa8 in mainline linux
2024-12-10 02:23:43 +00:00
jsg
55710df9c0 drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute
From Wayne Lin
c7e65cab54a89f4df54110f0b44c4ade93d1a911 in linux-6.6.y/6.6.64
fcf6a49d79923a234844b8efe830a61f3f0584e4 in mainline linux
2024-12-10 02:21:31 +00:00
jsg
2afa3ebb4d drm/amd/display: Check null-initialized variables
From Alex Hung
c3a3b6d9a9383e3c1a4a08878ba5046e68647595 in linux-6.6.y/6.6.64
367cd9ceba1933b63bc1d87d967baf6d9fd241d2 in mainline linux
2024-12-10 02:18:57 +00:00
jsg
b4814eda15 drm/amd/display: Initialize denominators' default to 1
From Alex Hung
9f35cec5e4b9759b38c663d18eae4eaf30f36527 in linux-6.6.y/6.6.64
b995c0a6de6c74656a0c39cd57a0626351b13e3c in mainline linux
2024-12-10 02:15:48 +00:00
jsg
2e83af39b6 drm/amd/display: Add NULL check for function pointer in dcn32_set_output_transfer_func
From Srinivasan Shanmugam
f38b09ba6a335c511eb27920bb9bb4a1b2c20084 in linux-6.6.y/6.6.64
28574b08c70e56d34d6f6379326a860b96749051 in mainline linux
2024-12-10 02:13:13 +00:00
jsg
26f32bf0db drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match less strict
From Hans de Goede
82d0f099009e4446c87407c41abeae2a4ff0b6ad in linux-6.6.y/6.6.64
052ef642bd6c108a24f375f9ad174b97b425a50b in mainline linux
2024-12-10 02:10:59 +00:00
kirill
12880d00f8 sys/uvideo: skip uvideo_vs_set_alt for bulk endpoint
Section 2.4.3 of the UVC 1.5 class specification states that the bulk
endpoint only supports the alternative setting of zero, which is the
default stream, and which is switched at uvideo_attach_hook.

Inside uvideo_vs_close, the code uses the same switch to the alternative
setting of zero to turn off the cam LED.

The additional uvideo_vs_set_alt inside uvideo_vs_open turns off the cam
LED in the case of the bulk endpoint cam. I see this behavior on both
available bulk endpoint cams: it flashes the LED flashes after ffplay
starts, and looks like it was turned off.

OK mglocker@ kn@
2024-12-09 23:21:26 +00:00
patrick
eb49c7f084 Further alignment with ath12k, including addition of bank profiles,
removal of shadow timer, cookie configuration, updates to WMI and
start of updates for buffer handling.  This brings us forward:

qwz0: wcn7850 hw2.0 fw 0x100301e1 address xx:xx:xx:xx:xx:xx
qwz_dp_htt_htc_t2h_msg_handler: htt event 48 not handled
2024-12-09 09:35:33 +00:00
patrick
ca79b5ce33 Fix regdb firmware load. So far the code placed the board data as the
regdb, which the firmware did not like.  This adjusts the way we load
and cache FW, and places the right data for the chip.  This allows the
WLAN FW to boot up properly.
2024-12-09 04:46:11 +00:00
patrick
09a673e5e2 Minor cleanup of qwx(4) supported chips, some renaming. 2024-12-09 04:43:15 +00:00
patrick
7afc621a64 Implement two-level (indirect) Device Table support to increase the
range of DeviceIDs we can set up for translation.

Peripherals capable of doing DMA/MSIs are supposed to show up with
unique DeviceIDs.  The Device Table maps the DeviceID to a Interrupt
Translation Table.  So far we only used a single contiguous block for
the Device Table, but on some machines this does not cover the whole
range of physical devices.  Using the GIC's indirect mode allows to
move to a two-level setup to increase the range.

ok kettenis@
2024-12-07 21:12:22 +00:00
kettenis
18d3f3c5c3 MSIs don't work on the Qualcomm X1E machines in ACPI. So prevent
agintcmsi(4) from attaching in this case such that an upcoming change
to make it work (with DTB) on this hardware doesn't break the initial
install.

ok patrick@
2024-12-07 20:48:32 +00:00
kirill
33d389b584 sys/uvideo: add missed usbd_get_xfer_status
Without usbd_get_xfer_status the code is built on the assumption that
usbd_transfer always reads dwMaxPayloadTransferSize bytes from a device.
If this assumption doesn't hold, it produces broken frames which has
unexpected zeros.

OK mglocker@ kn@
2024-12-07 17:23:27 +00:00
yasuoka
f02897e8bf Embed scope-id when sending NA. Also, do it when the link state is up
because the routing entry to the mutlicast address is not ready yet
when the carp becomes master.

ok florian
2024-12-07 01:14:45 +00:00
kettenis
47e192534f Query hardware for the button state such that we can detect the release
even if we miss the press event.  Change the driver such that wakeup is
signalled when the button is pressed such that it matches what happens
when wakeup is handled by the PMIC.

ok patrick@
2024-12-05 21:35:39 +00:00
claudio
3edd791eb4 cursig() can return a normally ignored signal if the process is ptraced.
So make sure that sleep_signal_check() returns ERESTART in that case so
that the syscall is retried once ptrace intercepted the signal.

This should fix unexpected EINTR returns of waitpid for precesses that
left SIGCHLD ignored (default). Not the perfect fix but a good enough
bandaid to allow people to debug processes doing forks and waitpid calls.

Problem reported and fix tested by stsp@
OK kettenis@ stsp@
2024-12-05 14:53:55 +00:00
stsp
fa26180998 add missing vlan.h header to ice(4) and fix build; spotted by jsg@
tested with vlan(4) on top of ice(4) between openbsd and freebsd
ok jsg@
2024-12-05 09:55:50 +00:00
mvs
dac6e0759a Push locking down to udp_sysctl().
No locks required for per-CPU counters based protocol statistics.
Atomically accessed `udpctl_vars' variables are already moved from the
net lock, sysctl(2) related locks are useless for them.

Complicated UDPCTL_BADDYNAMIC and UDPCTL_ROOTONLY cases were left as is.

ok bluhm
2024-12-04 22:48:41 +00:00
mvs
854a7367f7 Push locking down to icmp_sysctl().
Keep locking only for ICMPCTL_REDIRTIMEOUT case. It is complicated, so
left it as is.

ICMPCTL_STATS loads per-CPU counters into local data, so no locking
required.

`icmpctl_vars' are atomically accessed integers. Except `icmperrppslim'
they are simply booleans, so nothing special required. Used the local
`icmperrppslim_local' variable to load `icmperrppslim' value because it
it could have negative values. claudio@ proposed to always load such
values to local variables, so I want to try this notation.

ok bluhm
2024-12-04 22:24:11 +00:00
mvs
b9b60940b5 Unlock gre_sysctl().
Both `gre_allow' and `gre_wccp' are atomically accessed integers. They
could have only '0' and '1' values, so no extra dances around
atomic_load_int(9) required.

ok bluhm
2024-12-04 18:20:46 +00:00
mpi
8ce4994e23 Disallow enabling the same probe multiple times.
From Christian Ludwig.
2024-12-04 09:37:33 +00:00
mpi
07c549d831 Document that the original page during a CoW can be unlocked earlier.
ok tb@
2024-12-04 09:21:06 +00:00
mpi
335383c917 Pass the rw_enter(9) type to amap_lock() in preparation for using shared locks.
ok tb@
2024-12-04 09:19:11 +00:00
sf
ff0ccef3c1 vio: Unlock, switch to qstart function
Run without kernel lock. Use the network stack functions used for
multiqueue, but still only run on one queue.

Add a virtio interface for an interrupt barrier.

This is the reverted diff plus a missing chunk.
Tested by dtucker, bluhm, sf
2024-12-03 19:14:40 +00:00
claudio
7aa5115960 Remove the FUSE hack in ufs_ihashget() it is no longer needed.
FUSE switched away from the horrible ufs inode abuse and so this is
no longer reached.
OK millert@ tb@ miod@
2024-12-03 14:41:45 +00:00
claudio
4cbd027d54 Revert the new rwlock implementation for now.
vfs_busy() uses RW_SLEEPFAIL in a broken way. It is possible that the
object holding the rwlock is freed while other processes are sleeping
on this lock. This worked before by luck and no longer does now since
part of the struct needs to be updated after the sleep.
vfs_busy() needs to be fixed but that will take a bit of time.
OK dlg@
2024-12-03 12:50:16 +00:00
mpi
b16b5f313d Add missing wakeup & cleanup in error path.
ok tb@
2024-12-03 07:54:20 +00:00
mpi
897b17096a Use uvm_pagewait() rather than re-rolling it.
ok miod@, tb@
2024-12-03 07:51:21 +00:00
mglocker
7f98e85f65 Fix typo in comment 2024-12-01 10:38:47 +00:00
landry
8e650cf52b upd(4): add PercentLoad sensor
Reports the % of the available UPS power drawed by output outlets.

tested by sthen@, matthieu@ and Walter Alejandro Iglesias
ok sthen@ as part of a larger diff
2024-12-01 09:05:05 +00:00
kirill
d223718e27 sys/uvideo: add quirk for Jabra PanaCast 20
Jabra PanaCast 20 needs uvideo_vs_negotiation between usbd_set_interface
and usbd_open_pipe, otherwise it doesn't work with error:

    ioctl VIDIOC_DQBUF: Invalid argument

OK mglocker@
2024-11-30 17:47:23 +00:00
kirill
9497c2578f Regen 2024-11-30 17:43:46 +00:00
kirill
94ba045ddc sys/dev/usb/usbdevs: add Jabra PanaCast 20, to be used in quirks
OK mglocker@
2024-11-30 17:41:57 +00:00
mpi
5797ad0691 Also call pmap_extract() before entering a page ahead for lower layer faults.
As for the upper layer, call pmap_update() only if, at least, a page has been
entered.

ok tb@, kettenis@
2024-11-29 06:44:57 +00:00
mpi
a52f395c21 When paging ahead, delay calling pmap_extract() after checking for a valid page.
While here call pmap_update() only if, at least, a page has been entered.

ok tb@, kettenis@
2024-11-29 06:40:57 +00:00
gkoehler
d9a6171acb Move cpu_features to hwcap and cpu_features2 to hwcap2
ok jca@
2024-11-28 18:54:36 +00:00
aoyama
db835d3241 Replace magic numbers to macro defined values.
Also make it possible to change the amount of 3-port RAM usage by the
kernel option.
2024-11-28 13:13:03 +00:00
dlg
41517b19ad avoid lock contention in __thrsleep and __thrwakeup syscalls
turns out the __thrsleep and __thrwakeup syscalls largely coordinate
using a single lock per process. if you have heavily threaded code
building locks in userland out of thrsleep, this kernel lock gets
hammered. this is true even if userland thinks it's operating on
separate locks, it all ends up serialised in the kernel. this reduces
the throughput of these heavily threaded programs.

the big change is hashing thrsleep waiters into an different
locks/lists based on their "id" to try and avoid all locks in a
process contending on a single lock. the hash is shared by all
processes though.

the change also avoids having a waiter re-take the lock to avoid
contention on the thrwakeup code which is currently holding the lock.

__thrsleep and __thrwakeup seem to be largely unused these days,
except by go. go still uses it as a backend to it's locks, and also
creates a lot of threads which end up contending on the lock. these
changes provide an improvement for go programs.

the contention was pointed out by nick owens
jsing@ and nick owens did a bit of testing
2024-11-28 02:01:57 +00:00
gkoehler
14cbb2b5d8 In powerpc64 pmap, when replacing a pte, put it in the correct pteg
In pte_insert(), if both the primary page table entry group and the
secondary pteg are full, then we delete an old pte and replace it with
the new pte.  We might have set "idx" wrong and inserted the new pte
into the wrong pteg (with the wrong PTE_HID bit).  This problem almost
never happened; it is rare for both ptegs to be full.

When the loop "for (try = 0; try < 16; try++)" looks for a slot for
the new pte, set "idx" to the new pte's primary pteg.  Put it in the
primary pteg "idx" or secondary pteg "idx ^ pmap_ptab_mask".  When we
delete the old pte, set "idx" to the old pte's primary pteg.

Eric Gosse reported a bug where the kernel crashed on an unexpected
fault.  I suspect that a pte fell into the wrong "idx" and got lost.

ok kettenis@
2024-11-27 20:30:15 +00:00
miod
0cd9f93052 Change getfp() to return an unBIASed stack pointer; this unbreaks
stackdump() which got broken in machdep.c 1.202.

It is much simpler to change getfp() than stackdump() which is its only
caller.
2024-11-27 20:11:32 +00:00
stsp
21cb8457bb defer creation of ice(4) ifp until device attachment has succeeded
Otherwise we would crash when something goes wrong in ice_attach_hook().

problem found by bluhm@
2024-11-27 15:23:58 +00:00
jan
5e0634cbc7 Revert "vio: Unlock"
This causes some crashes. Revert for now

ok sf@
2024-11-27 13:26:42 +00:00
jsg
4fda2ec572 remove unneeded fpu.h include to unbreak the build on archs without it
already indirectly included by reg.h on amd64
ok sthen@
2024-11-27 12:29:14 +00:00
kirill
e4c405f0a8 sys/uvideo: add missed abort of transfer pipe in uvideo_vs_close
A bulk transfer cannot timeout and must be aborted on close.

OK mpi@
2024-11-27 11:37:23 +00:00