From owner-freebsd-x11@freebsd.org Tue Jun 25 18:06:39 2019 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8C5D15D2C3F for ; Tue, 25 Jun 2019 18:06:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 792E46E93D for ; Tue, 25 Jun 2019 18:06:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 39FE615D2C37; Tue, 25 Jun 2019 18:06:38 +0000 (UTC) Delivered-To: x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 175B915D2C36 for ; Tue, 25 Jun 2019 18:06:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1B1E6E937; Tue, 25 Jun 2019 18:06:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7E72A139E1; Tue, 25 Jun 2019 18:06:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: Accelerated graphics in vbox 6 From: Jung-uk Kim To: Johannes Lundberg Cc: FreeBSD X11 , vbox@freebsd.org References: <4a697e5a-8ecc-cda9-6f80-3e78d09c924f@FreeBSD.org> <874a0def-1e1e-971b-ae65-4e700295a9e9@FreeBSD.org> Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <0a52c3c7-5bc9-dec8-ca1d-e37757ea446f@FreeBSD.org> Date: Tue, 25 Jun 2019 14:06:37 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B1B1E6E937 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2019 18:06:39 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 19. 6. 25., Jung-uk Kim wrote: > On 19. 5. 21., Jung-uk Kim wrote: >> On 19. 5. 21., Johannes Lundberg wrote: >>> Hi >>> >>> On 5/21/19 11:46 AM, Jung-uk Kim wrote: >>>> On 19. 5. 21., Johannes Lundberg wrote: >>>>> Hi vbox folks! (cc: x11 list) >>>>> >>>>> According to this >>>>> https://www.phoronix.com/scan.php?page=article&item=virtualbox-60- vmsvga&num=1 >>>>> >>>>> >>>>> vbox can now use the vmwgfx kernel driver for accelerated graphics. With >>>>> that I assume that virtualbox's own drm driver project is >>>>> scrapped. >>>> Actually, they moved vboxvideo KMS/DRM driver to Linux >>>> kernel. >>>> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ tree/drivers/gpu/drm/vboxvideo >>> >>> >>>> >>>> It's been there for quite some time and no progress have been made for >>> the time I've been tracking it. Seems abandoned to me and my >>> impression is that that one is scrapped in favor of vmwgfx... >>> Do anyone know if vboxvideo is suppose to be in working state >>> (the one in linux kernel)? >> >> It was added to staging for almost two years ago. Please see the >> original patch submission. >> >> https://lwn.net/Articles/726355/ >> >> Recently they moved it out of staging (via merging >> drm-next-2019-05-09). >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/co mmit/?id=131abc56e1bacef23cb7b340519d36e2f5adb2a9 >> >> >> >> It means Linux 5.2 release will have it by default. >> >> It doesn't look dead to me. ;-) >> >>>> And DDX driver was moved to Xorg repository. >>>> >>>> https://cgit.freedesktop.org/xorg/driver/xf86-video-vbox >>>> >>>>> I've been working on porting vmwgfx from Linux to our >>>>> linuxkpi. It works pretty well with freebsd 13 as vmware >>>>> guest on macos as long you're using only one vcpu (some >>>>> race condition issue to be solved..). It would be cool if >>>>> we could get accelerated graphics in vbox, with freebsd as >>>>> both host and guest since vmware can't run as host on >>>>> freebsd. >>>> Can you please port the vboxvideo driver to linuxkpi? >>> >>> vmwgfx seems like the better choice if it's used by both >>> vmware and vbox (v6+). But if it's suppose to be in a working >>> state I can take a look.. >> >> ... >> >> AFAIK VirtualBox graphics stack is in a working state. > > I found it is ported now. > > https://github.com/FreeBSDDesktop/kms-drm/commits/drm-v5.0 > > I tried it and it's somewhat working, thanks! > > However, I found two problems. > > 1. Console does not refresh automatically. > > When vboxvideo.ko is loaded, console stays black. Console preview > looks fine, though. I found it's redrawn when the window is > resized. Note I only tried it on a Windows host. I will try it > with FreeBSD host soon but I think it'll be the same. > > 2. Console does not resize dynamically. > > Actually, it is not vboxvideo.ko's fault. It happens because > vt(4) does not support monitor hotplug. > > https://www.virtualbox.org/wiki/Guest_resizing > > After I tried it out, I realized vboxvideo.ko is just a KMS driver > and modesetting driver is used for X.org. IOW, we cannot resize > X.org window dynamically when vboxvideo.ko is used. With > vboxvideo.ko or vboxvideo_drv.so, 3D acceleration is still handled > by the Chromium OpenGL pass-through stub. As always, it may be > enabled with setting OPENGL option for > emulators/virtualbox-ose-additions. > > BTW, Phoronix once reported 3D acceleration with VMware driver > does not look good on VirtualBox anyway. :-p > > http://www.phoronix.com/vr.php?view=27348 Sorry, the link was wrong. I meant to add this link. https://www.phoronix.com/vr.php?view=27277 Jung-uk Kim -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAl0SYqgACgkQfJ+WJvzb 8Uapzwf7BaLze2sEx50suPOsMTu7+ef+41fr2MdwNPaBo09PhmdYSdXeFMM6CTuO 29SBPZdbfloffPEGjbuCtEjPKCVGkHLdL5qE0p8k1hmFk4Lw4EhjZs85vhMC9vOr deOn0jn9seSzRgbjFH85frf/NayVhGfN1wj91wlY/xTXF9i60VLbz7W8UL2ahMo9 V1uf/mqlBOYrGET6WNcFucoAtKI/uMosma40Hod7Py5anItMyemZdAuU2aedEghY R8p8xLztivQnEkhxHSVV1jleK6d68+KRSuEXA3kILZ4X6dBIlXJNyS12ZRZq31Pl 4vzID9wUIjGHt+R3N++XDpUMKCddRA== =rnfF -----END PGP SIGNATURE-----