From owner-freebsd-x11@freebsd.org Wed May 16 12:57:34 2018 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 49CDBEE0C1D for ; Wed, 16 May 2018 12:57:34 +0000 (UTC) (envelope-from emil.l.velikov@gmail.com) 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 D0E8987806 for ; Wed, 16 May 2018 12:57:33 +0000 (UTC) (envelope-from emil.l.velikov@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 8FD7AEE0C1C; Wed, 16 May 2018 12:57:33 +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 6BAFCEE0C1B for ; Wed, 16 May 2018 12:57:33 +0000 (UTC) (envelope-from emil.l.velikov@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E283487800; Wed, 16 May 2018 12:57:32 +0000 (UTC) (envelope-from emil.l.velikov@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id f8-v6so1378493wmc.4; Wed, 16 May 2018 05:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=q/znSgU8FxSBMSHWE1O6/kj7NobqmHTKQupOLYx0JjE=; b=WG3+Etkk9/adZ9n8S71fColUlUORVIFNUKFMbl50FcCGmZ2tOrFYn2ABj75HFIFOHA lEjQlNKmMC9E+Fu/n5Ld5yjxhPjbaOh5jH5HcEirJJsjBBfR8ynhv1sEfDx9lXGtzj5F BZMY6MNYwL0lfZsYgFbC9e7vgsfMH2yR5+sxRbQ9xZXJCXzaVewnTfP/h+iRC9kJuBX/ TFJDQnDijvcZRWeK7rsalZQKoOcJwjYsQ+3xOR7uO8RDsGCAJ0Rt4VbpP1Qqg6Kyat5V Nj3o7oU34dkOF2I8mqhK+7E9IToXKVMCQoIoUK6kt6qzqEY+AZUNaxIqHzdZ13ewtfli uMyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=q/znSgU8FxSBMSHWE1O6/kj7NobqmHTKQupOLYx0JjE=; b=UCTmvPKuwX3MyyojhcQ4OtX927Jp2ELB/o3acYM5mBOeBct2q7ft17BROfGGTet17y SMDFfAIGi7lNyxRq34wBwWNsLQ6mx8WwY1JJ+qch/Zi/rv4CO72mII9ny84XxNcJaKWa JIYVHK4l/tnT+7pMtR8wZthHLfFDbdHwqbv31/cpzQ3oBAECqWPWQ1+R7oL3YOiUE3x7 bmw34ZtuhDOGQ4CcUO86rDUrk/lpCKnC0Y3qorcduWJHtXVhBxZ4V552g/y+srtWHxOe 3SQ4KPTZWM1oeeyc6a6WZY+ZJuwMeI4DmR4YUatqgI+5QOL7PZ3sPOJo6JaRyPv68O/b MJOQ== X-Gm-Message-State: ALKqPwcwsyzqyMw/xMmDjrokG2li1iNB4xZr/ZQfse03I7H8d/7MgXUI 9ELqcyYKDe5w90OjOI0hybCPocCLgLwahSuATbdMGQ== X-Google-Smtp-Source: AB8JxZqayFe27QPoRMqU9mV9khnxGtTWGKe+qsApopgz3LcKmaLwr6HlDpVSFc7aWhrksI3gWl2vZZnsyVAn2WFDMKg= X-Received: by 2002:a1c:2054:: with SMTP id g81-v6mr525931wmg.122.1526475451486; Wed, 16 May 2018 05:57:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.167.214 with HTTP; Wed, 16 May 2018 05:57:30 -0700 (PDT) In-Reply-To: <237b2552-c97c-fd41-5509-ed611f0103dd@freebsd.org> References: <20170222120828.zkrfh56swen7r44o@ivaldir.etoilebsd.net> <3635692.Vys3mgEcQY@workstation.reztek> <237b2552-c97c-fd41-5509-ed611f0103dd@freebsd.org> From: Emil Velikov Date: Wed, 16 May 2018 13:57:30 +0100 Message-ID: Subject: Re: your mail To: Niclas Zeising Cc: Matthew Rezny , Steve Wills , x11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2018 12:57:34 -0000 Hi Niclas, On 15 May 2018 at 09:07, Niclas Zeising wrote: > On 05/15/18 00:47, Emil Velikov wrote: >> >> On 22 February 2017 at 14:46, Matthew Rezny wrote: >> >>> It has been my intent to upstream as much as possible, but I was trying >>> to get >>> us caught up to current before doing so. >> >> >> Any idea what happened to this? >> >> Earlier I joined the #freebsd-xorg channel, yet it seems fairly inactive. >> Repeating some of my questions here, hope anyone can shed some light: >> >> - How does FreeBSD handle loading of kernel DRM/GPU modules? >> Is there a daemon of sorts, manually or via hacking the graphics stack >> - Xorg/xf86-video*/etc >> >> - ^^ creating /dev nodes >> >> - How capable is your sysfs compat? Or more importantly how frowned >> upon it is to use it on FreeBSD? >> >> And an extra one: >> - How does one contribute patches to (say the graphics - libdrm/mesa/etc) >> ports? >> Is there some instructions and CI there I can throw some patches at? >> > > Hi! > Thank you for your mail and thanks for reaching out! I was one of the ones > responding on IRC, unfortunately you caught me at a bad time here, hence my > suggestion to send an e-mail. > > I know the FreeBSD graphcis effort have been somewhat dormant (yeah, that's > an understatement), but I'm working on getting it going again with a group > of people. It's still in the early stages but hopefully something will come > out of it. We had such a team about 4 or 5 years back, but people, > including myself, got different priorities (you know, life happens). > Glad to hear there's plans on reviving it. > Currently, we have a working area and development repos on gitub, which you > can find here https://github.com/FreeBSDDesktop/, amongst other things > there's a fork of the FreeBSD ports repo there where most ports development > happens. There's no problem getting you access to that one, and we can also > add forks of upstream mesa and drm repos and so on. Since I'm not using/testing FreeBSD I'm looking for someone to review any patches ;-) Having commit access is not really required on my end. > We also have a gitter > chat that we're trying out. It can be found here: > https://gitter.im/FreeBSDDesktop/Lobby, you're welcome to join there as > well. It's connected to github. The IRC channel #freebsd-xorg is > unfortunately somewhat dormant, because not everyone hangs out there, but > I'm available there as well. > Ack. Will do in a moment. > As I said, we're still early in the process, so all details aren't 100% set > yet, but this is what we have going for now. > > Now, to your questions. As far as I know, there's no automatic loading of > the graphics modules, apart from the really old stuff. If memory serves me > correctly. The current way of doing it is to load the module before > starting X, usually as part of the boot process. There might be a hack in > xf86-video-intel to load some modules, but not the latest kms graphics > modules. > To load the module, currently there are hacks in xf86-video-{intel,ati,amdgpu} and perhaps others. See my patch removing one [1], there extra reasoning in the thread and complete silence from the FreeBSD author ;-( [1] https://lists.freedesktop.org/archives/amd-gfx/2018-April/020935.html > Creating /dev nodes is handled automatically by devfs and devd. I don't > know how it's done in detail, but it's automatic as far as at least I'm > concerned. > Ack. On Linux the same daemon (udevd in our case) loads the kernel module also creates the node. Has there been attempts/discussions about doing the same in FreeBSD? > As for sysfs, mmacy gave a good responce on IRC. > Are you sure it wasn't on gitter? You're the only person who wrote in the IRC channel since I joined. Can you please copy it here or share a link? > For patches and contributing, as I said, we're trying to set up shop on > github (and from there merge into FreeBSD SVN repos). The kernel bits > (what's called drm-next sometimes) are already there, and I've started > working on a ports repo there as well. That's probably the best place to > start. We don't have a CI setup currently, I use the package building > system poudriere locally on my desktop. I can help you get started with > both poudriere and the FreeBSD ports system, and I can also help with adding > patches to the ports and build packages for testing. > I hope to be able to add more automatic building and some sort of CI > solution in the future, but this is where we're at today. > Future looks good, fingers crossed it shouldn't take too long to reach. > We already have some local patches, they should be upstreamed, but I haven't > had time to work through them, and since I don't know exactly how they work, > it will take some time to get them upstream. > Can I contact you directly to get them upstreamed once they're ready? > In general I'd recommend two things: - send patches upstream _alongside_ the FreeBSD submission Either the submitter or reviewer can do that. You want that to avoid redoing the same work multiple times. - contact the project itself, not individuals You can CC individuals, but having only one person is back since the review comments may be partial or outright wrong. > Once again, thank you very much for reaching out, and thank you for reading > to the end! Thanks for taking the time to right this. I'll see about opening a PR or two on FreeBSDDesktop. Fingers crossed it will flow smoothly and get into the official repos quickly. -Emil