Re: [PATCH][libdrm] drm: Fix multi GPU drmGetDevice return wrong device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Emil,


Nice to hear from you.


On 11 July 2016 at 06:17, Qiang Yu <Qiang.Yu@xxxxxxx> 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
> drmGetDevices.
>
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.

[yuq] OK.

Regards,
Qiang
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux