From owner-freebsd-x11@freebsd.org Sat Apr 27 18:46:18 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 317511599DD6 for ; Sat, 27 Apr 2019 18:46:18 +0000 (UTC) (envelope-from johalun@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 C9AF06A6EB; Sat, 27 Apr 2019 18:46:17 +0000 (UTC) (envelope-from johalun@FreeBSD.org) Received: from [192.168.0.83] (unknown [75.167.244.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: johalun) by smtp.freebsd.org (Postfix) with ESMTPSA id 619941BE63; Sat, 27 Apr 2019 18:46:17 +0000 (UTC) (envelope-from johalun@FreeBSD.org) To: Tycho Nightingale , "freebsd-x11@freebsd.org" From: Johannes Lundberg Subject: dmar, dma_pool, etc Message-ID: Date: Sat, 27 Apr 2019 11:46:15 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: C9AF06A6EB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] 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: Sat, 27 Apr 2019 18:46:18 -0000 Hi Tycho, I'd like to understand what is the goal with the changes to linuxkpi and what you plan to use it for. LinuxKPI base is tightly connected to LinuxkPI GPLv2 and the DRM drivers in ports. We need to make sure that any change to base LinuxKPI is compatible with what we have in ports, or patch the ports to handle the changes in base. For example, there is a CONFIG_INTEL_IOMMU options in Linux code that enables DMAR. It turns out, ttm has it's own dma_pool implementation. This is possible since in Linux dma_pool is private to dmapool.c. Enabling this option for us cause a compile error since dma_pool is public in base linuxkpi. I don't know if this is really a problem if CONFIG_INTEL_IOMMU (or CONFIG_SWIOTBL) are options that we'll never use... Also, we do have a problem with Firefox causing GPU hangs so I'd appreciate it if Tycho could look through linuxkpi_gplv2, drm and i915kms (i915kms does not use ttm so no need to look there for problems with Intel GPU) to see if there are any places needing patching. I know there's one vtophys() call in fb_mmap() but IIRC, that is never used. I'll look into that next. There are also uses of PHYS_TO_DMAP() and VM_PAGE_TO_PHYS(). Would any of these need patching? Use the default branch at https://github.com/FreeBSDDesktop/kms-drmĀ  /Johannes