freedreno/fdperf: use drmOpen()
authorRob Clark <robdclark@chromium.org>
Mon, 9 Dec 2019 21:08:33 +0000 (13:08 -0800)
committerRob Clark <robdclark@chromium.org>
Mon, 9 Dec 2019 21:09:58 +0000 (13:09 -0800)
Signed-off-by: Rob Clark <robdclark@chromium.org>
src/freedreno/perfcntrs/fdperf.c
src/freedreno/perfcntrs/meson.build

index 058456a7b5168e2300b10efe844b9948747f7a23..afebc3830df1e2ecc76cb9c10bf75cea8634fdd3 100644 (file)
@@ -40,6 +40,7 @@
 #include <curses.h>
 #include <libconfig.h>
 #include <inttypes.h>
+#include <xf86drm.h>
 
 #include "drm/freedreno_drmif.h"
 #include "drm/freedreno_ringbuffer.h"
@@ -327,7 +328,7 @@ find_device(void)
        if (!dev.dtnode)
                errx(1, "could not find qcom,adreno-3xx node");
 
-       fd = open("/dev/dri/card0", O_RDWR);
+       fd = drmOpen("msm", NULL);
        if (fd < 0)
                err(1, "could not open drm device");
 
index ae607eb0414ba4735ec8c85b934e795cf3727960..365af44a113f747041c31af01b90a01b0cf6c656 100644 (file)
@@ -53,6 +53,7 @@ if dep_libconfig.found() and dep_ncurses.found()
     ],
     dependencies : [
       dep_libconfig,
+      dep_libdrm,
       dep_ncurses,
       idep_mesautil,
     ],