Commit Graph

14 Commits (3c04686ae5427df4b34580f3709859d4d73028fb)

Author SHA1 Message Date
Eric Engestrom 0926f0af54 meson,configure: include config.h automatically
This will prevent any more missing `#include "config.h"` bug, at the
cost of having to recompile some files that didn't need to be when
changing build options.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-20 18:19:26 +00:00
Ben Skeggs 4291eea18f nouveau: add support for newer kernel interfaces
v2.
- leave client-provided pointer unmodified on sclass_get() failure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22 13:22:35 +10:00
Ben Skeggs 4283e3f656 nouveau: make use of nouveau_drm::fd instead of nouveau_device::fd
The latter is deprecated, and will not be valid for newer clients.

v2.
- split out nouveau_object_find removal

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22 13:22:28 +10:00
Ben Skeggs f6b1b5b7c9 nouveau: add interfaces to query information about supported classes
This will expose functionality supported by newer kernel interfaces.

Current userspace uses the chipset to determine which classes are likely
exposed, which generally works pretty well, but isn't as flexible as it
could be.

Unfortunately, the G98:GF100 video code in Mesa is still relying on the
kernel exposing incorrect vdec classes on some chipsets.  The ABI16
kernel interfaces have a workaround for this in place, but that will no
longer be available once libdrm supports NVIF.

To prevent a regression when NVIF support is added, if there's no kernel
support for NVIF, libdrm will magic up a class list containing correct
vdec classes anyway instead of failing with -ENODEV.

v2.
- add description of abi16/vdec workaround
- add description of sclass/mclass
- leave client-provided pointer unmodified on abi16_sclass() failure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22 13:22:14 +10:00
Ben Skeggs 4a3cbf5c0a nouveau: move more abi16-specific logic into abi16.c
v2.
- add a comment about the (ab)use of nouveau_object::length
- add a comment about abi16_object() return values
v3.
- handle new client + old kernel for sw classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22 13:21:56 +10:00
Emil Velikov a9e5880b3e nouveau: use designated initializers
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-04 21:39:06 +01:00
Alexandre Courbot a1acffd4e0 nouveau: add coherent BO attribute
Add a flag allowing Nouveau to specify that an object should be coherent
at allocation time. This is required for some class of objects like
fences which are randomly-accessed by both the CPU and GPU. This flag
instructs the kernel driver to make sure the object remains coherent
even on architectures for which coherency is not guaranteed by the bus.

Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2015-05-21 21:20:29 +03:00
Emil Velikov 76e9799b8a nouveau: 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: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:19:15 +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
Ben Skeggs c41b494c47 nouveau: expose channel engine selection on kepler chipsets
v2: Take Maarten Lankhorst's suggestion of nesting the struct to prevent
    sizeof() issues due to padding on older revisions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2013-01-16 19:48:49 +10:00
Marcin Slusarz 9e0026d35c nouveau: silence some remaining valgrind warnings
Valgrind can't understand some of the fields passed to ioctls are overwritten
by kernel, so we need to initialize them. Almost all of our ioctl wrappers
already do it and the cost of remaining 3 is very small.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
2012-06-09 23:23:32 +02:00
Christoph Bumiller 754655c795 nouveau: expose notifier handle on nvc0 as well
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-24 12:49:58 +10:00
Ben Skeggs 73b9a2881c nouveau: init nvc0 channel alloc req structure fully
Kernel rejects ~0 handles, even though they're not used on NVC0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-17 08:35:43 +10:00
Ben Skeggs 292da616fe nouveau: pull in major libdrm rewrite
Redesigned primarily to allow us to better take advantage of BO's having
fixed GPU virtual addresses on GeForce 8 and up, and to reduce the overhead
of handling relocations on earlier chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
2012-04-14 02:47:23 +10:00