summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_abi16.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: allocate device object for every clientBen Skeggs2017-02-171-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: pass nvif_client to nouveau_gem_new() instead of drm_deviceBen Skeggs2017-02-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: remove device_is_agp callbackDaniel Vetter2017-01-261-1/+1
| | | | | | | | | | | | With that the drm_pci_device_is_agp function becomes trivial, so inline that too. And while at it, move the drm_pci_agp_destroy declaration into drm-internal.h, since it's not used by drivers. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-11-daniel.vetter@ffwll.ch
* drm/nouveau/core: recognise GP100 chipsetBen Skeggs2016-07-141-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rename nouveau_drm.h to nouveau_drv.hBen Skeggs2016-05-201-1/+1
| | | | | | | Fixes out-of-tree build issue where uapi/drm/nouveau_drm.h gets picked up instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/gk104: make use of topology info during gpfifo constructionBen Skeggs2016-03-141-4/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obviousBen Skeggs2016-01-111-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: split out ctxdma interface definitionsBen Skeggs2016-01-111-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: split out fifo interface definitionsBen Skeggs2016-01-111-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: move internal class identifiers to class.hBen Skeggs2016-01-111-8/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/abi16: implement limited interoperability with usif/nvifBen Skeggs2015-11-031-0/+39
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/abi16: introduce locked variant of nouveau_abi16_get()Ben Skeggs2015-11-031-5/+13
| | | | | | | USIF already takes the client mutex, but will need access to ABI16 data in order to provide some limited interoperability. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/abi16: remove unused argument from nouveau_abi16_get()Ben Skeggs2015-11-031-6/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unnecessary usage of object handlesBen Skeggs2015-11-031-12/+5
| | | | | | | No longer required in a lot of cases, as objects are identified over NVIF via an alternate mechanism since the rework. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pci: merge agp handling from nouveau drmBen Skeggs2015-08-281-1/+1
| | | | | | | This commit reinstates the pre-DEVINIT AGP fiddling that was broken in an earlier commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: remove pci/platform_device from common structBen Skeggs2015-08-281-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/object: merge with handleBen Skeggs2015-08-281-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr: convert to new-style nvkm_engineBen Skeggs2015-08-281-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: return min/max versions for supported object classesBen Skeggs2015-08-281-10/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: assign internal class identifiers to sw classesBen Skeggs2015-08-281-15/+61
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: simplify and tidy library interfacesBen Skeggs2015-08-281-80/+54
| | | | | | | | | | | | | | | | | | A variety of tweaks to the NVIF library interfaces, mostly ripping out things that turned out to be not so useful. - Removed refcounting from nvif_object, callers are expected to not be stupid instead. - nvif_client is directly reachable from anything derived from nvif_object, removing the need for heuristics to locate it - _new() versions of interfaces, that allocate memory for the object they construct, have been removed. The vast majority of callers used the embedded _init() interfaces. - No longer storing constructor arguments (and the data returned from nvkm) inside nvif_object, it's more or less unused and just wastes memory. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use dev_* for loggingBen Skeggs2015-08-281-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/tmr: type-safe PTIMER-based delay/wait macrosBen Skeggs2015-08-281-2/+1
| | | | | | | | | | | | These require an explicit struct nvkm_device pointer, unlike the previous macros which take a void *, and work for (almost) anything derived from nvkm_object by using some heuristics. These macros are more general than the previous ones, and can be used to handle PTIMER-based busy-waits (will be used in later devinit fixes) as well as more complicated wait conditions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/tmr: cosmetic changesBen Skeggs2015-08-281-2/+2
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: finalise nvkm namespace switch (no binary change)Ben Skeggs2015-01-221-8/+8
| | | | | | | | | | | | | | | | The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvif: namespace of nvkm accessors (no binary change)Ben Skeggs2015-01-221-5/+5
| | | | | | | | | | NVKM is having it's namespace switched to nvkm_, which will conflict with these functions (which are workarounds for the fact that as of yet, we still aren't able to split DRM and NVKM completely). A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr: rename from graph (no binary change)Ben Skeggs2015-01-221-2/+2
| | | | | | | | | | | | | | | | | | Shorter device name, match Tegra and our existing enums. The namespace of NVKM is being changed to nvkm_ instead of nouveau_, which will be used for the DRM part of the driver. This is being done in order to make it very clear as to what part of the driver a given symbol belongs to, and as a minor step towards splitting the DRM driver out to be able to stand on its own (for virt). Because there's already a large amount of churn here anyway, this is as good a time as any to also switch to NVIDIA's device and chipset naming to ease collaboration with them. A comparison of objdump disassemblies proves no code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: teach nouveau_bo_pin() how to force a contig vram allocationBen Skeggs2014-12-021-1/+1
| | | | | | | | | | | We have the ability to move buffers around in the kernel if necessary, and should probably use it rather than failing if userspace passes us a non-contig buffer for a plane. The NOUVEAU_GEM_TILE_NONCONTIG flag from userspace will become a mere initial placement hint once all the relevant paths have been updated. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core/mm: allow allocation to be confined to a specific slice of heapBen Skeggs2014-09-151-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use ram info from nvif_deviceBen Skeggs2014-08-101-4/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: audit and version fifo channel classesBen Skeggs2014-08-101-2/+2
| | | | | | | | The full object interfaces are about to be exposed to userspace, so we need to check for any security-related issues and version the structs to make it easier to handle any changes we may need in the future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dma: audit and version NV_DMA classesBen Skeggs2014-08-101-5/+8
| | | | | | | | The full object interfaces are about to be exposed to userspace, so we need to check for any security-related issues and version the structs to make it easier to handle any changes we may need in the future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: audit and version NV_DEVICE classBen Skeggs2014-08-101-3/+5
| | | | | | | | The full object interfaces are about to be exposed to userspace, so we need to check for any security-related issues and version the structs to make it easier to handle any changes we may need in the future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use ioctl interface for abi16 gpuobj freeBen Skeggs2014-08-101-3/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use ioctl interface for abi16 ntfy allocBen Skeggs2014-08-101-18/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use ioctl interface for abi16 grobj allocBen Skeggs2014-08-101-33/+44
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove as much direct use of core headers as possibleBen Skeggs2014-08-101-5/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove (most) hardcoded object handle usageBen Skeggs2014-08-101-1/+1
| | | | | | | The PFIFO<->EVO sync buffers will be fixed up later when inter-channel sync in general is improved. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: port to nvif client/device/objectsBen Skeggs2014-08-101-36/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: initial pass at moving to struct nvif_deviceBen Skeggs2014-08-101-30/+35
| | | | | | | This is an attempt at isolating some of the changes necessary to port to NVIF in a separate commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix some usages of the wrong print functionBen Skeggs2014-08-101-1/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: remove NV_D0 familyBen Skeggs2014-08-101-1/+0
| | | | | | | The one place where it mattered has been replaced with a class check, which is more appropriate anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* support for platform devicesAlexandre Courbot2014-03-261-2/+11
| | | | | | | | | | | | | | | | | | | | | Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead of PCI to which Nouveau is tightly dependent. This patch allows Nouveau to handle platform devices by: - abstracting PCI-dependent functions that were typically used for resource querying and page mapping, - introducing a nv_device_is_pci() function that allows to make PCI-dependent code conditional, - providing a nouveau_drm_platform_probe() function that takes a GPU platform device to be probed. Core code as well as engine/subdev drivers are updated wherever possible to make use of these functions. Some older drivers are too dependent on PCI to be properly updated, but all newer code on which future chips may depend should at least be runnable with platform devices. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: support modesetting on GM107Ben Skeggs2014-03-261-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/abi16: fix handles past the 32nd oneIlia Mirkin2014-03-261-2/+2
| | | | | | | abi16->handles is a u64, so make sure to use 1ULL << val when modifying. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: replace ffsll with __ffs64Ilia Mirkin2014-03-261-2/+2
| | | | | | | | | The ffsll function is a lot slower than the __ffs64 built-in which compiles to a single instruction on 64-bit. It's also nice to avoid custom versions of standard functions. Note that __ffs == ffs - 1. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: return offset of allocated notifierBob Gleitsmann2014-01-071-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv10-: we no longer need to create nvsw object on user channelsBen Skeggs2013-11-141-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv10: introduce a new NV_11 card typeIlia Mirkin2013-11-081-0/+1
| | | | | | | | | | | NV11/17/1F/18 come after NV10/15/16/1A. In order to facilitate using numerical comparisons, split up the two sets into different card types. This change should be a no-op except that the relevant cards will see NV11 printed instead of NV10 for the family. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Remove pci_vendor and pci_device from struct drm_deviceVille Syrjälä2013-10-091-2/+2
| | | | | | | | | | We can get the PCI vendor and device IDs via dev->pdev. So we can drop the duplicated information. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud