Linux kernel API wrapper: using OFED's one in other drivers

Jean-Sébastien Pédron dumbbell at FreeBSD.org
Mon Sep 8 09:57:45 UTC 2014


Hi!

OFED (sys/ofed) comes with a Linux kernel API wrapper. Beside OFED
itself, it's currently used in sys/dev/cxgb and sys/dev/cxgbe.

I'm playing with this wrapper to add a new feature to the i915 GPU
driver [1]. Don't pay attention to the current patch as this is not the
final approach I have in mind. However, the idea is there: I'd like to
use it in sys/dev/drm2.

The benefit of using such a wrapper in the DRM drivers are obvious:
    1. It greatly reduces the diff between FreeBSD code and Linux
       original code.
    2. It speeds up the integration of new changes in FreeBSD.
    3. It eases the report of bugfixes to Linux.

Those arguments are true for any driver. But in this particular case,
this would allow us to reduce the gap with Linux in the graphics stack
area more quickly (and we deeply need that). DragonFlyBSD is already
doing that.

Of course, using this wrapper as it is today isn't practicle: the code
is located in a driver and it's not even part of GENERIC. The proposal
is to move it outside of OFED and add it to GENERIC.

I don't have a patch to show yet. I'd like to get feedback first. What
do you think about that? OFED maintainers, would you be ok?

[1] https://wiki.freebsd.org/Graphics/Add_HW_context_support_to_i915

-- 
Jean-Sébastien Pédron

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20140908/c92522d8/attachment.sig>


More information about the freebsd-arch mailing list