[Mesa-dev] [PATCH 0/2] anv/i965: drop libdrm dependency completely

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Apr 27 17:58:42 UTC 2017


On 27/04/17 08:20, Eric Anholt wrote:
> Emil Velikov <emil.l.velikov at gmail.com> writes:
>
>> On 25 April 2017 at 23:56, Lionel Landwerlin
>> <lionel.g.landwerlin at intel.com> wrote:
>>> Hi,
>>>
>>> While working with changes that span from kernel to user space, I've
>>> been wondering whether we need to depend on libdrm at all for the anv
>>> & i965 drivers. Indeed with Ken's recent changes, we only depend on
>>> libdrm for its kernel header files which we could just embed
>>> ourselves.
>>>
>>> I've only included the minimal set of header files we need from the
>>> kernel for anv & i965. Maybe other drivers would be interested and
>>> maybe we should put all the kernel drm uapi headers into include?
>>>
>> AFAICT the goal behind the libdrm_intel fold was to allow rapid and
>> seamless rework of the interface.
>> With a potential goal to make it a shared one, as it gets stabilised.
>>
>> Currently ANV uses more than just the UAPI headers. But if we ignore
>> that, coping them is a bad idea.

What else is anv using from libdrm? (maybe I missed something)

>>
>> Why - adds a, yet another, copy and making synchronisation more
>> annoying. First example - you blindly copied the files rather than
>> using `make headers_install' first ;-)
>> Not to mention that it makes the chicken and egg problem* even more
>> confusing and error prone.

It doesn't feel like that to me. Actually instead of modifying 3 
different repos, you end up modifying just 2.
Sounds less error prone.

>>
>> Emil
>> *  Which patches land first - kernel or userspace
> I don't see how it does that at all.  It simplifies the process: Now you
> send out your proposed new userspace to one repo, instead of two.
>
> And, after the first commit, it'll be obvious when you screw up using
> make headers_install because there will be surprising diff.

Right now we have to update libdrm, then update the mesa to depend on 
the right libdrm to actually get the header files we want.
If you depend on libdrm from more than just uapi headers, it might now 
be too much of a burden. But it seems we're clearly moving away from 
that in anv/i965.
As a developer it feels a lot easier to have just the update mesa with 
both the new kernel API you depend on & the changes to the user space 
driver using that API.

-
Lionel


More information about the mesa-dev mailing list