Age | Commit message (Collapse) | Author |
|
Coverity CIDs 1452970 1453305.
|
|
Errors will result in nice clean panic messages so we know what's wrong.
Reviewed by dhill visa natano jsg.
|
|
ok natano visa
|
|
to finish on close.
Tested and ok Patrick Keshishian
ok mpi
|
|
to deactivate our children.
ok mglocker@
|
|
|
|
With this we can get rid of the sc_mmap_cur variable to query the buffer
queue for a free slot.
Remove resetting of the V4L2_BUF_FLAG_MAPPED buffer flag while here. It's
enough when it gets set initially by uvideo_reqbufs().
Initial diff from Patrick Keshishian, thanks!
ok mpi
|
|
alternate interface endpoint instead statically on interface 0.
Fix duplicate DPRINTF output while there.
Initial diff from Patrick Keshishian, thanks!
|
|
store the alternate video interface number already.
From Patrick Keshishian, thanks!
|
|
From Patrick Keshishian, thanks!
|
|
memory to a local user. Found by Patrick Keshisian. Fix a potential
integer overflow issue in related code while I'm there.
ok mglocker@, deraadt@
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
a firmware.
Regression spotted by deraadt@
|
|
similar to config_defer(9).
ok mikeb@, deraadt@
|
|
<dev/usb/uvideo.h> to get USB video descriptor definitions.
from Ludovic Coues.
|
|
found the hard way by sebastia@ four years ago, and I'd been sitting on that
diff since.
The initial diff was more aggressive and would free the mmap queue upon error,
but jakemsr@ had objections against this behaviour; this diff only fails
gracefully instead of panic'ing.
|
|
return EINVAL in this case.
Also change an easily triggerable panic by a printf and return EINVAL.
Reminded by brad@, one typo spotted by sthen@ and ok mpi@
|
|
ok miod@
|
|
having to
modify various third party apps using the V4L2 API to build on OpenBSD specifically.
"I think this is the right thing to do" miod@
"Fine with me." sthen@
|
|
ok ratchov@, sthen@, mpi@
|
|
after discussions with beck deraadt kettenis.
|
|
|
|
Tested and okay mpi@.
|
|
ok mglocker@
|
|
ok mpi@
|
|
definitions instead. We don't change usb.h for now to stay compatible
with userland.
Tested by mpi@ on macppc and myself on i386.
ok mpi@
|
|
|
|
absolutely do not need to include vnode.h because it includes uvm_extern.h
and you want the idiotic TRUE FALSE defines from uvm.
|
|
from Gregor Best.
|
|
From Pedro Martelletto
|
|
sys/kthread.h, use sys/timeout.h explicitly. Noted by Michael
Knudsen.
ok deraadt@ kettenis@ guenther@
|
|
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
If one of the usb calls we did here failed we'd return immediately and
not free our buffer.
ok miod@
|
|
1) Allocating with M_WAITOK, checking for NULL, and calling panic() is
pointless (malloc() will panic if it can't allocate) so remove the check
and the call.
2) Allocating with M_WAITOK, checking for NULL, and then gracefully
handling failure to allocate is pointless. Instead also pass M_CANFAIL
so malloc() doesn't panic so we can actually handle it gracefully.
1) was done using Coccinelle.
Input from oga.
ok miod.
|
|
means the data size of a frame can be calculated if the dimensions
are known.
* calculate frame data sizes for uncompressed formats instead of believing
what the hardware says. the UVC spec changed between 1.0 and 1.1, and
as a result, some devices return bogus information.
* skip under-sized as well as over-sized uncompressed frames; there is
only one correct size for uncompressed frames.
* remove quirk to fix uncompressed frame sizes on certain devices,
since that now always happens.
* check that the device is actually using the parameters we think it's
using.
|
|
per frame to the default, so do that instead of returning EINVAL
|
|
previously, this was returning the wrong value (frame rate instead
of time per frame, d'oh!).
|
|
setting the frame rate with luvcview.
|
|
number
|
|
|
|
|
|
setting and and getting the frame interval.
|
|
|
|
frame descriptor's bFrameIndex field. the first valid frame
in the array is at index 0, not 1.
* don't change the format group's default frame when configuring
the device, and don't use the default frame as the current
frame: these are what the format group's 'frame_cur' is for.
tested by several as part of larger diff
|
|
equivilent. only define one structure, struct usb_video_frame_desc,
and handle both types of frame descriptors in the same code.
* replace hardcoded numbers with 'sizeof(struct usb_video_frame_desc)'
where the numbers represent the size of a frame descriptor
tested by several
|
|
index of the current frame to -1 when the mmap frame buffer is free'd
* set the index of the current frame to 0 when allocating the mmap
frame buffer
* paranoia: panic if a) the mmap frame buffer is already allocated when
we try to allocate it, or b) the mmap frame buffer is not allocated when
we try to add frames to it
tested by several
|
|
them from userland, and nothing in the kernel uses them.
ok krw@, miod@
|
|
interfaces as being claimed in the usbd_device's copy of the interface
descriptors
* allow ugen(4) to be attached if there are unused interfaces in a
configuration that has had drivers attached
* make ugen(4) aware that it may be sharing a device with (an)other
driver(s), and if so:
* do not let ugen(4) change the configuration
* do not let ugen(4) access the already claimed interfaces
discussed with deraadt and miod
|
|
- use UGETW/USETW instead of letoh16/htole16
fixes controls that use two-byte signed data (e.g. brighness and hue)
on sparc64
|
|
be run from the generic task kthread, because xfers that need to be
aborted block newly queued tasks from running (i.e. the xfer to be aborted
blocks the abort of that task). as there are now three types of usb
tasks, add an argument to usb_init_task() and another member to struct
usb_task to specify the task type.
fixes boot hangs that are showing up because we now use usb tasks to
attach/detach usb devices.
|