From owner-freebsd-x11@freebsd.org Sun May 10 18:59:39 2020 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EC262F0CBA; Sun, 10 May 2020 18:59:39 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49KtfL0V5Jz4X3B; Sun, 10 May 2020 18:59:37 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1589137169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LFQMWArz9p2+aVHoJG3h16JNkiwrA854qlpevQuWhoY=; b=n9Z/UM6J9sYBJVpkYH7XTRcnM/ze4M43/4sh/IKGqF7yYHA26xf/QdzXwzvUqwuOeXmux+ D0cE8p+El3ZzcAdBurcLnrwtuEfe8iZPwLF3n71UhdKrG1nIxvEt8ExK6omcUITYp7uKYr YnGgsVQidhnwkrJQSW433POcGMksqgw= Received: from tails.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 099a2823 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 10 May 2020 18:59:29 +0000 (UTC) Date: Sun, 10 May 2020 20:59:29 +0200 From: Emmanuel Vadot To: freebsd-current@freebsd.org, freebsd-x11@freebsd.org Subject: drm drivers project report (week of May 4th) Message-Id: <20200510205929.0dcf23d0b278bc242718a564@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49KtfL0V5Jz4X3B X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=n9Z/UM6J; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.96 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.46)[ip: (-9.44), ipnet: 212.83.128.0/19(1.73), asn: 12876(0.40), country: FR(-0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 May 2020 18:59:39 -0000 Hello all, This is the first report for this project of updating our drm drivers as it started this week. I've started this week by cleaning our drm-v5.0 port comparing it with Linux as the less diff we have, the easiest it is to apply the patches from Linux. One commit was made to base linuxkpi so we have less patches in the DRM drivers themself : https://svnweb.freebsd.org/changeset/base/360787 Next part was trying to find what is the best way to update without too much hassle. I had some somewhat hacky scripts lying around for the drm on ARM project so I've made them a bit more generic and commited them here https://github.com/freebsd/drm-kmod/tree/master/scripts . This still isn't the best way I think. Due to how Linux is "constructed" patches can comes from differents branches and aren't necessary in the correct order. There is also some weird commits that appears in two releases of Linux, I think this is because they come late in a fixes merge and then the maintainer of one of the drm branches do stuff in the other branch for the next Linux release. If anyone have a lot of git skill I'm interested in how they would approch this problem. I also have to see if it would make more sense to track the differents commits in the merge branch from the drm repos (https://cgit.freedesktop.org/drm/) or not. After finding a almost good way to update I proceeded with updating to Linux 5.1 . This update was almost too easy, thanks to Austin Shafer who updated linuxkpi to include a few more helpers and functions needed by 5.1. There is no ports for now but if you want to test on your system you can checkout or download a tarball here : https://github.com/freebsd/drm-kmod/releases Only FreeBSD 13-CURRENT is supported. Also if you are using one of the drm-kmod ports be sure to delete /boot/kernel/drm.ko /boot/kernel/amdgpu.ko /boot/kernel/i915kms.ko /boot/kernel/linuxkpi_gplv2.ko /boot/kernel/radeon.ko As the drm-kmod ports install the sources in the system a kernel compilation will rebuild those modules and install them in /boot/kernel whereas using https://github.com/freebsd/drm-kmod/ will install everything in /boot/modules This branch was tested with : i915 on : - i7-5600U - HD Graphics 5500 (Broadwell) - i7-7500U - Skylake GT2 [HD Graphics 520] (Skylake) amdgpu on : - Ryzen 7 3700U (Picasso/Vega10) Except Skylake which doesn't have working vulkan (but doesn't have either with drm-v5.0) everything works great. I've started then the update to 5.2, it's still wip and only have i915 enabled as I haven't fixed everything for amdgpu/radeon or vmware/vbox but a wip branch is available there : https://github.com/freebsd/drm-kmod/tree/5.2-wip A few commits where made in base linuxkpi : https://svnweb.freebsd.org/changeset/base/360851 https://svnweb.freebsd.org/changeset/base/360870 https://svnweb.freebsd.org/changeset/base/360871 I don't suggest that you track this branch as I will fix the commits and force push on it, this is because I want to have every commit that is buildable for Linux, buildable for us, very conveniant for bisecting problems but I'd appreciate if people would test and report to me directly on replying to this thread. I have plan to create a usb/iso image that people could burn and tes but that will not be before a few weeks. This was tested on the same Intel systems as above with the addition of : i915 on : - Silver N5000 CPU (Thanks to Austin Shafer) - i7-6700K (Skylake) (Thanks to jbeich@) - i7-8665U (Whiskeylake) (Thanks to db@) The goal for next week is obviously to continue the update for 5.2 and updating to 5.3. The goal is to go as quickly as possible to 5.4 and stabilise there in a branch while going further on the master branch as 5.4 is a LTS branch in Linux and receive a lot of fix update. Regards, -- Emmanuel Vadot