[PATCH][libdrm] drm: Fix multi GPU drmGetDevice return wrong device
Qiang.Yu at amd.com
Wed Jul 13 10:17:29 UTC 2016
Nice to hear from you.
On 11 July 2016 at 06:17, Qiang Yu <Qiang.Yu at amd.com> wrote:
> drmGetDevice will always return the first device it find
> under /dev/dri/. This is not true for multi GPU situation.
How does the following alternative solution sound:
- keep drmFoldDuplicatedDevices as is
- after the drmFoldDuplicatedDevices call use the find_rdev to find
the correct device in local_devices.
[yuq] This is also OK. But drmFoldDuplicatedDevices() has to be changed for the
drmFreeDevices() in the error handling path: it also exit after see a NULL in the array.
> Plus fix the memory leak in error handling path of
Unless I'm missing something, there is no memory leak fix below ?
Alternatively please keep it as separate patch.
[yuq] This is fixed at the same time by changing drmFoldDuplicatedDevices().
> Change-Id: I2a85a8a4feba8a5cc517ad75c6afb532fa07c53d
Please drop this line.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amd-gfx