[PATCH 1/5] drm: add interface to get drm devices on the system v2

Emil Velikov emil.l.velikov at gmail.com
Fri Aug 14 01:35:20 PDT 2015


On 14 August 2015 at 06:53, Zhou, Jammy <Jammy.Zhou at amd.com> wrote:
> Hi Emil,
>
>> If there are any other devices they will still be counted when drmGetDevices(NULL, 0)... Is that intentional ?
> Yes, I think so, so that this interface can support different kinds of devices in the future. For example, we have some ARM platforms supporting PCIE, in which case we can connect one PCIE graphics card, then there will be one GPU with the platform bus (integrated GPU in the ARM SOC), and one discrete GPU on the PCIE bus.
>
What is the point in claiming that you have X+Y devices, if the API
does not provide any information about Y of them ? It seems very
misleading imho.

>> Something funny is happening here - on my intel system vendor_id is reported as 0xff86, instead of 0x8086. Subvendor/device are also messed up - ffaa and ffda instead of 17aa + 21da.
> That's really interesting. Did you try to update the system BIOS?
>
Seems like a C Programming 101 issue to me rather than a BIOS one.The
(signed) char 0x86 gets extended/promoted to 0xff86 and then all hell
breaks loose. Adding typecast(s) should fix it. That does not excuse
me from writing is so weird from the start :)

Thanks for tweaking/ironing the bugs out.
Emil


More information about the dri-devel mailing list