Commit Graph

14 Commits (4413f191a051847c53a6150df199d35a106b6cf4)

Author SHA1 Message Date
Rob Clark 4413f191a0 freedreno/msm: dump out submit info on error
User should only see these with LIBGL_DEBUG=verbose.  But in case you
are hitting issues like "handle X at index Y already on submit list"
errors from the kernel, this gives some useful visibility for debug.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-17 10:35:08 -04:00
Rob Clark 9e34ee4f75 freedreno/msm: fix issue where same bo is on multiple rings
It should be a less common case, but it is possible for a single bo to
be on multiple rings, for example when sharing a buffer across multiple
pipe_context's created from same pipe_screen.

So rather than completely fall over in this case, fallback to slow-path
of looping over all bo's in the ring's bo-table (but retain the fast-
path of constant-lookup for the first ring the buffer is on).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-17 10:35:08 -04:00
Rob Clark 2fa58ef8f4 freedreno/msm: reorg ringbuffer struct
Group the parts related to building out submit ioctl into their own
sub-struct.  Split out from next commit since it is just boring churn.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-17 10:10:34 -04:00
Emil Velikov ea1786416c freedreno: zero is a valid fd number, treat it as such
Abeit quite unlikely to get hit by this bug here, let just fix it.

v2: Correct conditional (do not call ioctl(DRM_IOCTL_PRIME_HANDLE_TO_FD)
when we already have the fd).
v3: Fix kgsl_pipe.c, suggested by Thierry.

Cc: freedreno@lists.freedesktop.org
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
2015-07-16 16:41:38 +01:00
Emil Velikov 44e9a0258a freedreno: annotate the private symbols
They are less and easier to track than the public ones. The macro
drm_public will be going away by the end of the series.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:18:43 +01:00
Rob Clark c09dcbc736 fix compile error on 32bit systems
4c2766b (drm_mmap/drm_unmap) brought this error for every .c file that
was not #including config.h:

  In file included from private.h:4:0,
                   from abi16.c:29:
  ../libdrm.h: In function 'drm_munmap':
  ../libdrm.h:81:4: error: size of unnamed array is negative

Signed-off-by: Rob Clark <robdclark@gmail.com>
2014-09-28 14:30:07 -04:00
Rob Clark 56d170bc06 freedreno: add chip-id property
Userspace needs to know the patch-revision in addition to just the
gpu-id (ie. 320, 305, etc).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-06-18 10:42:07 -04:00
Rob Clark 09db8019da freedreno: sync kernel header
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-06-18 09:42:11 -04:00
Rob Clark 1cb5fc706c freedreno: zero out unused field
Since realloc() doesn't zero-init.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-03-19 10:12:18 -04:00
Rob Clark c5de5abbd9 freedreno: some msm-ring reset/flush fixes
Need to update timestamp on all ring's associated with a submit (ie.
both the binning pass and main ring).  Also, make sure nr_reloc's
in particular gets cleared if the rb is reset.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-02-19 11:47:40 -05:00
Rob Clark 128e74cf64 freedreno: fix license
The userspace headers were intended to be BSD license.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-31 11:58:30 -05:00
Rob Clark 9fa22a845b freedreno: allow IB to different ringbuffer
Allow IB to different ringbuffer in addition to just different part of
same ringbuffer.  In particular, we need to add bo's to the parent (ie.
one passed to flush) bo table, since the bo table applies to all the
cmd buffers in submit ioctl.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-07 11:33:54 -05:00
Emil Velikov 126c45828a freedreno: use local drm.h over the system one
Otherwise build will fail, as drm/drm.h is not available.

Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-08-30 11:37:14 -04:00
Rob Clark f17d417e28 freedreno: add support for msm drm
This adds support for the "msm" backend, using the upstream msm drm/kms
driver.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-08-28 15:51:04 -04:00