Commit Graph

170 Commits (75254bf2390c10644ffb35a90fc8f18f196f9f0c)

Author SHA1 Message Date
Rob Clark 9b77443f63 freedreno: add support for FD_MAX_FREQ
Only msm backend supports this.  Sorry, if you are using kgsl, no
time-elapsed query for you.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-12 18:32:22 -05:00
Rob Clark bc5497d061 freedreno: small refactor for get_param
Will simplify next commit.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-12 18:32:22 -05:00
Rob Clark c47385ccda freedreno: update uapi
In drm-next.. needed for time-elapsed (and future perf ctrs) in mesa.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-12 18:32:22 -05:00
Rob Clark 14968e4cf6 freedreno: debug msg cleanup
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-09-19 12:12:27 -04:00
Rob Clark 76a1e97eae freedreno: drop exported dmabuf fd tracking
There is really no reason to keep around the fd, it just consumes an
extra file handle.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-09-19 12:12:04 -04:00
Rob Clark 691d14c9a8 freedreno: don't reuse exported buffers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-09-19 12:11:38 -04:00
Emil Velikov 6a6d668fad freedreno: annotate the device/bo/pipe/ringbuffer funcs as const data
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-04 21:39:06 +01:00
Rob Clark 51b5ca9457 freedreno: add API to get drm fd from fd_device
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-09-04 11:08:04 -04:00
Rob Clark 7d98a93cec freedreno: don't take ownership of the dmabuf fd on import
EGL_EXT_image_dma_buf_import specifies that the importer retains
ownership of the fd, rather then the importee.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-09-03 14:56:02 -04:00
Varad Gautam c3301d0134 freedreno: serialize drmPrimeFDToHandle under table_lock
fixes the prime sharing race condition described by
"intel: Serialize drmPrimeFDToHandle with struct_mutex".

we inline fd_bo_from_handle() into fd_bo_from_dmabuf() and allow locking.

Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-31 11:54:23 -04:00
Varad Gautam cc7db673fa freedreno: use drmPrime wrappers to import/export prime bo's
don't call drmIoctl() directly for prime bo's, use the wrappers instead.

v3: remove struct drm_prime_handle and split locking

Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-31 11:53:53 -04:00
Varad Gautam 1eba47a763 freedreno: get bo size for imported dma-buf
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-23 12:33:45 -04:00
Varad Gautam 425c8e5af7 freedreno: fill bo->fd when importing
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-23 12:33:24 -04:00
Varad Gautam 857c22e5ec freedreno: fix a bo cache segfault with imported bo's
Importing a bo whose handle is still in the bo cache crashes during cleanup.
Remove bo from cache when importing.

Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-23 12:33:09 -04:00
Rob Clark 04a118d800 freedreno: update freedreno-symbol-check
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-18 10:53:56 -04:00
Rob Clark 15ba8768f7 freedreno: add fd_pipe_wait_timeout()
We need to pass through a timeout parameter to implement
pipe->fence_finish() properly.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-08-17 14:23:03 -04:00
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
Alex Deucher 4ee0fa2f37 drm: consolidate common list implementations (v2)
This is used by radeon and freedreno and will be used
by amdgpu.  I looked at switching to libdrm_lists.h,
but it's pretty horrible.  E.g., DRMLISTFOREACHENTRYSAFE.

v2: remove missed list.h from tests/radeon/Makefile.am

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:48 -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 b4a6f50f2a freedreno: link against CLOCK_LIB
Required by clock_gettime()

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-29 17:30:17 +00:00
Emil Velikov 0f8da82500 drm: remove drm_public macro
Some compilers (like the Oracle Studio), require that the function
declaration must be annotated with the same visibility attribute as the
definition. As annotating functions with drm_public is no longer
required just remove the macro.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov 104c895f65 drm: remove no longer needed VISIBILITY_CFLAGS
With earlier commits we've annotated the private symbols, thus
we no longer require the -fvisibility=hidden CFLAGS.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov 42465feb97 drm: rename libdrm{,_macros}.h
Provide a more meaningful name, considering what it does.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +01:00
Emil Velikov 7c7d1f3c9c freedreno: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:18:43 +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
Emil Velikov d9b6a69252 autotools: remove ${srcdir} from the includes
Already handled by the build system.

v2: s/compiler/build system/

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:18:01 +00:00
Emil Velikov ff021215ea android: remove LOCAL_COPY_HEADERS* variables
With earlier changes we've implicitly add the relevant directories
to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.

v2: Update the top Android.mk as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 17:02:56 +00:00
Emil Velikov c277cbdd15 android: remove ${srcdir} from the includes
Already handled by the build system.

v2: s/compiler/build system/. Spotted by Chih-Wei.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:58 +00:00
Emil Velikov af4379f759 android: simplify LOCAL_C_INCLUDES
Each of the libdrm_${hw} modules pull libdrm for linking as such:

libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list.
The former of which is already set to ${top} and ${top}/include/drm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Emil Velikov 24ac8cd7db android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
- Don't add ${hw}/${hw}, but ${hw} to the includes path. The former
does not exist.
 - Set the variable for libkms.

Inspired by the work of from Chih-Wei from the Android-x86 project.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20 16:59:22 +00:00
Chih-Wei Huang 5c1c09e0d2 android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIES
v2: Fold libpciaccess and libdrm into a single local_shared_libraries

Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-23 09:27:49 +00:00
Rob Clark 28662b77ee configure/freedreno: make KGSL support optional
libdrm_freedreno currently supports two backends, 'msm' for the upstream
drm/msm driver, and 'kgsl' which supports (to some extent), the android/
downstream kgsl driver plus a sort of drm shim nonsense to get flink
names.

However, kgsl support is strictly on a best-effort basis.  Different
android devices with different versions of kgsl may have different
abi's.  And the existing kgsl interface (at least the parts of it that
we use) is completely broken for 64bit.  Lets disable it by default lest
anyone actually try to use it.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-01-18 13:18:33 -05:00
Rob Clark 5306078bbe freedreno: do handle lookup on handle and dmabuf import
We also need to check handle_table in the _from_handle() path and the
_from_dmabuf() (which goes through _from_handle()) to avoid duplicate
imports.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-18 12:17:09 -05: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
Emil Velikov 84badffe5e freedreno: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Emil Velikov 268dce4192 automake: pick up all files for distribution.
Autotools is already smart enough to pick the *.pc.in files but it
needs some help with the Android.mk ones.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:34 +01:00
Rob Clark 666788a606 freedreno: add dmabuf import/export helpers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-09-21 22:16:37 -04:00
Emil Velikov 8c2ae16959 freedreno: fd_bo_from_handle() remove duplicate declaration
Already declared in our public header freedreno_drmif.h

Cc: Rob Clark <robclark@freedesktop.org>
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
2014-09-01 16:12:52 +01:00
Emil Velikov a8ce03f35f freedreno: add Android build support
v2 Rename the headers variable(s) to *_H_FILES.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:02 +01:00
Emil Velikov 4255d3d51d libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources
Will be used to consolidate the required sources lists as well as the
install-able headers. This is turn will help us to avoid the
duplication with the upcoming Android build support.

v2: Rename the headers variable to *_H_FILES.
v3: Rebase on top of symbol visibility patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Maarten Lankhorst 479b6cef70 freedreno: Use symbol visibility.
Hiding fd_device_del_locked, and fd_cleanup_bo_cache.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-08-14 21:59:19 +02: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 e6ec4c8851 freedreno: add missing fxn prototype
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-04-25 14:53:48 -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
Emil Velikov 230389a0d7 freedreno: do not leak drmVersion
Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-03-16 10:46:25 -04:00
Rob Clark ee8c9a1383 freedreno/kgsl: don't even bother trying CREATE_FD
Don't even bother trying DRM_KGSL_GEM_CREATE_FD.  It hasn't worked since
(afaict) 2.6.35 kernels.  And in some cases seems to cause some
problems.  Instead just allocate a minimum size dummy object (just for
purposes of having a handle) and then mmap the framebuffer as user-mem
(which is deprecated, but seems to still work.. and as far as I can tell
is the best option for now).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-03-05 10:35:41 -05:00
Rob Clark cd1996470a freedreno: fix null ptr in error path
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-03-05 09:40:19 -05:00
Rob Clark 5a3324638b freedreno: simplify device creation
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-03-05 09:39:35 -05: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 8279c8fb49 freedreno: add fd_device_new_dup()
There seem to be some cases (I've noticed this switching resolution in
some games, for example) where the fd can get closed() before the device
and all it's bo's are destroyed.  Which, if the drm device is opened
again and bo's are allocated with the same handles, results that when
the first pipe_screen/pipe_context is destroyed causes the first dev to
close handles for bo's allocated by the second device.

The easy solution to that is to add a mode where the fd_device creates
it's own private fd (a dup()).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-12 09:00:51 -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
Rob Clark b6caecfa90 freedreno/kgsl: fix crash introduced w/ bo-cache
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-01-07 11:33:54 -05:00
Rob Clark 068ea68b3f freedreno: add bo cache
Workloads which create many transient buffers cause significant CPU
overhead in buffer allocation, zeroing, cache maint, and mmap setup.
By caching and re-using existing buffers, the CPU overhead drops
significantly.  See:

http://bloggingthemonkey.blogspot.com/2013/09/freedreno-update-moar-fps.html

