<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">
<p style="font-size: 12pt;">Hi Emil,</p>
<p style="font-size: 12pt;"><br>
</p>
<p style="font-size: 12pt;">Nice to hear from you.</p>
<div style="color: rgb(0, 0, 0);">
<div style="font-size: 12pt;"><br>
</div>
<font>
<div class="PlainText" style="font-size: 10pt;">On 11 July 2016 at 06:17, Qiang Yu <Qiang.Yu@amd.com> wrote:<br>
> drmGetDevice will always return the first device it find<br>
> under /dev/dri/. This is not true for multi GPU situation.<br>
><br>
How does the following alternative solution sound:<br>
- keep drmFoldDuplicatedDevices as is<br>
- after the drmFoldDuplicatedDevices call use the find_rdev to find<br>
the correct device in local_devices.</div>
<div class="PlainText" style="font-size: 10pt;"><br>
</div>
<div class="PlainText" style="font-size: 10pt;">[yuq] This is also OK. But <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 13.3333px;">drmFoldDuplicatedDevices() has to be changed for the</span></div>
<div class="PlainText" style="font-size: 10pt;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 13.3333px;"><span>drmFreeDevices() in the error handling path: it also exit after see a NULL in the array.</span><br>
</span></div>
<div class="PlainText"><br>
<span style="font-size: 10pt;">> Plus fix the memory leak in error handling path of</span><br>
<span style="font-size: 10pt;">> drmGetDevices.</span><br>
<span style="font-size: 10pt;">></span><br>
<span style="font-size: 10pt;">Unless I'm missing something, there is no memory leak fix below ?</span><br>
<span style="font-size: 10pt;">Alternatively please keep it as separate patch.</span></div>
<div class="PlainText"><span style="font-size: 13.3333px;"><br>
</span></div>
<div class="PlainText"><span style="font-size: 13.3333px;">[yuq] This is fixed at the same time by changing <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 13.3333px;">drmFoldDuplicatedDevices().</span><br>
</span><br>
<span style="font-size: 10pt;">> Change-Id: I2a85a8a4feba8a5cc517ad75c6afb532fa07c53d</span><br>
<span style="font-size: 10pt;">Please drop this line.</span></div>
<div class="PlainText"><span style="font-size: 13.3333px;"><br>
</span></div>
<div class="PlainText"><span style="font-size: 13.3333px;">[yuq] OK.<br>
</span><br>
Regards, </div>
<div class="PlainText">Qiang</div>
</font></div>
</div>
</body>
</html>