summaryrefslogtreecommitdiff
path: root/nvkm/engine
Commit message (Collapse)AuthorAgeFilesLines
* disp/nv50-: audit and version DAC_LOAD methodBen Skeggs2014-08-107-38/+24
| | | | | | | | 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>
* disp/nv50-: audit and version DAC_PWR methodBen Skeggs2014-08-109-18/+106
| | | | | | | | 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>
* disp/nv50-: share channel creation between nv50/gf110 implsBen Skeggs2014-08-1010-302/+204
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo: implement nvif event sourceBen Skeggs2014-08-109-42/+60
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo: allow direct access to channel control registers where possibleBen Skeggs2014-08-109-9/+34
| | | | | | | | | | | | | The indirect method has been left in-place here as a fallback path, as it may not be possible to map the non-PAGE_SIZE aligned control areas across some chipset+interface combinations. This isn't a problem for the primary use-case where the core and drm are linked together in kernel-land, but across a VM or (in the case where it applies now) between the core in the kernel and a userspace test tool. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo: audit and version fifo channel classesBen Skeggs2014-08-1011-100/+202
| | | | | | | | 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>
* device: audit and version NVIF_CONTROL class and methodsBen Skeggs2014-08-101-56/+105
| | | | | | | | 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>
* pm: audit and version NVIF_PERFMON class and methodsBen Skeggs2014-08-101-47/+80
| | | | | | | | 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>
* dma: audit and version NV_DMA classesBen Skeggs2014-08-106-76/+154
| | | | | | | | 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>
* dmaobj: switch to a slightly saner designBen Skeggs2014-08-107-179/+356
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dmaobj: update to an improved style of class definitionBen Skeggs2014-08-1015-190/+153
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: audit and version NV_DEVICE classBen Skeggs2014-08-103-63/+96
| | | | | | | | 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>
* nvif: import library functions for the ioctl/event interfacesBen Skeggs2014-08-101-1/+2
| | | | | | | | | | | | This is a wrapper around the interfaces defined in an earlier commit, and is also used by various userspace (either by a libdrm backend, or libpciaccess) tools/tests. In the future this will be extended to handle channels, replacing some long-unloved code we currently use, and allow fifo/display/mpeg (hi Ilia ;)) engines to all be exposed in the same way. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* client: add method to retrieve device listBen Skeggs2014-08-101-0/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: remove NV_D0 familyBen Skeggs2014-08-101-6/+4
| | | | | | | 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>
* device: add method to retrieve some basic device infoBen Skeggs2014-08-101-37/+126
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: rework event interfaceBen Skeggs2014-08-1029-234/+400
| | | | | | | | | | | | | | | This is a lot of prep-work for being able to send event notifications back to userspace. Events now contain data, rather than a "something just happened" signal. Handler data is now embedded into a containing structure, rather than being kmalloc()'d, and can optionally have the notify routine handled in a workqueue. Various races between suspend/unload with display HPD/DP IRQ handlers automagically solved as a result. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* sw/nv50-: use nv50_software_context_dtor....Ben Skeggs2014-08-102-2/+2
| | | | | | You would not believe the troubles this caused me... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gk20a: reclocking supportAlexandre Courbot2014-08-101-0/+1
| | | | | | | | | Add support for reclocking on GK20A, using a statically-defined pstates table. The algorithms for calculating the coefficients and setting the clocks are directly taken from the ChromeOS kernel. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* perfmon: do not forget to destroy the engine contextSamuel Pitoiset2014-08-101-0/+1
| | | | | | | This fixes a crash when we reload Nouveau DRM. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: map pages using DMA APIAlexandre Courbot2014-08-101-25/+0
| | | | | | | | | | The DMA API is the recommended way to map pages no matter what the underlying bus is. Use the DMA functions for page mapping and remove currently existing wrappers. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* graph/nve4: do not crash if no power device presentAlexandre Courbot2014-08-101-1/+2
| | | | | | | | Detect and workaround the absence of a power device so chips that do not feature one (e.g. GK20A) can still use this driver. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gk20a: add BAR instanceAlexandre Courbot2014-08-101-1/+1
| | | | | | | | GK20A's BAR is functionally identical to NVC0's, but do not support being ioremapped write-combined. Create a BAR instance for GK20A that reflect that state. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* drm: expose pstate selection per-power source in sysfsBen Skeggs2014-08-051-8/+17
| | | | | | | | echo ac:id >> pstate # select mode when on mains power echo dc:id >> pstate # select mode when on battery echo id >> pstate # select mode for both Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk: allow selection of different power state for ac vs batteryBen Skeggs2014-08-051-2/+5
| | | | | | | v2: - s/init/fini/ typo, reported by Alex Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: register for acpi eventsBen Skeggs2014-08-054-3/+83
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk208-: stop touching 0x260 inappropriatelyBen Skeggs2014-08-057-14/+14
| | | | | | | As a side note.. It's a bit hard to figure out how to name this commit.. GK20A is NVEA, which is before NV108 (GK208).. Confusing. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk110b: initvals differ from gk110Ben Skeggs2014-08-058-14/+243
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk104: disable PGOB at init timeBen Skeggs2014-08-052-25/+7
| | | | | | This removes the previous hack that worked on some boards. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr/gk104: implement PGOB disable methodBen Skeggs2014-08-051-2/+2
| | | | | | | | | | | | | | | | | As documented at: ftp://download.nvidia.com/open-gpu-doc/gk104-disable-graphics-power-gating/1/gk104-disable-graphics-power-gating.txt NVIDIA were not able document the steps necessary to detect whether this is required or not at this time. However, they did confirm that this procedure is safe to perform unconditionally on GK104/6. GK107 does not have the power gating feature, and it was recommended that we do not perform these steps there as the effects were not verified. The disable path is from observing the binary driver, and not documented in the link above. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: tidyBen Skeggs2014-08-054-19/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: workaround broken displayBen Skeggs2014-07-081-0/+1
| | | | | | | | | | The display in fdo#76483 pulses the hotplug line for link retraining after we cut power to the main link on the source, even while it's in D3. fdo#76483 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: fix required link bandwidth calculationsBen Skeggs2014-07-083-9/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp: fix oops in destructor with headless cardsMaarten Lankhorst2014-06-181-2/+4
| | | | | | | | If init doesn't run then disp->outp might not be initialized, resulting in an oops. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c/gf117: no aux channels on this chipsetBen Skeggs2014-06-181-1/+1
| | | | | Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50: fix a potential oops in supervisor handlingBen Skeggs2014-06-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: don't touch link config after successBen Skeggs2014-06-171-4/+3
| | | | | | I don't know of anything this fixes, but it seems wrong anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/nv50: remove an unneeded write while initialising PGRAPHPierre Moreau2014-06-171-1/+0
| | | | | | | | | | The blob does not seem to write at that place for my NVAC, though it does for my NV96, agreeing with what is done in the if/else structure below. I guess someone forgot to remove the line when the if/else was put in place. Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/nv50: fix overlap while zeroing zcull regionsPierre Moreau2014-06-171-4/+4
| | | | | | | | The specified stride was not correct, resulting in erases overlapping and part of the zcull regions being not erased at all. Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: report class data to host on fwmthd failureBen Skeggs2014-06-1712-703/+1003
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.16-rc1Ben Skeggs2014-06-172-2/+2
|
* disp/dp: fix tmds passthrough on dp connectorBen Skeggs2014-06-112-10/+54
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gf119-: fix debug output on update failureBen Skeggs2014-06-111-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: make use of postcursor when its availableBen Skeggs2014-06-111-8/+18
| | | | | | And at the same time, obey the spec better wrt out-of-range requests. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/g94-/dp: take max pullup value across all lanesBen Skeggs2014-06-112-2/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/dp: parse lane postcursor dataBen Skeggs2014-06-112-9/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/g94-: add method to power-off dp lanesBen Skeggs2014-06-114-0/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: maintain link in response to hpd signalBen Skeggs2014-06-116-12/+125
| | | | | | | | | This previously worked for the most part due to userspace doing a modeset in response to HPD interrupts. This will allow us to properly handle cases where sync is lost for other reasons, or if userspace isn't caring. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/g94-: bash and wait for something after changing lane power regsBen Skeggs2014-06-111-0/+3
| | | | | | Some kind of update? Needed to make the power-down take effect at least. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: split link config/power into two stepsBen Skeggs2014-06-116-12/+29
| | | | | | We want to be able to power down the lanes for DPMS off. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>