From nobody Sat Sep 09 08:45:40 2023 X-Original-To: freebsd-usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RjRQK13gbz4sc5l for ; Sat, 9 Sep 2023 08:45:45 +0000 (UTC) (envelope-from garyj@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RjRQJ1dyyz4Tdf for ; Sat, 9 Sep 2023 08:45:44 +0000 (UTC) (envelope-from garyj@gmx.de) Authentication-Results: mx1.freebsd.org; dkim=fail ("headers rsa verify failed") header.d=gmx.de header.s=s31663417 header.b=i0xmlVeb; spf=pass (mx1.freebsd.org: domain of garyj@gmx.de designates 212.227.17.20 as permitted sender) smtp.mailfrom=garyj@gmx.de; dmarc=pass (policy=none) header.from=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1694249141; x=1694853941; i=garyj@gmx.de; bh=EY9xREIy7w4xKLOkGBB1bEbc4lquU8YDccVgznBikLo=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References:Reply- To; b=i0xmlVebbYAjP3rpG54ybvpUAWIpTOla/47bSdbTU5USjrgsinBRSJ1l89NN1S6u5vM2N2W 7nfTazv1ZfUqYhWXghSt+OHZ65VV9tjp6+JKprkiEIbmVvQXiTm/P2ZFP8KHa+chSKX/PI7KH duOQDbUBK17UVsIxOHa5PjvMy4+obDB9II7XiampYWXFO+Imyh1Xc0ywz3CpIKZWMudeN86Ey DG5F+L+8/Q0/jktOdn7hY7rLPmk0py5L+D8ReCJqqS44kLCkiSNUpIVU52iVAnJSG6f6YtGk4 TCirGpAhd0mAnt/76dyu5hFeYMZdfA/gGQ6+25qfh4eeD/CjLoHg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from ernst.home ([217.226.51.105]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbAci-1q3dyH1in2-00bZQg; Sat, 09 Sep 2023 10:45:41 +0200 Date: Sat, 9 Sep 2023 08:45:40 +0000 From: Gary Jennejohn To: Archimedes Gaviola Cc: freebsd-usb@freebsd.org Subject: Re: udl(4) patch for SIIG USB 2.0 DVI/VGA Pro support Message-ID: <20230909104540.01f60614@ernst.home> In-Reply-To: References: Reply-To: garyj@gmx.de X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:W0ZlSA1Y+mw8yI6pP/nD6YzWGVbP+v5ikC2Hpc1sOJDGh7xD64O xs+cm1+QJMnkb5QI2+XV4SjIIwu3XKTROTmmNasjkXWUNOgypVT8rSNf6x+tC97mPnmV2e4 vTGLK8/HSL+QCQCZGqy2ItnccKYdDrgoenQztGqrgOJYIchc7PdZDBTYm2854RUa13BYV7f juFtKjjf58ch3mMFu1xSw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:69ngHUJGVaA=;uEV4efc74n/PbCX2sEbX2RhE3UI TS134KVxL42zkXMni4CgdxaXA6fYWWxIWwab1wnjBsC0gbmTon+26rGa5T4oonnyfXB2ki5uO fMbRekORjd9lKoYOXEKXoP2UaQsxhAJgC84ObTRhNDnFwIv6JnOsi8NxC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VERYGOOD(-0.20)[212.227.17.20:from]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.20:from]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[garyj@gmx.de]; FREEMAIL_REPLYTO(0.00)[gmx.de]; TAGGED_RCPT(0.00)[]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_FROM(0.00)[gmx.de]; R_DKIM_REJECT(0.00)[gmx.de:s=s31663417]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmx.de]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmx.de:-]; RCVD_COUNT_ONE(0.00)[1]; DMARC_POLICY_ALLOW(0.00)[gmx.de,none]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4RjRQJ1dyyz4Tdf On Sat, 9 Sep 2023 13:25:02 +0800 Archimedes Gaviola wrote: > On Tue, Sep 5, 2023 at 11:12?PM Archimedes Gaviola < > archimedes.gaviola@gmail.com> wrote: > > > Hi, > > > > I would like to submit some patches below for the SIIG USB 2.0 DVI/VGA= Pro > > device support for the udl(4) video driver. You can see actual device = here > > https://www.siig.com/usb-2-0-to-dvi-vga-pro.html. This has been tested= on > > both 14.0-ALPHA4 and 15.0-CURRENT in a compiled kernel and in the load= able > > module. Either way both are working. There are two files being patched= (1) > > /usr/src/sys/dev/usb/usbdevs and (2) /usr/src/sys/dev/usb/video/udl.c. > > These changes apply for both 14.0-ALPHA4 and 15.0-CURRENT. > > > > root@fbsd14a4:~ # uname -a > > FreeBSD fbsd14a4 14.0-ALPHA4 FreeBSD 14.0-ALPHA4 amd64 1400097 #0 > > stable/14-n265026-4c3f144478d4: Fri Sep 1 05:47:56 UTC 2023 > > root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC > > amd64 > > > > root@fbsd15:~ # uname -a > > FreeBSD fbsd15 15.0-CURRENT FreeBSD 15.0-CURRENT i386 1500000 #0 > > main-n265091-e04c4b4a369d: Thu Aug 31 03:48:01 UTC 2023 > > root@releng3.nyi.freebsd.org:/usr/obj/usr/src/i386.i386/sys/GENERIC i3= 86 > > > > root@fbsd14a4:~ # diff -Nur /usr/src/sys/dev/usb/usbdevs.orig > > /usr/src/sys/dev/usb/usbdevs > > --- /usr/src/sys/dev/usb/usbdevs.orig 2023-09-03 04:16:01.453679000 = +0800 > > +++ /usr/src/sys/dev/usb/usbdevs 2023-09-03 09:23:33.848897000 = +0800 > > @@ -1808,6 +1808,7 @@ > > product DISPLAYLINK M01061 0x01e2 Lenovo DVI > > product DISPLAYLINK SWDVI 0x024c SUNWEIT DVI > > product DISPLAYLINK NBDOCK 0x0215 VideoHome NBdock1920 > > +product DISPLAYLINK AN2440D3 0x028f SIIG USB 2.0 DVI/VGA Pro > > product DISPLAYLINK LUM70 0x02a9 Lilliput UM-70 > > product DISPLAYLINK DVI_19 0x0360 USB to DVI-19 > > product DISPLAYLINK UM7X0 0x401a nanovision MiMo > > > > root@fbsd14a4:~ # diff -Nur /usr/src/sys/dev/usb/video/udl.c.orig > > /usr/src/sys/dev/usb/video/udl.c > > --- /usr/src/sys/dev/usb/video/udl.c.orig 2023-09-03 > > 04:15:21.204875000 +0800 > > +++ /usr/src/sys/dev/usb/video/udl.c 2023-09-03 09:25:23.893228000 = +0800 > > @@ -179,6 +179,7 @@ > > {USB_VPI(USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_LT142= 1, > > DLUNK)}, > > {USB_VPI(USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_ITEC, > > DL165)}, > > {USB_VPI(USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_DVI_1= 9, > > DL165)}, > > + {USB_VPI(USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_AN244= 0D3, > > DL195)}, > > > > Some relevant info below upon detection of the device after patched (o= nly > > 14.0-ALPHA4 is shown as 15.0-CURRENT is the same). Because the videomo= de > > driver is also a dependency to the udl(4) driver, it is also able to d= etect > > my Dell VGA monitor for available screen resolutions and video modes. > > > > root@fbsd14a4:~ # kldload udl > > root@fbsd14a4:~ # kldstat > > Id Refs Address Size Name > > 1 10 0xffffffff80200000 1d339a8 kernel > > 2 1 0xffffffff8261f000 3690 udl.ko > > 3 1 0xffffffff82623000 5028 videomode.ko > > > > root@fbsd14a4:~ # kldstat -v -n kernel | grep udl > > 107 udl/fbd > > 282 uhub/udl > > > > root@fbsd14a4:~ # dmesg > > ugen0.2: at usbus0 > > udl0 on uhub0 > > udl0: on usbu= s0 > > Vendor: [DEL] Dell > > Product: [2004] D1918H > > Serial number: GC2RW07C8PHX > > Manufactured 2019 Week 28 > > EDID Version 1.3 > > EDID Comment: > > Video Input: 68 > > Analog > > -0.7, 0.0V > > Separate syncs > > Gamma: 2.20 > > Max Size: 41 cm x 23 cm > > Features: 2a > > DPMS active-off > > RGB > > Preferred timing > > Chroma Info: > > Red X: 0.635 > > Red Y: 0.635 > > Grn X: 0.330 > > Grn Y: 0.627 > > Blu X: 0.155 > > Blu Y: 0.046 > > Wht X: 0.313 > > Wht Y: 0.329 > > Range: > > Horizontal: 30 - 83 kHz > > Vertical: 56 - 75 Hz > > Max Dot Clock: 135 MHz > > Video modes: > > 720x400 @ 70Hz (28320 738 846 900 412 414 449 -H +V) > > 640x480 @ 60Hz (25175 656 752 800 490 492 525 -H -V) > > 640x480 @ 75Hz (31500 656 720 840 481 484 500 -H -V) > > 800x600 @ 60Hz (40000 840 968 1056 601 605 628 +H +V) > > 800x600 @ 75Hz (49500 816 896 1056 601 604 625 +H +V) > > 1024x768 @ 60Hz (65000 1048 1184 1344 771 777 806 -H -V) > > 1024x768 @ 75Hz (78750 1040 1136 1312 769 772 800 +H +V) > > 1280x1024 @ 75Hz (135000 1296 1440 1688 1025 1028 1066 +H +V) > > 1366x768 @ 60Hz (85500 1436 1579 1792 771 774 798 +H +V) > > Preferred mode: 1366x768 @ 60Hz > > Number of extension blocks: 0 > > udl0: Mode selected 1280x1024 @ 75Hz > > fbd0 on udl0 > > > > root@fbsd14a4:~ # usbconfig -d ugen0.2 dump_device_desc > > ugen0.2: at usbus0, cfg=3D0 md=3DHOST spd=3DFUL= L (12Mbps) > > pwr=3DON (500mA) > > > > bLength =3D 0x0012 > > bDescriptorType =3D 0x0001 > > bcdUSB =3D 0x0110 > > bDeviceClass =3D 0x0000 > > bDeviceSubClass =3D 0x0000 > > bDeviceProtocol =3D 0x0000 > > bMaxPacketSize0 =3D 0x0040 > > idVendor =3D 0x17e9 > > idProduct =3D 0x028f > > bcdDevice =3D 0x0001 > > iManufacturer =3D 0x0001 > > iProduct =3D 0x0002 > > iSerialNumber =3D 0x0003 <111018> > > bNumConfigurations =3D 0x0001 > > > > root@fbsd14a4:~ # sysctl -a | grep udl > > udl0 on uhub0 > > udl0: on usbu= s0 > > udl0: Mode selected 1280x1024 @ 75Hz > > fbd0 on udl0 > > device udl > > hw.usb.udl.fps: 25 > > hw.usb.udl.debug: 0 > > dev.fbd.0.%parent: udl0 > > dev.udl.0.mode: 17 > > dev.udl.0.mode_force: -1 > > dev.udl.0.chipid: 4 > > dev.udl.0.chipid_force: -1 > > dev.udl.0.%parent: uhub0 > > dev.udl.0.%pnpinfo: vendor=3D0x17e9 product=3D0x028f devclass=3D0x00 > > devsubclass=3D0x00 devproto=3D0x00 sernum=3D"111018" release=3D0x0001 = mode=3Dhost > > intclass=3D0xff intsubclass=3D0x00 intprotocol=3D0x00 > > dev.udl.0.%location: bus=3D0 hubaddr=3D1 port=3D1 devaddr=3D2 interfac= e=3D0 > > ugen=3Dugen0.2 > > dev.udl.0.%driver: udl > > dev.udl.0.%desc: DisplayLink AN2440D3, class 0/0, rev 1.10/0.01, addr = 2 > > dev.udl.%parent: > > > > Lastly, I would also submit a patch for the udl(4) manual for update. > > First, there's a need to include DL-195 in the description since this = model > > is the chipset of SIIG USB 2.0 DVI/VGA Pro which is working as tested. > > Second, the udl(4) driver must be accompanied with the videomode drive= r > > otherwise kernel compilation will fail and third, adding the SIIG USB = 2.0 > > DVI/VGA Pro device in the list. > > > > root@fbsd14a4:~ # diff -Nur udl-manual.orig udl-manual > > --- udl-manual.orig 2023-08-18 00:13:25.583021000 +0000 > > +++ udl-manual 2023-08-18 15:06:41.896163000 +0000 > > @@ -1,13 +1,14 @@ > > UDL(4) FreeBSD Kernel Interfaces Manual > > UDL(4) > > > > NAME > > - udl ? DisplayLink DL-120 / DL-160 USB display devices > > + udl ? DisplayLink DL-120 / DL-160 / DL-195 USB display devices > > > > SYNOPSIS > > - To compile this driver into the kernel, place the following line= in > > your > > + To compile this driver into the kernel, place the following line= s in > > your > > kernel configuration file: > > > > device udl > > + device videomode > > > > Alternatively, to load the driver as a module at boot time, plac= e the > > following line in loader.conf(5): > > @@ -16,7 +17,7 @@ > > > > DESCRIPTION > > The udl driver supports USB display devices based on the Display= Link > > - DL-120 / DL-160 graphic chip. > > + DL-120 / DL-160 / DL-195 graphic chip. > > > > HARDWARE > > The following devices should work: > > @@ -40,6 +41,7 @@ > > Unitek Y-2240 USB to DVI > > VideoHome NBdock1920 > > i-tec USB 2.0 Docking Station (USBDVIDOCK) > > + SIIG USB 2.0 DVI/VGA Pro > > > > Thanks, > > Archimedes > > > > Hi, > > By the way, should I post this patch to the Phabricator > https://reviews.freebsd.org for review? The other patch is related to th= e > manual, where to post it as well? > Posting the patches to Phabricator would be a good idea. It might get more attention that way. Since the manpage is also relevant to the driver I would recommend putting it in the Phabricator entry along with the USB driver patches. Once you've created the Phabricator entry you should post its number. =2D- Gary Jennejohn