Hi Qiang Yu, Thanks for fixing my buggy code (yet again) :-) 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. > Plus fix the memory leak in error handling path of > drmGetDevices. > Unless I'm missing something, there is no memory leak fix below ? Alternatively please keep it as separate patch. > Change-Id: I2a85a8a4feba8a5cc517ad75c6afb532fa07c53d Please drop this line. Regards, Emil