summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: Split nouveau_fence_syncLauri Peltonen2016-01-156-59/+54
| | | | | | | | | | | | | | | | Split nouveau_fence_sync to two functions: * nouveau_fence_sync, which only adds a fence wait to the channel command stream, and * nouveau_bo_sync, which gets the fences from the reservation object and passes them to nouveau_fence_sync. This factorizes the code in the new nouveau_fence_sync() which was present twice otherwise. Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com> [acourbot@nvidia.com: factorize code some more, fix style] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* drm/nouveau: add GEM_SET_TILING staging ioctlAri Hirvonen2016-01-157-21/+95
| | | | | | | | | | Add new NOUVEAU_GEM_SET_TILING ioctl to set correct tiling mode for imported dma-bufs. This ioctl is staging for now and enabled with the "staging_tiling" module option. Signed-off-by: Ari Hirvonen <ahirvonen@nvidia.com> [acourbot@nvidia.com: carry upstream, many fixes] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* ltc/gm107: wait on relevant bit in gm107_ltc_cbc_waitAlexandre Courbot2016-01-151-4/+2
| | | | | | | | | | | | | | | Patch "ltc/gm107: use nvkm_mask to set cbc_ctrl1" sets the 3rd bit of the CTRL1 register instead of writing it entirely in gm107_ltc_cbc_clear(). As a counterpart, gm107_ltc_cbc_wait() must also be modified to wait on that single bit only, otherwise a timeout may occur if some other bit of that register is set. This happened at least on GM206 when running glmark2-drm. While we are at it, use the more compact nvkm_wait_msec() to wait for the bit to clear. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu: prevent falcon from acking interrupts routed to the hostBen Skeggs2016-01-115-2266/+2252
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* perf: change pcie speed on pstate changeKarol Herbst2016-01-111-0/+3
| | | | | | | v2: remove error and only set link for pcie devices v6: remove check for pcie device Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* perf: add fields for pci speed and width and use it for the pstatesKarol Herbst2016-01-112-0/+5
| | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* bios/perf: parse the pci speed from the bios for tesla and newer cardsKarol Herbst2016-01-112-0/+18
| | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* pci: implement pcie speed change for kepler+Karol Herbst2016-01-111-0/+189
| | | | | | | | v2: rename functions v3: remove pcie2 accessors v6: fix alignement and line width, also remove useless code Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* pci: implement pcie speed change for FermiKarol Herbst2016-01-113-0/+74
| | | | | v5: don't set kepler func pointers v6: fix alignment and line length
* pci: implement pcie speed change for teslaKarol Herbst2016-01-113-0/+120
| | | | | v5: don't set fermi or kepler func pointers v6: fix alignment
* pci: implement generic code for pcie speed changeKarol Herbst2016-01-116-0/+217
| | | | | | | | | | | | v2: rename and group functions v4: change copyright information move printing of pcie speeds into oneinit, rename all pcie functions to nvkm_pcie_* don't try to raise the pcie version when no higher one is supported v5: revert Copyright changes and rename nvkm_pcie_raise_version to nvkm_pcie_set_version v6: remove some useless pci_is_pcie checks and rework messages Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* pci: add gk104 variantKarol Herbst2016-01-114-10/+51
| | | | | | | | v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* pci: add gf106 variantKarol Herbst2016-01-114-5/+46
| | | | | | | | v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* kms: take mode_config mutex in connector hotplug pathBen Skeggs2016-01-111-0/+3
| | | | | | fdo#93634 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau/perfmon: add interface files for current core voltageKarol Herbst2016-01-112-0/+51
| | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* sysfs: remove pstate interfaceKarol Herbst2016-01-115-225/+0
| | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* debugfs: add copy of sysfs pstate interface ported to debugfsKarol Herbst2016-01-111-2/+138
| | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* debugfs: we need a ctrl object for debugfsKarol Herbst2016-01-114-0/+57
| | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* debugfs: rename functions to indicate they are used inside drmKarol Herbst2016-01-113-8/+9
| | | | | | | | We will need our own debugfs_init and cleanup functions, because nouveau_drm isn't ready while the DRM ones are called by DRM. Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* debugfs: add infrastructure to add files with other fops than only readKarol Herbst2016-01-111-3/+53
| | | | | | | v2: use the same object for private data as with the drm debugfs functions Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gf100: remove references to "daemon"Ben Skeggs2016-01-111-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/nv50: remove references to "daemon"Ben Skeggs2016-01-111-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk: remove references to "daemon"Ben Skeggs2016-01-114-8/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100: provide a bit more info for various errorsIlia Mirkin2016-01-111-9/+69
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: parse 8.1 Gbps DP link rateBen Skeggs2016-01-111-4/+7
| | | | | | From DCB 4.1 spec. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc/gm204: split implementation from gm107Ben Skeggs2016-01-116-8/+79
| | | | | | | | Differences from GM10x: - GM20x LTC count detection differs from GM10x - GM20x init doesn't require large page size setting Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc/gm107: use nvkm_mask to set cbc_ctrl1Ben Skeggs2016-01-111-1/+1
| | | | | | resman and nvgpu both do this, presumably for good reason. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ibus/gm204: split implementation from gk104Ben Skeggs2016-01-116-4/+47
| | | | | | GM20x doesn't require the priv ring timeout bumps that GK/GM10x have. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bin: bios depends on pci subdev these daysBen Skeggs2016-01-112-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: subclass nvkm_object to store channel pointerBen Skeggs2016-01-111-0/+28
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: modify nvif_unvers/nvif_unpack macros to be more obviousBen Skeggs2016-01-1146-173/+188
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out client interface definitionsBen Skeggs2016-01-114-13/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out device interface definitionsBen Skeggs2016-01-116-49/+50
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out ctxdma interface definitionsBen Skeggs2016-01-1112-75/+79
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out perfmon interface definitionsBen Skeggs2016-01-115-77/+77
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out device control interface definitionsBen Skeggs2016-01-114-49/+49
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out fifo interface definitionsBen Skeggs2016-01-1123-78/+132
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out display interface definitionsBen Skeggs2016-01-1130-222/+261
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out nvsw interface definitonsBen Skeggs2016-01-117-22/+30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: split out fermi interface definitionsBen Skeggs2016-01-113-54/+53
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvif: move internal class identifiers to class.hBen Skeggs2016-01-1112-33/+30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm107-: make use of gpc_addr() macro for tpc ramchain setupBen Skeggs2016-01-112-170/+167
| | | | | | Should be no functional change here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* instmem/gk20a: use DMA API CPU mappingAlexandre Courbot2016-01-112-98/+62
| | | | | | | | | | | | | | | | | | | | | Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access") tried to be smart while using the DMA-API by managing the CPU mappings of buffers allocated with the DMA-API by itself. In doing so, it relied on dma_to_phys() which is an architecture-private function not available everywhere. This broke the build on several architectures. Since there is no reliable and portable way to obtain the physical address of a DMA-API buffer, stop trying to be smart and just use the CPU mapping that the DMA-API can provide. This means that buffers will be CPU-mapped for all their life as opposed to when we need them, but anyway using the DMA-API here is a fallback for when no IOMMU is available so we should not expect optimal behavior. This makes the IOMMU and DMA-API implementations of instmem diverge enough that we should maybe put them into separate files... Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* instmem/gk20a: fix race conditionsAlexandre Courbot2016-01-111-29/+37
| | | | | | | | | | | | | | | | The LRU list used for recycling CPU mappings was handling concurrency very poorly. For instance, if an instobj was acquired twice before being released once, it would end up into the LRU list even though there is still a client accessing it. This patch fixes this by properly counting how many clients are currently using a given instobj. While at it, we also raise errors when inconsistencies are detected, and factorize some code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gk20a: Add MODULE_FIRMWARE for gk20aNicolas Chauvet2016-01-111-0/+11
| | | | | | | | | | | | | | | This patch is needed by initramfs tools to detect the required firmware files for the module. This patch tests for either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation. v2: move the MODULE_FIRMWARE to the nvidia_platform.c file. This will avoid to test for NOUVEAU_PLATFORM_DRIVER Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gk104: fix engine status register offsetVince Hsu2016-01-111-1/+1
| | | | | | | | The offset should be 8 on Kepler and later. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ce/gk104: attempt at better handling of LAUNCHERRBen Skeggs2016-01-111-4/+50
| | | | | | | | | Very rough, no idea how correct it is at this point, but it prevents getteximage-depth from piglit from hanging the GPU. v2: updated with NV_PCE_FE_LAUNCHERR_REPORT values provided by NVIDIA Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gf100: fix race condition when updating engine runlistsBen Skeggs2016-01-113-7/+26
| | | | | | Similar in spirit to the gk104 fix with a similar title. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gk104: fix race condition when updating engine runlistsBen Skeggs2016-01-113-7/+26
| | | | | | | | | | The CPU-side tracking of engine runlists was not protected by a lock, leading to list corruption, eventually causing runlist_update() to overrun the GPU-side runlist, triggering an OOPS. Fixes some of the issues noticed during parallel piglit runs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibblesIlia Mirkin2016-01-113-6/+6
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>