A simple time based policy is used for purging the cache.  Once the
kernel supports it, we could use madvise style API to handle memory
pressure scenarios a bit better.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-12-13 15:48:10 -05:00
Rob Clark b6da447c04 freedreno: add missing NOSYNC flag
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-11 15:55:59 -04:00
Emil Velikov db6a1b07d0 freedreno: set automake options to include subdir-objects
Handles automake complains about lack of forward-compatibility, due to the
source files in the kgsl and msm backends/folders.

Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-08-30 11:37:14 -04: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
Rob Clark b2b1885dfc freedreno: support either kgsl or msm
Split out common code and backend.  Current backend is for 'kgsl'
android driver, but a new backend will provide support for the
upstream msm drm/kms driver.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-08-28 15:50:15 -04:00
Rob Clark 3586337f37 freedreno: also remove from name table on bo delete
When adding the name tracking, I missed removing from the name table
when the bo was deleted, leaving a dangling pointer.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-05-17 16:13:02 -04:00
Rob Clark acfbf394a9 freedreno: add some asserts
Things are worse if we issueibcmds with bogus gpu ptrs, so it is better
to just make userspace crash when things go pear shaped.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-05-15 15:34:15 -04:00
Rob Clark 0b89e2730c freedreno: add handle and name tracking
Due to the evil userspace buffer tracking we have to do, and hacks for
creating GEM buffer from fbdev/scanout, "evil-twin" fd_bo objects are
problematic.  So introduce hashtable tracking of bo's and dev's, to
avoid getting duplicate fd_bo ptrs for the same underlying gem object,
in particular when importing via flink name.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-05-15 15:34:15 -04:00
Rob Clark b3a3a77823 freedreno: add synchronization between mesa and ddx
Super-cheezy way to synchronization between mesa and ddx..  the
SET_ACTIVE ioctl gives us a way to stash a 32b # w/ a GEM bo, and
GET_BUFINFO gives us a way to retrieve it.  We use this to stash
the timestamp of the last ISSUEIBCMDS on the buffer.

To avoid an obscene amount of syscalls, we:
 1) Only set the timestamp for buffers w/ an flink name, ie.
    only buffers shared across processes.  This is enough to
    catch the DRI2 buffers.
 2) Only set the timestamp for buffers submitted to the 3d ring
    and only check the timestamps on buffers submitted to the
    2d ring.  This should be enough to handle synchronizing of
    presentation blit.  We could do synchronization in the other
    direction too, but that would be problematic if we are using
    the 3d ring from DDX, since client side wouldn't know this.

The waiting on timestamp happens before flush, and setting of
timestamp happens after flush.  It is transparent to the user
of libdrm_freedreno as all the tracking of buffers happens via
_emit_reloc()..

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-04-25 17:33:59 -04:00
Rob Clark 86709ba537 freedreno: add gpu-id property
Gallium driver will need to query this to figure out whether to load the
a2xx or a3xx driver.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-04-22 14:49:28 -04:00
Rob Clark e5d8a9c1d6 freedreno: add shifted reloc
Needed for RB_COPY_DEST_BASE register on a3xx.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2013-04-13 08:13:57 -04:00
Maarten Lankhorst 99105e765c makefiles: Add missing headers.
I even compile time tested this on a panda with make dist!

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2013-03-27 14:06:56 +01:00
Rob Clark 41fc2cc8a9 freedreno: add freedreno DRM
The libdrm_freedreno helper layer for use by xf86-video-freedreno,
fdre (freedreno r/e library and tests for driving gpu), and eventual
gallium driver for the Adreno GPU.  This uses the msm gpu driver
from QCOM's android kernel tree.

Note that current msm kernel driver is a bit strange.  It provides a
DRM interface for GEM, which is basically sufficient to have DRI2
working.  But it does not provide KMS.  And interface to 2d and 3d
cores is via different other devices (/dev/kgsl-*).  This is not
quite how I'd write a DRM driver, but at this stage it is useful for
xf86-video-freedreno and fdre (and eventual gallium driver) to be
able to work on existing kernel driver from QCOM, to allow to
capture cmdstream dumps from the binary blob drivers without having
to reboot.  So libdrm_freedreno attempts to hide most of the crazy.
The intention is that when there is a proper kernel driver, it will
be mostly just changes in libdrm_freedreno to adapt the gallium
driver and xf86-video-freedreno (ignoring the fbdev->KMS changes).

So don't look at freedreno as an example of how to write a libdrm
module or a DRM driver.. it is just an attempt to paper over a non-
standard kernel driver architecture.

v1: original
v2: hold ref's to pending bo's (because qcom's kernel driver doesn't),
    various bug fixes, add ringbuffer markers so we can emit IB's to
    portion of ringbuffer (so that gallium driver can use a single
    ringbuffer for both tile cmds and draw cmds.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-02-14 12:13:15 -05:00