Re: [igt-dev] [PATCH i-g-t 4/9] i915: Start putting the mmio_base to wider use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/11/2019 14:11, Chris Wilson wrote:
Quoting Lionel Landwerlin (2019-11-21 12:04:42)
On 13/11/2019 14:52, Chris Wilson wrote:
Several tests depend upon the implicit engine->mmio_base but have no
means of determining the physical layout. Since the kernel has started
providing this information, start putting it to use.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
   lib/i915/gem_engine_topology.c | 84 ++++++++++++++++++++++++++++++++++
   lib/i915/gem_engine_topology.h |  5 ++
   tests/i915/gem_ctx_shared.c    | 38 +++++----------
   tests/i915/gem_exec_latency.c  | 17 ++++---
   4 files changed, 111 insertions(+), 33 deletions(-)

diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index 790d455ff..bd200a4b9 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -21,7 +21,12 @@
    * IN THE SOFTWARE.
    */
+#include <fcntl.h>
+#include <unistd.h>
+
   #include "drmtest.h"
+#include "igt_sysfs.h"
+#include "intel_chipset.h"
   #include "ioctl_wrappers.h"
#include "i915/gem_engine_topology.h"
@@ -337,3 +342,82 @@ bool gem_engine_is_equal(const struct intel_execution_engine2 *e1,
   {
       return e1->class == e2->class && e1->instance == e2->instance;
   }
+
+static int descend(int dir, const char *path)
+{
+     int fd;
+
+     fd = openat(dir, path, O_RDONLY);
+     close(dir);
+
+     return fd;
+}
+

Not sure I understand what file the function below is supposed to parse.

Is that /sys/kernel/debug/dri/0/i915_engine_info?
/sys/class/drm/card0/engine/*/mmio_base
-Chris

But that's not in drm-tip right?

-Lionel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux