delays in sensors thread

2020-12-10 Thread Marcus Glocker
Hi All, I recently started to play around with uvideo(4) and uaudio(4) on my amd64 iMacs. There I quickly noticed regular freezes when streaming USB video or audio. On some of those machines it was very frequent, like every few seconds the video or audio stream did freeze for ~1s, then resume, w

Re: delays in sensors thread

2020-12-11 Thread Marcus Glocker
On Thu, Dec 10, 2020 at 06:06:26PM -0300, Martin Pieuchot wrote: > On 10/12/20(Thu) 21:40, Alexandre Ratchov wrote: > > On Thu, Dec 10, 2020 at 05:27:16PM +0100, Marcus Glocker wrote: > > > Hi All, > > > > > > I recently started to play around with uvideo(4) a

Re: delays in sensors thread

2020-12-11 Thread Marcus Glocker
On Fri, Dec 11, 2020 at 10:01:35AM +0100, Alexandre Ratchov wrote: > On Fri, Dec 11, 2020 at 09:07:45AM +0100, Marcus Glocker wrote: > > > > After doing some deeper analyzes in to asmc_wait() I agree to that. > > Something seems to go fundamental wrong there.

kern.video.record - part 2

2020-12-16 Thread Marcus Glocker
Hi, In September Laurence Tratt came up with a diff to implement an kern.video.record switch for sysctl(8). The implementation was only for uvideo(4), and hence we wanted to lift that up to the video(4) level, but we were not able to get a good implementation together back then. I reviewed this

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-22 Thread Marcus Glocker
> > Did you consider incrementing xx->ntrb instead? >That doesn't work either, because the status completion code needs >xx->ntrb to be correct for the data TD to be handled correctly. >Incrementing xx->ntrb means the number of TRBs for the data TD is >incorrect, since it includes the (optional) z

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Tue, 22 Dec 2020 20:55:41 +0100 Marcus Glocker wrote: > > > Did you consider incrementing xx->ntrb instead? > > >That doesn't work either, because the status completion code needs > >xx->ntrb to be correct for the data TD to be handled correctly. > &

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Wed, 23 Dec 2020 09:47:44 +0100 Marcus Glocker wrote: > On Tue, 22 Dec 2020 20:55:41 +0100 > Marcus Glocker wrote: > > > > > Did you consider incrementing xx->ntrb instead? > > > > >That doesn't work either, because the status completion co

Re: xhci zero length transfers 'leak' one transfer buffer count

2020-12-23 Thread Marcus Glocker
On Wed, 23 Dec 2020 17:35:36 +0100 Patrick Wildt wrote: > Am Wed, Dec 23, 2020 at 10:44:21AM +0100 schrieb Marcus Glocker: > > On Wed, 23 Dec 2020 09:47:44 +0100 > > Marcus Glocker wrote: > > > > > On Tue, 22 Dec 2020 20:55:41 +0100 > > > Marcus Glock

Re: kern.video.record - part 2

2020-12-25 Thread Marcus Glocker
rmissions to /dev/video*. By that we require initial root access to enable video recording, but can then permit non-root accounts for video access. On Wed, 16 Dec 2020 15:57:20 + Laurence Tratt wrote: > On Wed, Dec 16, 2020 at 03:50:54PM +0100, Marcus Glocker wrote: > > He

kern.video.record man page updates

