dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Device enumeration support in libdrm
@ 2015-07-08  5:53 Zhou, Jammy
  2015-07-08 16:24 ` Emil Velikov
  0 siblings, 1 reply; 5+ messages in thread
From: Zhou, Jammy @ 2015-07-08  5:53 UTC (permalink / raw)
  To: Emil Velikov; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 942 bytes --]

Hi Emil,

With our previous RFC patches to add interfaces to support GPU device enumeration support in libdrm, the udev mechanism was used. But we found that if we introduce the libudev dependency for libdrm, there will be some problem to run steam application on recent distributions (for example, Ubuntu 14.04 LTS) because of the conflict between the system libudev.so.1 (loaded by libdrm) and the libudev.so.0 (bundled in steam-runtime and loaded by steam application). There are some similar issues as mentioned in the links below. Although we can argue that it is application's problem, can we get rid of libudev for the device enumeration before Valve can make steam-runtime use system libraries by default? It is much appreciated if you can give some suggestions about how we can support device enumeration with libdrm.

https://wiki.debian.org/Steam
https://github.com/ValveSoftware/steam-runtime/issues/13

Regards,
Jammy


[-- Attachment #1.2: Type: text/html, Size: 3275 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Device enumeration support in libdrm
  2015-07-08  5:53 Device enumeration support in libdrm Zhou, Jammy
@ 2015-07-08 16:24 ` Emil Velikov
  2015-07-09  2:26   ` Zhou, Jammy
  0 siblings, 1 reply; 5+ messages in thread
From: Emil Velikov @ 2015-07-08 16:24 UTC (permalink / raw)
  To: Zhou, Jammy; +Cc: dri-devel

Hello Jammy,

On 8 July 2015 at 06:53, Zhou, Jammy <Jammy.Zhou@amd.com> wrote:
> Hi Emil,
>
>
>
> With our previous RFC patches to add interfaces to support GPU device
> enumeration support in libdrm, the udev mechanism was used. But we found
> that if we introduce the libudev dependency for libdrm, there will be some
> problem to run steam application on recent distributions (for example,
> Ubuntu 14.04 LTS) because of the conflict between the system libudev.so.1
> (loaded by libdrm) and the libudev.so.0 (bundled in steam-runtime and loaded
> by steam application). There are some similar issues as mentioned in the
> links below. Although we can argue that it is application’s problem, can we
> get rid of libudev for the device enumeration before Valve can make
> steam-runtime use system libraries by default? It is much appreciated if you
> can give some suggestions about how we can support device enumeration with
> libdrm.
>
I believe I mentioned it before, perhaps I wasn't clear enough. Rather
than using libudev, manually iterate through sysfs. I agree it's not a
not pretty solution yet the libdrm code already has much weirder
stuff.

Cheers
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Device enumeration support in libdrm
  2015-07-08 16:24 ` Emil Velikov
@ 2015-07-09  2:26   ` Zhou, Jammy
  2015-07-10 17:56     ` Emil Velikov
  0 siblings, 1 reply; 5+ messages in thread
From: Zhou, Jammy @ 2015-07-09  2:26 UTC (permalink / raw)
  To: Emil Velikov; +Cc: dri-devel

Although I don't like the method of manually iterating sysfs, it seems the last resort if we want to avoid introducing libudev dependency.

Besides, you mentioned that you would spend some time on the device enumeration interface, do you have some chance to look at it?

Regards,
Jammy

-----Original Message-----
From: Emil Velikov [mailto:emil.l.velikov@gmail.com] 
Sent: Thursday, July 09, 2015 12:25 AM
To: Zhou, Jammy
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Device enumeration support in libdrm

Hello Jammy,

On 8 July 2015 at 06:53, Zhou, Jammy <Jammy.Zhou@amd.com> wrote:
> Hi Emil,
>
>
>
> With our previous RFC patches to add interfaces to support GPU device 
> enumeration support in libdrm, the udev mechanism was used. But we 
> found that if we introduce the libudev dependency for libdrm, there 
> will be some problem to run steam application on recent distributions 
> (for example, Ubuntu 14.04 LTS) because of the conflict between the 
> system libudev.so.1 (loaded by libdrm) and the libudev.so.0 (bundled 
> in steam-runtime and loaded by steam application). There are some 
> similar issues as mentioned in the links below. Although we can argue 
> that it is application’s problem, can we get rid of libudev for the 
> device enumeration before Valve can make steam-runtime use system 
> libraries by default? It is much appreciated if you can give some 
> suggestions about how we can support device enumeration with libdrm.
>
I believe I mentioned it before, perhaps I wasn't clear enough. Rather than using libudev, manually iterate through sysfs. I agree it's not a not pretty solution yet the libdrm code already has much weirder stuff.

Cheers
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Device enumeration support in libdrm
  2015-07-09  2:26   ` Zhou, Jammy
@ 2015-07-10 17:56     ` Emil Velikov
  2015-07-23 16:50       ` Emil Velikov
  0 siblings, 1 reply; 5+ messages in thread
From: Emil Velikov @ 2015-07-10 17:56 UTC (permalink / raw)
  To: Zhou, Jammy; +Cc: dri-devel

On 9 July 2015 at 03:26, Zhou, Jammy <Jammy.Zhou@amd.com> wrote:
> Although I don't like the method of manually iterating sysfs, it seems the last resort if we want to avoid introducing libudev dependency.
>
I have the same feeling, so if anyone can come with an better solution
I'm all ears.

> Besides, you mentioned that you would spend some time on the device enumeration interface, do you have some chance to look at it?
>
Not really bth. Waiting for a month someone to ack the revert inspired
me to push this at the bottom on my list. Now that there is some
interest I'll bring it back up.

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Device enumeration support in libdrm
  2015-07-10 17:56     ` Emil Velikov
@ 2015-07-23 16:50       ` Emil Velikov
  0 siblings, 0 replies; 5+ messages in thread
From: Emil Velikov @ 2015-07-23 16:50 UTC (permalink / raw)
  To: Zhou, Jammy; +Cc: dri-devel

Dropping dri-devel for a second.

Hi Jammy,

On 10 July 2015 at 18:56, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 9 July 2015 at 03:26, Zhou, Jammy <Jammy.Zhou@amd.com> wrote:
>> Although I don't like the method of manually iterating sysfs, it seems the last resort if we want to avoid introducing libudev dependency.
>>
> I have the same feeling, so if anyone can come with an better solution
> I'm all ears.
>
>> Besides, you mentioned that you would spend some time on the device enumeration interface, do you have some chance to look at it?
>>
> Not really bth. Waiting for a month someone to ack the revert inspired
> me to push this at the bottom on my list. Now that there is some
> interest I'll bring it back up.
>
I've been looking at this over the last few days, aiming for a
compatible solution and it has been proving a bit annoying. Mostly due
to the way any platform devices interact with the UNIQUE ioctls.

Namely the goal is to have drmGetDevices() provide bus information
that can be used with conjunction with drmOpen and (optionally)
drmGetBusid.

Can you help me out, understand how you're going to be using this,
such that I don't butcher things.
In what formal should the bus information be - are your intentions
solely on feeding that to drmOpen() or is the user going to do
something with it ?

Would providing the vendor/device id (via drmGetDevices) suffice or
you guys need the sub{vendor,device} rev as well ?


Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-23 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08  5:53 Device enumeration support in libdrm Zhou, Jammy
2015-07-08 16:24 ` Emil Velikov
2015-07-09  2:26   ` Zhou, Jammy
2015-07-10 17:56     ` Emil Velikov
2015-07-23 16:50       ` Emil Velikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).