Date: Mon, 22 Feb 2016 12:45:56 +0100 From: Nikola Pajkovsky <n.pajkovsky@gmail.com> To: Alexander Mishurov <alexander.m.mishurov@gmail.com> Cc: freebsd-x11@freebsd.org Subject: Re: Guide to contribute to kernel video drivers Message-ID: <87h9h13r4b.fsf@gooddata.com> In-Reply-To: <56CAEF4A.9070208@gmail.com> (Alexander Mishurov's message of "Mon, 22 Feb 2016 14:21:46 %2B0300") References: <56C708E9.8050203@FreeBSD.org> <20160220104349.2bc8b22a@fujitsu> <56C8F89D.5060703@dumbbell.fr> <CABHD1wSFdGUZ5wmDzN8Twu5F1BeERoJZ5zeRaGjNMv%2Bbb7gwYA@mail.gmail.com> <56CAE91D.7060905@dumbbell.fr> <56CAEF4A.9070208@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Mishurov <alexander.m.mishurov@gmail.com> writes: > I agreed that the first thing we have to do is to move to linux > kpi. But this step causes some questions. > > 1. Linux kpi is conflicting with drm_os_freebsd and drm_scatter and > may be some other things from drm. This means we have to migrate whole > drm core to linux kpi and therefore that affects at least radeon > drivers. It's quite huge amount of work in comparison to only > i915. What about existing non i915 drivers depend on drm and > drm_os_freebsd ? > > 2. Move to linux kpi is not enough, I'm sure there should be one more > layer like drm_os_freebsd on top of linux kpi with our own macros, > inlines and other things for minimizing modifications of the original > Linux driver sources because linux kpi covers only basic things. > If you start depending on drm_os_freebsd, you will very likely duplicate work from linuxkpi. I saw, that quite lot of drivers have its own implementation of linuxkpi. See le16_to_cpu() and le* types. le16_to_cpu 45 contrib/ofed/include/infiniband/byteorder.h #define le16_to_cpu le16toh le16_to_cpu 7 contrib/wpa/src/utils/platform.h #define le16_to_cpu le_to_host16 le16_to_cpu 49 sys/compat/linuxkpi/common/include/asm/byteorder.h #define le16_to_cpu le16toh le16_to_cpu 231 sys/dev/cxgb/cxgb_osdep.h #define le16_to_cpu(x) le16toh(x) le16_to_cpu 11 sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h #undef le16_to_cpu le16_to_cpu 96 sys/dev/cxgbe/osdep.h #define le16_to_cpu(x) le16toh(x) le16_to_cpu 34 sys/dev/drm2/drm_os_freebsd.h #define le16_to_cpu(x) le16toh(x) le16_to_cpu 87 sys/dev/ixgb/if_ixgb_osdep.h #define le16_to_cpu le16_to_cpu 162 sys/dev/ixgbe/ixgbe_osdep.h #define le16_to_cpu le16_to_cpu 141 sys/dev/ixl/i40e_osdep.h #define le16_to_cpu Since all of them are ports from linux kernel, they should have use include/asm/byteorder.h > 3. Did anyone already start to work on moving to linux kpi? I wanted to, but I somehow don't know, how to balance my work with porting drm to use linuxkpi :( -- Nikola
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87h9h13r4b.fsf>