Age | Commit message (Collapse) | Author |
|
write_header() uses addr_bits, so do the initialization earlier.
Also set the gen to a non-zero value in case of unknown device,
for use by a later patch.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
|
|
GCC will warn about ISO C90 forbidding to mix declarations and code.
Declare the variable at the beginning of the function to suppress the
warning.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
v2:
* Use 48-bit rather than 64-bit (Ken)
* Use 'addr_bits' rather than 'use_64bit'
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
Some distros (such as Gentoo) are removing the include of
sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in
files where we use the minor() and major() functions.
Signed-off-by: James Ausmus <james.ausmus@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The batch is now on the other end of the list.
Fixes issues where modern Mesa and modern kernels together start putting
the batch at the front of the list, and intel_aubdump looks for it at
the end of the list, causing it to interpret some other buffer as the
batch. Then AubLoad or aubinator see bogus data like 1.0 float as a
GPU command and get grumpy.
|
|
We are, the build system takes care of that.
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
|
|
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
This is required for the supports_48b_addresses check in the Vulkan
driver to work without messing up the resulting aub.
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
Each Linux distro takes a different spin on providing kernel's uapi
headers (especialy the *drm*.h).
You can get them with linux-headers, you can get them with libdrm.
Sometime you can even get them twice, from both sources.
Sometimes the headers match your kernel version, sometimes you end up
stuck with headers matching the kernel that the given release of the
distro came out with.
This makes things harder for code that does not depend on libdrm, as we
cannot have sane ./configure-time checks.
So let's define LOCAL_ version for FENCE and EXECBUFFER2_WB defines
until all the stable distros catch up (+/- some epsilon).
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
A gem handle of 0 can be used to check for whether or not 48-bit
addressing is available. This keeps aubdump from failing on you if
you try to do the check.
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
|
|
|
|
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This will help with identifying aub files
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
This reverts commit c6191a41f6c858cbdd4280e9ffcc91170e87ebeb. It turns out
that having a GTT that large causes the simulator massive headaches.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
Gen8+ have 64 bit GTT entries, so we need to allocate twice as much
space for the GTT table in order to cover the same number of GTT
pages. Fixes sporadic page-fault crashes on the simulator.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
|
|
aubdump was only writing 32-bits regardless of platform. This is fine if
the client being dumped leaves the top 32 bits zero since the aubdump GTT
is fairly small. However, if the client does store something in the upper
32 bits, this results in an invalid relocation.
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
|
|
This comes handy if you want to look at your application output without
having to save it into a file. For example, use this with aubinator from
Mesa :
$ intel_aubdump -c '/path/to/aubinator --gen=hsw' my_gl_app
v2: Fix handling empty command line option
v3: Fix command line concatenation (again...)
v4: Use execvp (Petri)
Indentation (Petri)
Allow recording to a file and stream to an external application (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
|
|
This makes parsing options less complicated and easier to extend.
v2: Fix device id parsing (atoi -> sscanf) (Sirisha)
Combine with previous commit moving init function (Sirisha)
v3: Fix behavior change between bash 4.3 & 4.4 in <<< with \n characters
(Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
|
|
|
|
|
|
We'll use this instead of accessing the bo array directly and add a few
sanity checks.
|
|
This doesn't seem to work when mixed with constructors in other shared
objects or other creative uses of the linker. Let's stick with a simpler
mechanism, where we look up the libc functions when our hooks are called
for the first time.
|
|
|
|
This prevents the simulator from barfing when it sees commands from another
ring. I've been using this locally for a very long time.
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
|
|
A gcc extension allows void pointer arithmetic by treating the size of
void as 1, but this generates a warning when -Wpointer-arith is used.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
We have to defer figuring out the gen until we have a PCI ID, which we
don't have for sure until the first execbuffer2 ioctl. We can't write
the file header until we have the gen since we need to know the size of
offsets in the file format. Move the call to write_header() into the
dump_execbuffer2() where we have the gen.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
Put 48 bit block offsets in the AUB file and track the bo offsets with
uint64_t.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
Instead of doing an extra getparam ioctl to discover the PCI ID, we
can snoop it when the application queries it.
Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
|
|
DRI3 passes the drm fd over X protocol and as such we can't rely on
hooking open to discover the drm fd. Instead we look for drm ioctl
codes in the ioctl wrapper. If we don't have a drm fd and see
something that looks like a drm ioctl, we stat the fd to see if it's a
drm fd. If it is, we save it for later so we don't have to do an
extra stat on every ioctl. We can then drop the open wrapper, but we
keep the close wrapper so we can invalidate our cached drm_fd if it's
closed.
Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
|
|
pkg-config adds /usr/include/libdrm to the include path so we only need i915_drm.h
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
This lets us capture AUB traces for platforms different from the one
we're running on.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
Oops, we obviously also need to define the argument struct for userptr.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
Fix compile error on older kernels.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|
|
This does everything the aub dump functionality in libdrm does, but
without being part of libdrm. This moves the very developer oriented
functionality out of core libdrm and adds some flexibility in how we
activate it (we can specify filename, for example). Most importantly,
this lets us dump aub files for tools and/or drivers that don't use
libdrm, without having to add that code to each of those projects.
The tool is used much like strace or valgrind. For example:
$ intel_aubdump -v --output=stuff.aub -- glxgears -geometry 500x500
will launch glxgears with its options and enable aub dumping and pass
the -v and --output=stuff.aub options to the aub dumper.
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
|