2020-12-28 Thread Marcus Glocker
Since I'm receiving various private queries about documenting the new kern.video.record sysctl(2) variable, I send the diff I've created already for the man page updates here. OK? (I'm happy if others want to do improvements afterwards in-tree) Index: share/man/man4/video.4

Re: kern.video.record man page updates

2020-12-29 Thread Marcus Glocker
On Tue, 29 Dec 2020 14:40:09 +0100 Sebastian Benoit wrote: > ok. > > maybe add a line to current.html so that people are not surprised > that their video is no longer working after upgrade. Looks like sthen@ was already there :-) > /Benno > > > Marcus Glocker(mar...@

/dev/video* permissions

2020-12-29 Thread Marcus Glocker
Now that we have a switch in place with kern.video.record which requires initial root access to enable video recording, I want propose the idea of making the /dev/video* devices accessible to users who are a member of the 'video' group: lrwxr-xr-x 1 root wheel 6 Dec 29 12:38 vide

Re: /dev/video* permissions

2020-12-29 Thread Marcus Glocker
On Tue, Dec 29, 2020 at 11:09:44PM +0100, Mark Kettenis wrote: > > Date: Tue, 29 Dec 2020 15:24:58 +0100 > > From: Marcus Glocker > > > > Now that we have a switch in place with kern.video.record which requires > > initial root access to enable video recording,

Re: video(4) multiple opens

2021-01-06 Thread Marcus Glocker
On Tue, Jan 05, 2021 at 11:54:31PM +0100, Jeremie Courreges-Anglas wrote: > > I hit a weird failure with firefox and BigBlueButton > (https://bigbluebutton.org/) where firefox can't use my webcam. > video(1) works, same for other webrtc sites in firefox, eg meet.jit.si. > ktrace shows that a sing

Re: New ujoy(4) device for USB gamecontrollers

2021-01-06 Thread Marcus Glocker
On Mon, Dec 28, 2020 at 05:03:14PM -0700, Thomas Frohwein wrote: > Hi, > > This is a diff to propose a new device type for USB gamecontrollers, > 'ujoy'. > > Rationale > - > > Since the tightening of security around USB devices, USB > gamecontrollers that generally attach to the kitchen

Re: New ujoy(4) device for USB gamecontrollers

2021-01-07 Thread Marcus Glocker
On Thu, 7 Jan 2021 10:20:34 -0700 Thomas Frohwein wrote: > On Wed, Jan 06, 2021 at 10:48:58PM +0100, Marcus Glocker wrote: > > [...] > > > The implementation as such looks fine to me. > > But I quickly gave the diff a spin before on amd64 using my PS > > controll

Re: New ujoy(4) device for USB gamecontrollers

2021-01-09 Thread Marcus Glocker
On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > I have heard from others who tried the diff that the PS4 controller is > > causing problems with the way it attaches. I ordered one to trial-and- > > error this myself at home. Could you share output of lsusb -

hid_is_collection() sync with NetBSD

2021-01-09 Thread Marcus Glocker
I have not much clue about HID, but when we did some testing for the new ujoy(4) driver it turned out that the PS4 controller doesn't get handled correctly by hid.c:hid_is_collection(). This made me peek in to the NetBSD code where I could find an update in this function. Syncing it up makes the

Re: [PATCH] Reduce case duplication in kern_sysctl

2021-01-09 Thread Marcus Glocker
On Sat, 09 Jan 2021 13:06:36 -0800 Greg Steuck wrote: > Thanks Todd for reviewing these boring patches! > > Todd C. Miller writes: > > > Updated diff looks good to me. OK millert@ but it would be good > > to get feedback from Marcus too. > > Sure thing, I'll wait till tomorrow then? > > T

Re: [PATCH] Reduce case duplication in kern_sysctl

2021-01-09 Thread Marcus Glocker
On Sat, 9 Jan 2021 22:09:06 +0100 Marcus Glocker wrote: > On Sat, 09 Jan 2021 13:06:36 -0800 > Greg Steuck wrote: > > > Thanks Todd for reviewing these boring patches! > > > > Todd C. Miller writes: > > > > > Updated diff looks good to me. OK

Re: hid_is_collection() sync with NetBSD

2021-01-09 Thread Marcus Glocker
On Sat, 9 Jan 2021 21:51:03 +0100 (CET) Mark Kettenis wrote: > > Date: Sat, 9 Jan 2021 10:38:20 +0100 > > From: Marcus Glocker > > > > I have not much clue about HID, but when we did some testing for the > > new ujoy(4) driver it turned out that the PS4 cont

Re: [PATCH] Reduce case duplication in kern_sysctl

2021-01-10 Thread Marcus Glocker
On Sat, 09 Jan 2021 14:39:53 -0800 Greg Steuck wrote: > Thanks for the reviews! > > Marcus Glocker writes: > > > On Sat, 9 Jan 2021 22:09:06 +0100 > > Marcus Glocker wrote: > > If you could fix the switch() indentation in a separate commit (as > >

Re: hid_is_collection() sync with NetBSD

2021-01-11 Thread Marcus Glocker
On Sun, 10 Jan 2021 00:04:21 +0100 Marcus Glocker wrote: > On Sat, 9 Jan 2021 21:51:03 +0100 (CET) > Mark Kettenis wrote: > > > > Date: Sat, 9 Jan 2021 10:38:20 +0100 > > > From: Marcus Glocker > > > > > > I have not much clue about HID, but when

ugen(4) and uhidev(4) data toggle problem

2021-01-15 Thread Marcus Glocker
There are a few threads going on related to problems with ugen(4) and uhidev(4) devices on xhci(4). This is related to the issue patrick@ already explained; while ehci(4) can save the last data toggle state, xhci(4) resets it on every open/close cycle, getting out of sync with the device. This di

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Marcus Glocker
On Fri, 15 Jan 2021 06:23:01 -0700 Thomas Frohwein wrote: > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > > > > > I have heard from others who tried the diff that the PS4 &g

Re: New ujoy(4) device for USB gamecontrollers

2021-01-15 Thread Marcus Glocker
On Fri, 15 Jan 2021 11:37:47 -0500 Bryan Steele wrote: > On Fri, Jan 15, 2021 at 06:23:01AM -0700, Thomas Frohwein wrote: > > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > > > On Thu, Jan 07, 2021 at 08:20:35PM +0100, Marcus Glocker wrote: > > >

Re: ugen(4) and uhidev(4) data toggle problem

2021-01-17 Thread Marcus Glocker
Thanks for testing this Greg. On Sat, 16 Jan 2021 16:10:26 -0800 Greg Steuck wrote: > Hi Marcus, > > Marcus Glocker writes: > > > There are a few threads going on related to problems with ugen(4) > > and uhidev(4) devices on xhci(4). This is related to the is

Re: ims: claim to be a touchpad

2021-01-21 Thread Marcus Glocker
On Wed, 20 Jan 2021 21:42:21 -0600 joshua stein wrote: > There are no i2c-connected mice and ims(4) will always be a > touchpad/touchscreen/stylus that just doesn't meet the requirements > of imt(4). > > Presenting it as WSMOUSE_TYPE_TOUCHPAD makes the X server set it up > as a separate point

Re: New ujoy(4) device for USB gamecontrollers

2021-01-22 Thread Marcus Glocker
On Fri, 15 Jan 2021 22:41:13 +0100 Marcus Glocker wrote: > On Fri, 15 Jan 2021 11:37:47 -0500 > Bryan Steele wrote: > > > On Fri, Jan 15, 2021 at 06:23:01AM -0700, Thomas Frohwein wrote: > > > On Sat, Jan 09, 2021 at 10:16:16AM +0100, Marcus Glocker wrote: > &

Re: New ujoy(4) device for USB gamecontrollers

2021-01-22 Thread Marcus Glocker
On Fri, Jan 22, 2021 at 01:52:24PM -0700, Thomas Frohwein wrote: > On Fri, Jan 22, 2021 at 02:26:31PM -0500, Bryan Steele wrote: > > On Fri, Jan 22, 2021 at 07:00:57PM +0100, Marcus Glocker wrote: > > [...] > > > > > > Considering the hid_is_collect

Re: search usbd_interfaces in case of non-compliant device

2021-01-26 Thread Marcus Glocker
On Tue, Jan 26, 2021 at 08:56:29PM +, Edd Barrett wrote: > Hi, > > I've recently come across a uaudio device which doesn't work in OpenBSD: > > uaudio2 at uhub0 port 1 configuration 1 interface 3 "E+ Corp. DAC Audio" rev > 1.10/0.01 addr 2 > uaudio2: class v1, full-speed, async, channels: 2

Re: search usbd_interfaces in case of non-compliant device

2021-01-28 Thread Marcus Glocker
On Thu, Jan 28, 2021 at 02:38:04PM +, Edd Barrett wrote: > On Thu, Jan 28, 2021 at 09:56:14AM +, Edd Barrett wrote: > > > > Here's a revised diff that always searches the array, instead of first > trying the expected index. Everyone agreed that this makes for simpler > code, and that sinc

Re: uhidpp(4): logitech hid++ device driver

2021-02-02 Thread Marcus Glocker
On Tue, Feb 02, 2021 at 08:23:29AM +0100, Anton Lindqvist wrote: > On Sat, Jan 30, 2021 at 01:18:07PM +0200, Ville Valkonen wrote: > > On Sat, 2021-01-30 at 08:36 +0100, Anton Lindqvist wrote: > > > On Fri, Jan 29, 2021 at 10:15:05PM +0200, Ville Valkonen wrote: > > > > Hi, > > > > > > > > I have

Re: uhidpp(4): logitech hid++ device driver

2021-02-02 Thread Marcus Glocker
On Tue, Feb 02, 2021 at 07:55:17PM +0100, Anton Lindqvist wrote: [...] > > > However, it would ease development by getting this in and continue > > > development in tree. Anyone willing to ok? > > > > The reason why I'm currently reluctant to ok this is because of the > > uhidev_set_intr() part w

Re: Use correct config descriptor in ugen_set_config

2021-02-03 Thread Marcus Glocker
On Sun, Jan 31, 2021 at 07:05:29PM +0100, Thomas Jeunet wrote: > Hello tech, > > in ugen_set_config, the cached config descriptor (ugen.c:213) is > obsolete after the call to usbd_set_config_no (ugen.c:220). Use a > refreshed value so the next loop account for the correct number of > interfaces.

Re: usbhidctl: efault

2021-02-03 Thread Marcus Glocker
On Fri, Jan 29, 2021 at 08:16:27AM +0100, Anton Lindqvist wrote: > Hi, > While running usbhidctl on my USB mouse it occasionally fails as > follows: > > # usbhidctl -f /dev/wsmouse2 > usbhidctl: USB_GET_REPORT (probably not supported by device): Bad > address > > The EFAULT happens

Re: Use correct config descriptor in ugen_set_config

2021-02-04 Thread Marcus Glocker
On Thu, Feb 04, 2021 at 10:28:42PM +0100, Thomas Jeunet wrote: > On Wed, Feb 03, 2021 at 08:30:42PM +0100, Marcus Glocker wrote: > > On Sun, Jan 31, 2021 at 07:05:29PM +0100, Thomas Jeunet wrote: > > > > > Hello tech, > > > > > > in ugen_set_config, th

video(4) multiple opens

2021-02-09 Thread Marcus Glocker
jca@ has recently committed a change to video(4) to allow the same process to do multiple opens on the same video device to satisfy certain applications, and start to go in to the V4L2 "1.1.4 Multiple Opens" specification direction as described here: https://www.kernel.org/doc/html/v5.10/userspace

apu2e4

2021-02-11 Thread Marcus Glocker
Is there anyone out there using an apu2e4? I just received an APU2E4 / GX-412TC 4GB https://www.pcengines.ch/apu2e4.htm I can't boot any recent kernel on it, not through USB nor through PXEBOOT. I tried amd64/i386, snapshot, 6.8, 6.6, and all cause the apu to reboot after the entry point messag

Re: apu2e4

2021-02-11 Thread Marcus Glocker
My boot.conf was renamed to boot.conf.off in the PXE server. Idiot. Thanks tb@ for the hint :-) Sorry for the noise. On Thu, Feb 11, 2021 at 04:07:02PM +0100, Marcus Glocker wrote: > Is there anyone out there using an apu2e4? > > I just received an APU2E4 / GX-412TC 4GB &

Re: video(4) multiple opens

2021-02-13 Thread Marcus Glocker
On Sat, Feb 13, 2021 at 08:30:04AM +0100, Claudio Jeker wrote: > On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Anglas wrote: > > On Wed, Feb 10 2021, Martin Pieuchot wrote: > > > > [...] > > > > > Which fields is the new lock protecting? Why isn't the KERNEL_LOCK() > > > enough?

Re: video(4) multiple opens

2021-02-13 Thread Marcus Glocker
On Sat, Feb 13, 2021 at 10:45:17AM +0100, Claudio Jeker wrote: > On Sat, Feb 13, 2021 at 10:26:48AM +0100, Marcus Glocker wrote: > > On Sat, Feb 13, 2021 at 08:30:04AM +0100, Claudio Jeker wrote: > > > > > On Fri, Feb 12, 2021 at 10:59:05PM +0100, Jeremie Courreges-Angl

Back-out USB data toggle fix

2021-02-14 Thread Marcus Glocker
Unfortunately I'm seeing more and more USB device breakages reported the last few days related to the USB data toggle fix which we did commit 2-3 weeks ago. Since I can't reproduce the issue here with my USB gear, it's very difficult for me to pin point the issue. Therefore I think we should back

Re: Back-out USB data toggle fix

2021-02-14 Thread Marcus Glocker
On Sun, Feb 14, 2021 at 04:43:17PM +, Stuart Henderson wrote: > On 2021/02/14 15:22, Marcus Glocker wrote: > > Unfortunately I'm seeing more and more USB device breakages reported > > the last few days related to the USB data toggle fix which we did > > commit 2-3 we

Re: Back-out USB data toggle fix

2021-02-15 Thread Marcus Glocker
On Sun, Feb 14, 2021 at 03:34:11PM +, Mikolaj Kucharski wrote: > On Sun, Feb 14, 2021 at 03:22:28PM +0100, Marcus Glocker wrote: > > Unfortunately I'm seeing more and more USB device breakages reported > > the last few days related to the USB data toggle fix which we did

Add /dev/video0 to fbtab

2021-02-25 Thread Marcus Glocker
We had this discussion recently when fbtab(5) for xenodm(1) was fixed 6 weeks ago, but we didn't come to an agreement yet. tb@ asked me the same question yesterday whether we can add video(1) to fbtab to avoid manual chown of /dev/video0, which I think a lot of people do today. Therefore here anot

Re: Add /dev/video0 to fbtab

2021-02-25 Thread Marcus Glocker
On Thu, Feb 25, 2021 at 09:34:45PM +0100, Mark Kettenis wrote: > > Date: Thu, 25 Feb 2021 20:10:00 +0100 > > From: Marcus Glocker > > > > We had this discussion recently when fbtab(5) for xenodm(1) was fixed > > 6 weeks ago, but we didn't come to an agreem

Re: Add /dev/video0 to fbtab

2021-02-25 Thread Marcus Glocker
On Thu, Feb 25, 2021 at 08:00:32PM +, Stuart Henderson wrote: > On 2021/02/25 20:10, Marcus Glocker wrote: > > We had this discussion recently when fbtab(5) for xenodm(1) was fixed > > 6 weeks ago, but we didn't come to an agreement yet. tb@ asked me the > > same

Re: Add /dev/video0 to fbtab

2021-02-25 Thread Marcus Glocker
On Thu, Feb 25, 2021 at 09:14:06PM +, Stuart Henderson wrote: > On 2021/02/25 22:02, Marcus Glocker wrote: > > On Thu, Feb 25, 2021 at 08:00:32PM +, Stuart Henderson wrote: > > > > > On 2021/02/25 20:10, Marcus Glocker wrote: > > > > We had this d

Re: Add /dev/video0 to fbtab

2021-02-26 Thread Marcus Glocker
On Thu, Feb 25, 2021 at 10:36:02PM +0100, Marcus Glocker wrote: > On Thu, Feb 25, 2021 at 09:14:06PM +, Stuart Henderson wrote: > > > On 2021/02/25 22:02, Marcus Glocker wrote: > > > On Thu, Feb 25, 2021 at 08:00:32PM +, Stuart Henderson wrote: > > > >

uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-03-15 Thread Marcus Glocker
martijn@ has recently reported that in his machine he has two cams of which one is doing IR, which isn't really supported by uvideo(4). This IR device attaches always first as uvideo0, so he needs to swap that regularly with his working cam which by default attaches to uvideo1. I came up with a ne

sdmmc(4) off-by-one on boundary check

2021-03-23 Thread Marcus Glocker
I recently got a Raspberry Pi 3 Model B Plus (Rev 1.3). After installing current the first thing during boot which I get is: ... starting network reordering libraries: done. starting early daemons: syslogd pflogd ntpd. starting RPC daemons:. savecore: no core dump bcmsdhost0: transfer timeout! Bu

Re: sdmmc(4) off-by-one on boundary check

2021-03-23 Thread Marcus Glocker
On Tue, Mar 23, 2021 at 08:29:06AM -0600, Theo de Raadt wrote: > Marcus Glocker wrote: > > > Index: sys/dev/sdmmc/sdmmc_scsi.c > > === > > RCS file: /cvs/src/sys/dev/sdmmc/sdmmc_scsi.c,v > > retrievin

Re: sdmmc(4) off-by-one on boundary check

2021-03-24 Thread Marcus Glocker
On Tue, Mar 23, 2021 at 09:52:42AM -0600, Theo de Raadt wrote: > Mark Kettenis wrote: > > > > > Index: sys/dev/sdmmc/sdmmc_scsi.c > > > > === > > > > RCS file: /cvs/src/sys/dev/sdmmc/sdmmc_scsi.c,v > > > > retrieving revision 1.59 >

Re: sdmmc(4) off-by-one on boundary check

2021-03-24 Thread Marcus Glocker
On Wed, Mar 24, 2021 at 02:05:27PM -0600, Theo de Raadt wrote: > Marcus Glocker wrote: > > > On Tue, Mar 23, 2021 at 09:52:42AM -0600, Theo de Raadt wrote: > > > > > Mark Kettenis wrote: > > > > >

Re: sdmmc(4) off-by-one on boundary check

2021-03-25 Thread Marcus Glocker
On Wed, Mar 24, 2021 at 09:23:22PM +0100, Mark Kettenis wrote: > > Date: Wed, 24 Mar 2021 20:58:48 +0100 > > From: Marcus Glocker > > > > On Tue, Mar 23, 2021 at 09:52:42AM -0600, Theo de Raadt wrote: > > > > > Mark Kettenis wrote: > > >

Re: uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-04-04 Thread Marcus Glocker
e it does help me out :-) > > martijn@ > > On Mon, 2021-03-15 at 08:35 +0100, Marcus Glocker wrote: > > martijn@ has recently reported that in his machine he has two cams > > of which one is doing IR, which isn't really supported by uvideo(4). > > This IR device attach

Re: Add /dev/video0 to fbtab

2021-04-04 Thread Marcus Glocker
Thanks for your feedback Matthias. Unfortunately there wasn't too much acceptance for this diff from the community, so it's unlikely that it will make it in to the tree. Cheers, Marcus On Sat, 3 Apr 2021 10:25:58 +0200 Matthias Schmidt wrote: > Hi, > > * Marcus Glocker wro

Re: uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-04-05 Thread Marcus Glocker
On Mon, Apr 05, 2021 at 07:30:43AM -0700, Greg Steuck wrote: > OK gnezdo with a usability question inline. Thanks. See below. > Marcus Glocker writes: > > > martijn@ has recently reported that in his machine he has two cams > > of which one is doing IR, which isn&

Re: uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-04-05 Thread Marcus Glocker
On Mon, Apr 05, 2021 at 11:27:10PM +0200, Mark Kettenis wrote: [...] > > > > How common is it to explain the system behavior in cases like this? > > > > Would it be less surprising (generate less misc@ traffic) if we printed > > > > a note explaining why the camera was skipped? > > > > > > I wou

bcm2835_mbox.c

2022-08-27 Thread Marcus Glocker
Left over from NetBSD code? Index: sys/dev/fdt/bcm2835_mbox.c === RCS file: /cvs/src/sys/dev/fdt/bcm2835_mbox.c,v retrieving revision 1.3 diff -u -p -u -p -r1.3 bcm2835_mbox.c --- sys/dev/fdt/bcm2835_mbox.c 6 Apr 2022 18:59:28 -

Continuous USB transfers

2022-08-29 Thread Marcus Glocker
xhci(4) and ehci(4) are scheduling continuous isoc transfers. For that we have implemented a kind of workaround, which checks whether usbd_start_next() is calling in between and try to start an transfer which is still in progress. NetBSD has introduced a variable called 'serialise' for the pipe,

Re: dwctwo(4) periodic transfers improvement

2022-09-03 Thread Marcus Glocker
On Tue, Aug 30, 2022 at 07:17:19AM +0200, Marcus Glocker wrote: > Periodic transfers on dwctwo(4) work very unreliable today. If I want > to use my RPI3B+ as a workstation, the keyboard is working so > unreliable, I can't hardly log-in to X. Playing USB audio isn't fun &

Re: Support Wacom One S (CTL-472)

2022-09-03 Thread Marcus Glocker
On Sat, Sep 03, 2022 at 05:43:25PM +0200, Caspar Schutijser wrote: > Hi, > > On Sat, Sep 03, 2022 at 05:00:00PM +0200, Stefan Hagen wrote: > > This is a better version of an earlier attempt to make my wacom tablet > > work. I have the tablet here in Bad Liebenzell if you want to give it a > > spi

Re: uvideo: constify device table

2022-10-21 Thread Marcus Glocker
On Fri, Oct 21, 2022 at 02:25:52PM +, Klemens Nanni wrote: > Not that big, but quirks are likely to grow in the feature and there is > no reason to keep them writable: > 822c0750 g O .data 0160 uvideo_devs > > Builds fine on amd64 but I don't have uvideo(4) attaching

pijuice(4) testing

2022-10-24 Thread Marcus Glocker
Currently the PiJuice HAT EEPROM doesn't ship with the Device Tree node for the I2C MCU which delivers us the battery information. The reason for that is most likely that Linux is offering a /dev/i2c device node for userland programs, and the PiJuice team has developed an utility which utilizes th

Re: uvideo(4) new quirk flag UVIDEO_FLAG_NOATTACH

2021-05-30 Thread Marcus Glocker
On Mon, 5 Apr 2021 23:54:31 +0200 Marcus Glocker wrote: > On Mon, Apr 05, 2021 at 11:27:10PM +0200, Mark Kettenis wrote: > > [...] > > > > > > How common is it to explain the system behavior in cases like > > > > > this? Would it be less surprising (ge

Re: Sync dwctwo(4) with NetBSD

2021-07-14 Thread Marcus Glocker
On Wed, 14 Jul 2021 07:30:30 +0200 Martin Reindl wrote: > On Sun, Jul 11, 2021 at 05:55:14PM +0200, Marcus Glocker wrote: > > > > Following the entire diff. And of course, general feedback and > > comments? :-) > > > > While I can't comment on t

Re: Sync dwctwo(4) with NetBSD

2021-07-14 Thread Marcus Glocker
On Mon, 12 Jul 2021 11:56:28 +1000 Jonathan Gray wrote: > On Sun, Jul 11, 2021 at 05:55:14PM +0200, Marcus Glocker wrote: > > dwctwo(4) on the Raspberry Pi 3 has some issues today. Basically > > uhub2 doesn't work which shows in: > > > > - mue(4

Re: Sync dwctwo(4) with NetBSD

2021-07-14 Thread Marcus Glocker
On Wed, 14 Jul 2021 11:53:50 +0200 (CEST) Mark Kettenis wrote: > > Date: Mon, 12 Jul 2021 11:56:28 +1000 > > From: Jonathan Gray > > > > On Sun, Jul 11, 2021 at 05:55:14PM +0200, Marcus Glocker wrote: > > > dwctwo(4) on the Raspberry Pi 3 has some issues toda

Re: usb: don't pass USBD_EXCLUSIVE_USE to usbd_open_pipe_intr()

2021-08-08 Thread Marcus Glocker
On Sun, 8 Aug 2021 14:38:57 +1000 Jonathan Matthew wrote: > While working on a new driver, I noticed we have a few places where we > pass USBD_EXCLUSIVE_USE as the flags parameter to > usbd_open_pipe_intr(), which is wrong. > > The interrupt pipe is always opened exclusively, and the flags > par

dwctwo(4) isoc

2021-09-05 Thread Marcus Glocker
In case you are playing around with isoc transfers (uvideo, uaudio) on dwctwo(4), and you are facing kernel crashes, you can try this diff. Or if you just want to regression test it. It basically does: * Fix DMA allocation out of interrupt context. * Fix a memory leak on DMA allocation during pip

Some USB memory allocation cleanup

2021-11-21 Thread Marcus Glocker
A friend of mine is trying to use two full HD cams on a OpenBSD laptop to record his band sessions from two different angles. He can start the first cam fine with 1920x1080, but if he tries to start the second cam with 1920x1080 he runs out of USB memory. That made me look in to the USB memory a

utvfu(4) frame size query busted

2021-11-24 Thread Marcus Glocker
When I understand it correctly, an utvfu(4) device supports either the frame size for PAL or NTSC. So, the VIDIOC_ENUM_FRAMESIZES ioctl should only return one frame size, which isn't the case currently. video(1) repeatedly returns various times the same frame size, ffmpeg(1) and ffplay(1) even go

Re: pms(4) fix

2020-07-01 Thread Marcus Glocker
+tech@ On Tue, 30 Jun 2020 22:25:07 +0200 Marcus Glocker wrote: > Hello Gents, > > The last pms.c commit rev. 1.92 introduces the same issue on my > ThinkPad X1 Gen6 again which we already have fixed with pms.c > rev. 1.87: > > pms0: not in sync, discard input ... >

Re: uvideo_querycap(): set device_caps field to unbreak video device detection with firefox 78

2020-07-04 Thread Marcus Glocker
On Sat, 4 Jul 2020 17:03:07 +0200 Landry Breuil wrote: > Hi, > > since firefox 78, video(4) devices arent detected anymore. Upstream > added code in https://bugzilla.mozilla.org/show_bug.cgi?id=1637319 to > check for the V4L2_CAP_VIDEO_CAPTURE capacity, and the code added in > https://hg.mozilla

xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-10 Thread Marcus Glocker
Hi All, Laurence Tratt was reporting about corrupted video images when using uvideo(4) on xhci(4) with MJPEG and higher resolutions, e.g. when using ffplay: $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -f /dev/video1 When trying to re-produce the issue on my side, the video images w

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-10 Thread Marcus Glocker
On Fri, 10 Jul 2020 14:19:00 +0200 Patrick Wildt wrote: > On Fri, Jul 10, 2020 at 01:00:31PM +0200, Marcus Glocker wrote: > > Hi All, > > > > Laurence Tratt was reporting about corrupted video images when using > > uvideo(4) on xhci(4) with MJPEG and higher resol

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-11 Thread Marcus Glocker
On Fri, 10 Jul 2020 14:32:47 +0200 Marcus Glocker wrote: > On Fri, 10 Jul 2020 14:19:00 +0200 > Patrick Wildt wrote: > > > On Fri, Jul 10, 2020 at 01:00:31PM +0200, Marcus Glocker wrote: > > > Hi All, > > > > > > Laurence Tratt was reporting abo

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-11 Thread Marcus Glocker
On Sat, 11 Jul 2020 11:56:38 +0200 Marcus Glocker wrote: > On Fri, 10 Jul 2020 14:32:47 +0200 > Marcus Glocker wrote: > > > On Fri, 10 Jul 2020 14:19:00 +0200 > > Patrick Wildt wrote: > > > > > On Fri, Jul 10, 2020 at 01:00:31PM +0200, Marcus G

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-11 Thread Marcus Glocker
On Sat, 11 Jul 2020 20:14:03 +0200 Marcus Glocker wrote: > On Sat, 11 Jul 2020 11:56:38 +0200 > Marcus Glocker wrote: > > > On Fri, 10 Jul 2020 14:32:47 +0200 > > Marcus Glocker wrote: > > > > > On Fri, 10 Jul 2020 14:19:00 +0200 > > > Patrick

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-13 Thread Marcus Glocker
On Sat, 11 Jul 2020 23:43:43 +0200 Marcus Glocker wrote: > On Sat, 11 Jul 2020 20:14:03 +0200 > Marcus Glocker wrote: > > > On Sat, 11 Jul 2020 11:56:38 +0200 > > Marcus Glocker wrote: > > > > > On Fri, 10 Jul 2020 14:32:47 +0200 > > > Marcus

Re: Add white temperature balance adjustability to video(1)

2020-07-15 Thread Marcus Glocker
Thanks for the diff Laurie - See my comments inline in your diff. Marcus On Mon, 13 Jul 2020 17:19:41 +0100 Laurence Tratt wrote: > This patch adds the ability to control the white balance temperature > on webcams in video(1). This is bound to keys W/w in steps of +/-10K > (because changing the

Re: Add white temperature balance adjustability to video(1)

2020-07-15 Thread Marcus Glocker
Oh, and lastly I forget, we would need a man page update as well listing the new knob :-) On Wed, 15 Jul 2020 20:33:54 +0200 Marcus Glocker wrote: > Thanks for the diff Laurie - See my comments inline in your diff. > > Marcus > > On Mon, 13 Jul 2020 17:19:41 +0100 > Lau

Re: Add white temperature balance adjustability to video(1)

2020-07-15 Thread Marcus Glocker
On Wed, 15 Jul 2020 21:15:37 +0100 Laurence Tratt wrote: > On Wed, Jul 15, 2020 at 08:33:54PM +0200, Marcus Glocker wrote: > > Hello Marcus, > > Thanks for your comments. I agree with all but one, and attach a new > diff. > > >> +#define CT

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-15 Thread Marcus Glocker
ease check if malloc returns NULL. Sure thing ... > > > On 2020/07/13 09:59, Marcus Glocker wrote: > > On Sat, 11 Jul 2020 23:43:43 +0200 > > Marcus Glocker wrote: > > > >> On Sat, 11 Jul 2020 20:14:03 +0200 > >> Marcus Glocker wrote: > >&

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-18 Thread Marcus Glocker
Hey, On Sat, 18 Jul 2020 00:14:32 + sc.dy...@gmail.com wrote: > hi, > > On 2020/07/15 21:28, sc.dy...@gmail.com wrote: > > hi, > > > > The patch works well on Intel PCH xhci, but not on AMD Bolton xHCI. > > I'll investigate this problem. > > Bolton xHCI sometimes raises following events.

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-19 Thread Marcus Glocker
rthermore... Oh dear :-) - Ok. > BTW I think xhci_ring_alloc should free ring dma buffer > if trb_processed[] allocation fails. Ah right, I'll add the usbd_dma_contig_free() there - Thanks. > > On 2020/07/18 14:47, Marcus Glocker wrote: > > Hey, > > > > On

Re: Add ability to set control values with video(1)

2020-07-21 Thread Marcus Glocker
Hi Laurie, See my comments inline. On Fri, 17 Jul 2020 22:51:30 +0100 Laurence Tratt wrote: > On Mon, Jul 13, 2020 at 07:39:41PM +0100, Laurence Tratt wrote: > > > video(1) allows users to adjust controls such as brightness, > > saturation (etc.) depending on the input device in question. Thes

Re: Add ability to set control values with video(1)

2020-07-22 Thread Marcus Glocker
Hello Laurie, On Tue, 21 Jul 2020 21:18:15 +0100 Laurence Tratt wrote: > On Tue, Jul 21, 2020 at 09:01:26PM +0200, Marcus Glocker wrote: > > Hello Marcus, > > Thanks for the comments! Again, I agree with all of them with a > couple of comments: > > > I'm a

Re: Add ability to set control values with video(1)

2020-07-23 Thread Marcus Glocker
On Wed, 22 Jul 2020 21:52:27 +0100 Laurence Tratt wrote: > On Wed, Jul 22, 2020 at 10:23:19PM +0200, Marcus Glocker wrote: > > Hello Marcus, > > > I've tested this here as well in the meantime by leaving > > mmap_init() on its original location (doesn't get

Re: Add ability to set control values with video(1)

