freedreno/fdperf: prefer render node
authorRob Clark <robdclark@chromium.org>
Sun, 5 Jul 2020 18:47:15 +0000 (11:47 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 6 Jul 2020 15:08:15 +0000 (15:08 +0000)
Avoid inadvertantly becoming master if fdperf happens to be the first
thing to open the device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5762>

src/freedreno/perfcntrs/fdperf.c

index 83efe2d2b5356f5a2bd3e756803321d6d56b32cb..d53828dc0b6f693b7bccb6bc8fb151ba90854d99 100644 (file)
@@ -295,7 +295,7 @@ find_device(void)
        if (!dev.dtnode)
                errx(1, "could not find qcom,adreno-3xx node");
 
-       fd = drmOpen("msm", NULL);
+       fd = drmOpenWithType("msm", NULL, DRM_NODE_RENDER);
        if (fd < 0)
                err(1, "could not open drm device");