Mesa (master): freedreno/fdperf: use drmOpen()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 9 21:32:33 UTC 2019


Module: Mesa
Branch: master
Commit: dc791d3c684ed97668dce74a222d306a4e22ae83
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc791d3c684ed97668dce74a222d306a4e22ae83

Author: Rob Clark <robdclark at chromium.org>
Date:   Mon Dec  9 13:08:33 2019 -0800

freedreno/fdperf: use drmOpen()

Signed-off-by: Rob Clark <robdclark at chromium.org>

---

 src/freedreno/perfcntrs/fdperf.c    | 3 ++-
 src/freedreno/perfcntrs/meson.build | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c
index 058456a7b51..afebc3830df 100644
--- a/src/freedreno/perfcntrs/fdperf.c
+++ b/src/freedreno/perfcntrs/fdperf.c
@@ -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");
 
diff --git a/src/freedreno/perfcntrs/meson.build b/src/freedreno/perfcntrs/meson.build
index ae607eb0414..365af44a113 100644
--- a/src/freedreno/perfcntrs/meson.build
+++ b/src/freedreno/perfcntrs/meson.build
@@ -53,6 +53,7 @@ if dep_libconfig.found() and dep_ncurses.found()
     ],
     dependencies : [
       dep_libconfig,
+      dep_libdrm,
       dep_ncurses,
       idep_mesautil,
     ],




More information about the mesa-commit mailing list