summaryrefslogtreecommitdiff
path: root/drm
Commit message (Collapse)AuthorAgeFilesLines
* clk: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-1925-633/+613
| | | | | | | | | | | | | | | | 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>
* bus: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-1914-164/+150
| | | | | | | | | | | | | | | | 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>
* bios: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-1974-652/+529
| | | | | | | | | | | | | | | | 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>
* bar: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-1913-420/+401
| | | | | | | | | | | | | | | | 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>
* core: namespace + nvidia gpu names (no binary change)Ben Skeggs2015-01-1955-1157/+1240
| | | | | | | | | | | | | | | | 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>
* nvif: namespace of nvkm accessors (no binary change)Ben Skeggs2015-01-1928-125/+124
| | | | | | | | | | 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>
* core: split device index enum out on its ownBen Skeggs2015-01-193-60/+63
| | | | | | | To avoid having to include core/device.h where it's not otherwise required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mspdec: separate from vpBen Skeggs2015-01-1926-152/+165
| | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* msenc: rename from venc (no binary change)Ben Skeggs2015-01-195-7/+7
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* sw: rename from software (no binary change)Ben Skeggs2015-01-1932-334/+334
| | | | | | | | | | | | | | | | | | Shorter device name, make consistent with our engine 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>
* msppp: rename from ppp (no binary change)Ben Skeggs2015-01-1925-108/+108
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* pm: rename from perfmon (no binary change)Ben Skeggs2015-01-1925-336/+336
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* gr: rename from graph (no binary change)Ben Skeggs2015-01-1994-2874/+2874
| | | | | | | | | | | | | | | | | | 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>
* ce: rename from copy (no binary change)Ben Skeggs2015-01-1931-234/+234
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* sec: separate from cipher (formerly crypt)Ben Skeggs2015-01-1922-189/+203
| | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* msvld: separate from bspBen Skeggs2015-01-1926-115/+133
| | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mmu: rename from vmmgr (no binary change)Ben Skeggs2015-01-1943-319/+319
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* pmu: rename from pwr (no binary change)Ben Skeggs2015-01-1944-551/+551
| | | | | | | | | | | | | | | | | | Switch to NVIDIA's name for the device. 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>
* clk: rename from clock (no binary change)Ben Skeggs2015-01-1945-690/+690
| | | | | | | | | | | | | | | | | | | | Rename to match the Linux subsystem responsible for the same kind of things. Will be investigating how feasible it will be to expose the GPU clock trees with it at some point. 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: remove symlinks from build, use Kbuild files for lib buildBen Skeggs2015-01-19685-403/+115048
| | | | | | | | | | | | | | | | | The DRM build used a separate, symlinked, source tree out of a desire to avoid Kbuild/autotools' object files conflicting. Not only is this very annoying to maintain, but it's made worse by having two entirely separate source file lists to maintain too. Fixes both these issues by ditching automake (it doesn't approve of the kernel's Kbuild syntax) in favour of custom makefiles that can build libnvif.so from the Kbuild files. Like the previous commit, this will never show up in the kernel tree (it has its own version). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: temporarily cripple build to avoid confusing gitBen Skeggs2015-01-18574-574/+0
| | | | | | | | | Move/rename detection gets confused and thinks that the entire driver was rewritten ;) Don't worry, this commit will never be seen in the kernel tree! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: merge nouveau_platform.ko into nouveau.koAlexandre Courbot2015-01-185-11/+14
| | | | | | | | | | | Having the two modules separated causes various unneeded complications, including having to export symbols accessed between the modules. Make things simpler by compiling platform device support into nouveau.ko. Platform device support remains optional and is only compiled on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: dont switch vt on suspendMaarten Lankhorst2015-01-134-38/+38
| | | | | | | | | | Restore the nv50 cursor bo on resume, and load the lut in nv50_display_display_init so it gets set on resume too. Tested on a fermi and a curie. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/dispnv04: Remove some unused functionsRickard Strandqvist2015-01-122-20/+0
| | | | | | | | | | | Removes some functions that are not used anywhere: nv04_display_late_takedown() nv04_display_early_init() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gem: Remove unused functionRickard Strandqvist2015-01-121-13/+0
| | | | | | | | | | Remove the function domain_to_ttm() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/bo: Remove unused functionRickard Strandqvist2015-01-122-15/+0
| | | | | | | | | | Remove the function nouveau_bo_rd16() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: add support for GK20AVince Hsu2015-01-102-0/+2
| | | | | | | | | | | | | This patch adds PWR support for GK20A. But instead of adding the PWR features like firmware loading and communication with PMU firmware, we add the DVFS (Dynamic Voltage and Frequency Scaling), which is one of the PMU firmware's jobs on dGPUs, in this patch. This refers to the idle signals provided by the NVIDIA hardware and tries to adjust the performance level based on the calculated target. The reclocking policy can be fine-tuned later when we have more real use cases. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: reject attempts at flipping to incompatible framebufferBen Skeggs2015-01-101-0/+4
| | | | | | | | | | | | | Looks like a userspace bug can trigger this somehow during a mode switch, causing: EVO complaint -> semaphores get out of sync -> entire display stalled. We likely want to be even stricter than this (or at least deal better if EVO rejects our request), but I'll save that for the drm_plane/atomic conversion and just fix the bug that I already know can be triggered. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: default to panel scaling, except for fixed panels prior to nv50Ben Skeggs2015-01-101-5/+9
| | | | | | | On NV50 and up, we'll allow fixed panels to use EDID-provided modes without the GPU scaler, and force scaling (even for NONE) otherwise. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: untangle connector property logic a littleBen Skeggs2015-01-101-16/+37
| | | | | | Should be the same defaults as before, just easier to follow. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: avoid adding scaler-only modes the same as the panel's native modeBen Skeggs2015-01-101-1/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: allow disabling of gpu scaling on fixed panelsBen Skeggs2015-01-103-10/+44
| | | | | | | | | | The hilarious part is that, under X, this won't work anyway because the server decides to construct its own modes for some reason. Tested with modetest, which isn't quite as insane. I'd hope that wayland is more sensible. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: move identical scaler mode fixup code into a functionBen Skeggs2015-01-101-54/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: sgdma: add comment around suspiscious error handlerAlexandre Courbot2015-01-101-0/+5
| | | | | | | | | | | | Common programming sense dictates that resources allocated by a function are freed by this function should it fails, but this is not the case for the allocated structure of nouveau_sgdma_create_ttm(). It seems that n00b contributors attempt to fix this one like bugs flying towards a bug zapper, so add a comment to hopefully prevent this from happening anymore. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: sgdma: remove unused nouveau_sgdma_be::devAlexandre Courbot2015-01-101-2/+0
| | | | | | | | nouveau_sgdma_be::dev is only set once during init and never used anywhere, so remove it. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: rename subclass.base to subclass.superclassBen Skeggs2015-01-101-1/+0
| | | | | | | | Makes things a bit more readable. This is specially important now as upcoming commits are going to be gradually removing the use of macros for down-casts, in favour of compile-time checking. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm-fixes 79305ec6e60d320832505e95c1a028d309fcd2b6Ben Skeggs2015-01-105-15/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: wake up the card if necessary during gem callbacksBen Skeggs2014-12-221-5/+30
| | | | | | | | | | The failure paths if we fail to wake the card are less than desirable, but there's not really a graceful way to handle this case currently. I'll keep this situation in mind when I get to fixing other vm-related issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix missing return statement in nouveau_ttm_tt_unpopulateAlexandre Courbot2014-12-221-1/+3
| | | | | | | | | | nouveau_ttm_tt_unpopulate() is supposed to return right after calling ttm_dma_unpopulate() in the case of a coherent buffer. The return statement was omitted, leading to the pages being unmapped twice. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: drop requirement that framebuffer bos be contig up-frontBen Skeggs2014-12-021-5/+0
| | | | | | We'll move them at pin() time if necessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: directly use cursor image from userspace bufferBen Skeggs2014-12-022-49/+32
| | | | | | | | | Preparation for transition to planes, which use framebuffers for the cursor image. We've always done copies from the userspace buffer up until now for legacy reasons, there's no good reason to do so on the chipsets this code covers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: when pinning display-related buffers, force contig vramBen Skeggs2014-12-022-7/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: teach nouveau_bo_pin() how to force a contig vram allocationBen Skeggs2014-12-0213-27/+52
| | | | | | | | | | | 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>
* volt: add support for GK20AVince Hsu2014-12-023-0/+3
| | | | | | | | | | The voltage value are calculated by the hardware characterized result. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* platform: add GPU speedo information to nouveau platformVince Hsu2014-12-022-0/+4
| | | | | | | For GK20A we need the GPU speedo value to calculate voltage levels. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add parsing of BIT M(v2) +0x03 tableBen Skeggs2014-12-023-0/+3
| | | | | | | | | We only support one kind of matching here (ramcfg strap), but it appears alternate methods are possible. I wrote a tool to scan our vbios repo for other types, but did not see any used. Hopefully this means there aren't any in the wild that will now break. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: we need pin_refcnt for nouveau_bo_placement_set()Ben Skeggs2014-12-021-5/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: add some evo tracing ability for debuggingBen Skeggs2014-12-021-0/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: use sclass() instead of trial-and-errorBen Skeggs2014-12-021-6/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove a couple of cursor-related stub functionsBen Skeggs2014-12-022-12/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>