summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2016-01-11Merge branch 'linux-4.5' of git://github.com/skeggsb/linux into drm-nextDave Airlie141-3704/+4879
- gk20a instmem fixes / improvements - more gm10x vs gm20x differences deal with - better support for high-frequency hdmi modes - pstate control interfaces moved to debugfs - support for pcie link speed changes - misc other fixes across the board * 'linux-4.5' of git://github.com/skeggsb/linux: (50 commits) drm/nouveau/pmu: prevent falcon from acking interrupts routed to the host drm/nouveau/perf: change pcie speed on pstate change drm/nouveau/perf: add fields for pci speed and width and use it for the pstates drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards drm/nouveau/pci: implement pcie speed change for kepler+ drm/nouveau/pci: implement pcie speed change for Fermi drm/nouveau/pci: implement pcie speed change for tesla drm/nouveau/pci: implement generic code for pcie speed change drm/nouveau/pci: add gk104 variant drm/nouveau/pci: add gf106 variant drm/nouveau/kms: take mode_config mutex in connector hotplug path drm/nouveau/nouveau/perfmon: add interface files for current core voltage drm/nouveau/sysfs: remove pstate interface drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs drm/nouveau/debugfs: we need a ctrl object for debugfs drm/nouveau/debugfs: rename functions to indicate they are used inside drm drm/nouveau/debugfs: add infrastructure to add files with other fops than only read drm/nouveau/fifo/gf100: remove references to "daemon" drm/nouveau/fb/nv50: remove references to "daemon" drm/nouveau/clk: remove references to "daemon" ...
2016-01-11drm/nouveau/pmu: prevent falcon from acking interrupts routed to the hostBen Skeggs5-2266/+2252
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/perf: change pcie speed on pstate changeKarol Herbst1-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>
2016-01-11drm/nouveau/perf: add fields for pci speed and width and use it for the pstatesKarol Herbst2-0/+5
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer ↵Karol Herbst2-0/+18
cards Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11drm/nouveau/pci: implement pcie speed change for kepler+Karol Herbst1-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>
2016-01-11drm/nouveau/pci: implement pcie speed change for FermiKarol Herbst3-0/+74
v5: don't set kepler func pointers v6: fix alignment and line length
2016-01-11drm/nouveau/pci: implement pcie speed change for teslaKarol Herbst3-0/+120
v5: don't set fermi or kepler func pointers v6: fix alignment
2016-01-11drm/nouveau/pci: implement generic code for pcie speed changeKarol Herbst5-0/+210
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>
2016-01-11drm/nouveau/pci: add gk104 variantKarol Herbst4-10/+51
v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11drm/nouveau/pci: add gf106 variantKarol Herbst4-5/+46
v2: change email used in header v4: change Copyright information v5: revert Copyright changes Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
2016-01-11drm/nouveau/kms: take mode_config mutex in connector hotplug pathBen Skeggs1-0/+3
fdo#93634 Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
2016-01-11drm/nouveau/nouveau/perfmon: add interface files for current core voltageKarol Herbst2-0/+51
Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/sysfs: remove pstate interfaceKarol Herbst5-225/+0
Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfsKarol Herbst1-2/+138
Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/debugfs: we need a ctrl object for debugfsKarol Herbst4-0/+57
Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/debugfs: rename functions to indicate they are used inside drmKarol Herbst3-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>
2016-01-11drm/nouveau/debugfs: add infrastructure to add files with other fops than ↵Karol Herbst1-3/+53
only read 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>
2016-01-11drm/nouveau/fifo/gf100: remove references to "daemon"Ben Skeggs1-2/+2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/fb/nv50: remove references to "daemon"Ben Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/clk: remove references to "daemon"Ben Skeggs4-8/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/gr/gf100: provide a bit more info for various errorsIlia Mirkin1-9/+69
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/bios: parse 8.1 Gbps DP link rateBen Skeggs1-4/+7
From DCB 4.1 spec. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/ltc/gm204: split implementation from gm107Ben Skeggs6-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>
2016-01-11drm/nouveau/ltc/gm107: use nvkm_mask to set cbc_ctrl1Ben Skeggs1-1/+1
resman and nvgpu both do this, presumably for good reason. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/ibus/gm204: split implementation from gk104Ben Skeggs6-4/+47
GM20x doesn't require the priv ring timeout bumps that GK/GM10x have. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/gr/gf100-: subclass nvkm_object to store channel pointerBen Skeggs1-0/+28
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obviousBen Skeggs45-171/+186
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out client interface definitionsBen Skeggs3-13/+13
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out device interface definitionsBen Skeggs6-49/+50
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out ctxdma interface definitionsBen Skeggs12-75/+79
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out perfmon interface definitionsBen Skeggs4-77/+75
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out device control interface definitionsBen Skeggs4-49/+49
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out fifo interface definitionsBen Skeggs23-78/+132
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out display interface definitionsBen Skeggs30-222/+261
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out nvsw interface definitonsBen Skeggs7-22/+30
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: split out fermi interface definitionsBen Skeggs3-54/+53
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvif: move internal class identifiers to class.hBen Skeggs11-31/+28
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/gr/gm107-: make use of gpc_addr() macro for tpc ramchain setupBen Skeggs2-170/+167
Should be no functional change here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/instmem/gk20a: use DMA API CPU mappingAlexandre Courbot1-92/+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>
2016-01-11drm/nouveau/instmem/gk20a: fix race conditionsAlexandre Courbot1-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>
2016-01-11drm/nouveau/gk20a: Add MODULE_FIRMWARE for gk20aNicolas Chauvet1-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>
2016-01-11drm/nouveau/fifo/gk104: fix engine status register offsetVince Hsu1-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>
2016-01-11drm/nouveau/ce/gk104: attempt at better handling of LAUNCHERRBen Skeggs1-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>
2016-01-11drm/nouveau/fifo/gf100: fix race condition when updating engine runlistsBen Skeggs3-7/+26
Similar in spirit to the gk104 fix with a similar title. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/fifo/gk104: fix race condition when updating engine runlistsBen Skeggs3-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>
2016-01-11drm/nouveau/nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibblesIlia Mirkin3-6/+6
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/kms: no need to check for empty edid before drm_detect_hdmi_monitorIlia Mirkin1-1/+0
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/core: fix return in error path of device probeAlexandre Courbot1-1/+2
We want to unlock nv_devices_mutex in this error path as well. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/kms: allow 225/297MHz pixel clocks for HDMI on Fermi/KeplerIlia Mirkin1-3/+21
Some Fermi's apparently alow allow 297MHz clocks, so create a parameter which allows end-users to set it themselves until we have a reliable way to determine the board's maximum pixel clocks. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>