Age | Commit message (Collapse) | Author |
|
|
|
|
|
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>
|