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

Emil Velikov emil.l.velikov at gmail.com
Fri May 5 15:26:31 UTC 2017


On 4 May 2017 at 17:27, Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> On Thu, May 4, 2017 at 7:26 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 27 April 2017 at 16:20, Eric Anholt <eric at anholt.net> 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.
>>>>
>>>> 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.
>>>>
>>>> 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.
>>>
>> Funny that you should say that. On my count there's 4 instances of the
>> VC4 headers - one in kernel and 3 in different userspace components.
>> With each one subtly different from the rest.
>
> You're making this seem a lot worse than it is. It's not like these
> header files are actively developed in 4 different projects. There's
> exactly one canonical source for these headers with a well established
> development process: the kernel. The fact that the headers are
> different just means that the various userspace components have copied
> the kernel headers at different times as they implemented new features
> on different schedules. I'm sure you understand this.
>
Yes, I tend to be more of a risk adverse/paranoid than others.
As many of my pessimistic examples became true, it's a bit hard to
become more of a glass full person ;-)

> I think it's pretty simple: requiring i965 or anv to link to libdrm
> just for the ioctl wrapper and the header file which comes from the
> kernel makes little sense.
>
There's more to it than the ioctl wrappers...  seems like you're
spotted in another reply.

-Emil


More information about the mesa-dev mailing list