drm: Branch 'master'

[email protected] (Alex Deucher)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 xf86drm.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 70b64073f7d1bf56a30f7a809bd984d3ad688b9f
Author: Qiang Yu <[email protected]>
Date:   Mon Jun 6 12:29:16 2016 -0400

    drm: fix multi GPU drmGetDevices only return one device
    
    When multi GPU present, after drmFoldDuplicatedDevices
    merge same busid deveces, two different devices may be
    seperated by zero in local_devices[]. The for loop
    should check all local_devices instead of exit when
    meet a zero.
    
    Reviewed-by: Jim Qu <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Qiang Yu <[email protected]>

diff --git a/xf86drm.c b/xf86drm.c
index 45aa5fc..4fdcaf8 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -3267,7 +3267,10 @@ int drmGetDevices(drmDevicePtr devices[], int max_devices)
     drmFoldDuplicatedDevices(local_devices, node_count);
 
     device_count = 0;
-    for (i = 0; i < node_count && local_devices[i]; i++) {
+    for (i = 0; i < node_count; i++) {
+	    if (!local_devices[i])
+		    continue;
+
         if ((devices != NULL) && (device_count < max_devices))
             devices[device_count] = local_devices[i];
         else

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.