2020-07-23 Thread Marcus Glocker
Hi Laurie, On Thu, 23 Jul 2020 21:07:26 +0100 Laurence Tratt wrote: > On Thu, Jul 23, 2020 at 09:56:39PM +0200, Marcus Glocker wrote: > > Hello Marcus, > > > We read the current value of the white balance temperature auto > > control (since this gets set correctly dur

Re: Add ability to set control values with video(1)

2020-07-24 Thread Marcus Glocker
On Fri, 24 Jul 2020 15:13:19 +0100 Laurence Tratt wrote: > On Thu, Jul 23, 2020 at 09:56:39PM +0200, Marcus Glocker wrote: > > Hello Marcus, > > > We read the current value of the white balance temperature auto > > control (since this gets set correctly during the reset

Re: Add ability to set control values with video(1)

2020-07-25 Thread Marcus Glocker
On Sat, Jul 25, 2020 at 10:27:15AM -0600, Theo de Raadt wrote: > Matthieu Herrb wrote: > > > On Sat, Jul 25, 2020 at 09:17:24AM -0600, Theo de Raadt wrote: > > > Marcus Glocker wrote: > > > > > > > Instead of introducing the CLI parameter contro

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-25 Thread Marcus Glocker
On Sun, Jul 19, 2020 at 02:12:21PM +, sc.dy...@gmail.com wrote: > On 2020/07/19 11:25, Marcus Glocker wrote: > > On Sun, 19 Jul 2020 02:25:30 + > > sc.dy...@gmail.com wrote: > > > >> hi, > >> > >> It works on AMD Bolton xHCI (78141022),

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-26 Thread Marcus Glocker
On Sat, 25 Jul 2020 20:31:44 + sc.dy...@gmail.com wrote: > On 2020/07/25 18:10, Marcus Glocker wrote: > > On Sun, Jul 19, 2020 at 02:12:21PM +, sc.dy...@gmail.com wrote: > > > >> On 2020/07/19 11:25, Marcus Glocker wrote: > >>> On Sun, 19

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-26 Thread Marcus Glocker
On Sun, 26 Jul 2020 13:27:34 + sc.dy...@gmail.com wrote: > On 2020/07/26 10:54, Marcus Glocker wrote: > > On Sat, 25 Jul 2020 20:31:44 + > > sc.dy...@gmail.com wrote: > > > >> On 2020/07/25 18:10, Marcus Glocker wrote: > >>> On Su

Re: xhci(4) isoc: fix bogus handling of chained TRBs

2020-07-28 Thread Marcus Glocker
On Tue, 28 Jul 2020 11:42:43 +0200 Martin Pieuchot wrote: > On 26/07/20(Sun) 16:23, Marcus Glocker wrote: > > On Sun, 26 Jul 2020 13:27:34 + > > sc.dy...@gmail.com wrote: > > > > > On 2020/07/26 10:54, Marcus Glocker wrote: > > > > On Sat

Re: Add ability to set control values with video(1)

2020-07-28 Thread Marcus Glocker
On Sat, 25 Jul 2020 18:27:45 +0100 Laurence Tratt wrote: > On Sat, Jul 25, 2020 at 10:27:15AM -0600, Theo de Raadt wrote: > > Hello Theo, > > > My primary concern is about a user changing settings which then > > persist past close. > > > > Upon re-open, how do they know what mode they are in? >

Re: Add ability to set control values with video(1)

2020-07-29 Thread Marcus Glocker
On Wed, 29 Jul 2020 07:45:52 +0200 Marcus Glocker wrote: > On Sat, 25 Jul 2020 18:27:45 +0100 > Laurence Tratt wrote: > > > On Sat, Jul 25, 2020 at 10:27:15AM -0600, Theo de Raadt wrote: > > > > Hello Theo, > > > > > My primary concern is

  1   2   3   >