aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-10drm/nv50-/disp: audit and version SOR_HDMI_PWR methodBen Skeggs13-45/+121
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 <[email protected]>
2014-08-10drm/nv50-/disp: audit and version SOR_HDA_ELD methodBen Skeggs10-29/+75
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 <[email protected]>
2014-08-10drm/nv50-/disp: audit and version SOR_PWR methodBen Skeggs10-26/+45
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 <[email protected]>
2014-08-10drm/nv50-/disp: audit and version DAC_LOAD methodBen Skeggs10-51/+48
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 <[email protected]>
2014-08-10drm/nv50-/disp: audit and version DAC_PWR methodBen Skeggs13-41/+171
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 <[email protected]>
2014-08-10drm/nv50-/disp: share channel creation between nv50/gf110 implsBen Skeggs10-302/+204
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/kms: don't assume same class versions for all channelsBen Skeggs1-48/+166
One of the next commits will remove some of the class IDs, leaving only the ones used by NVIDIA which, presumably, mark where functionality changes actually happened. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/fifo: implement nvif event sourceBen Skeggs13-50/+89
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/fifo: allow direct access to channel control registers where ↵Ben Skeggs11-9/+38
possible 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 <[email protected]>
2014-08-10drm/nouveau/fifo: audit and version fifo channel classesBen Skeggs19-199/+323
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 <[email protected]>
2014-08-10drm/nouveau/device: audit and version NVIF_CONTROL class and methodsBen Skeggs7-112/+174
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 <[email protected]>
2014-08-10drm/nouveau/pm: audit and version NVIF_PERFMON class and methodsBen Skeggs4-78/+116
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 <[email protected]>
2014-08-10drm/nouveau/dma: audit and version NV_DMA classesBen Skeggs15-216/+318
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 <[email protected]>
2014-08-10drm/nouveau/dmaobj: switch to a slightly saner designBen Skeggs8-181/+357
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/dmaobj: update to an improved style of class definitionBen Skeggs16-209/+157
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/device: audit and version NV_DEVICE classBen Skeggs7-105/+135
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 <[email protected]>
2014-08-10drm/nouveau: use ioctl interface for abi16 gpuobj freeBen Skeggs1-3/+15
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: use ioctl interface for abi16 ntfy allocBen Skeggs1-18/+31
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: use ioctl interface for abi16 grobj allocBen Skeggs3-34/+54
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: remove as much direct use of core headers as possibleBen Skeggs23-59/+22
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: remove (most) hardcoded object handle usageBen Skeggs9-58/+45
The PFIFO<->EVO sync buffers will be fixed up later when inter-channel sync in general is improved. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: port to nvif client/device/objectsBen Skeggs40-479/+522
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: initial pass at moving to struct nvif_deviceBen Skeggs41-388/+459
This is an attempt at isolating some of the changes necessary to port to NVIF in a separate commit. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: kill nouveau_dev() + wrap register macrosBen Skeggs17-219/+228
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: fix some usages of the wrong print functionBen Skeggs8-50/+54
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/nvif: import library functions for the ioctl/event interfacesBen Skeggs14-2/+1350
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 <[email protected]>
2014-08-10drm/nouveau/client: add method to retrieve device listBen Skeggs4-0/+72
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: remove NV_D0 familyBen Skeggs6-34/+37
The one place where it mattered has been replaced with a class check, which is more appropriate anyway. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/device: add method to retrieve some basic device infoBen Skeggs4-37/+171
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: import ioctl/event interfacesBen Skeggs13-4/+831
This forms the basis for the new APIs that will be exposed to userspace, giving it access to: - Object method calls, the immediately useful of which is performance counters and the abiity to manipulate the ZBC tables. - Information on the child classes an object supports, in order to avoid having to try all supported classes until successful. - Notifications, which will be used in the future to inform the client if its channel was killed due to a lockup, etc. This commit imports the interfaces, but are not currently used. The DRM portion of the driver will be ported to speak to the core using these interfaces as much as possible. Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: add function to return list of supported childrenBen Skeggs2-0/+34
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: rework event interfaceBen Skeggs52-517/+875
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 <[email protected]>
2014-08-10drm/nouveau/core: move handle-based object apis to handle.cBen Skeggs4-120/+135
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/core: fail creation of zero-argument objects, when arguments are ↵Ben Skeggs1-30/+6
passed Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: store a pointer to vm in nouveau_cliBen Skeggs5-19/+24
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: store vblank event handler data in nv_crtcBen Skeggs3-29/+29
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/kms: create ctxdma objects for framebuffers as requiredBen Skeggs4-163/+126
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50/kms: move framebuffer wrangling out of common codeBen Skeggs3-47/+81
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: Bump version from 1.1.1 to 1.1.2Mario Kleiner1-1/+3
Linux 3.16 fixed multiple bugs in kms pageflip completion events and timestamping, which were originally introduced in Linux 3.13. These fixes have been backported to all stable kernels since 3.13. However, the userspace nouveau-ddx needs to be aware if it is running on a kernel on which these bugs are fixed, or not. Bump the patchlevel of the drm driver version to signal this, so backporting this patch to stable 3.13+ kernels will give the ddx the required info. Signed-off-by: Mario Kleiner <[email protected]> Cc: <[email protected]> #v3.13+ Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50-/sw: use nv50_software_context_dtor....Ben Skeggs2-2/+2
You would not believe the troubles this caused me... Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nv50-/fb: use dma_mapping_error() to check dma_map_page() resultBen Skeggs2-3/+3
Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: Dis/Enable vblank irqs during suspend/resume.Mario Kleiner1-0/+11
Vblank irqs don't get disabled during suspend or driver unload, which causes irq delivery after "suspend" or driver unload, at least until the gpu is powered off. This could race with drm_vblank_cleanup() in the case of nouveau and cause a use-after-free bug if the driver is unloaded. More annoyingly during everyday use, at least on nv50 display engine (likely also others), vblank irqs are off after a resume from suspend, but the drm doesn't know this, so all vblank related functionality is dead after a resume. E.g., all windowed OpenGL clients will hang at swapbuffers time, as well as many fullscreen clients in many cases. This makes suspend/resume useless if one wants to use any OpenGL apps after the resume. In Linux 3.16, drm_vblank_on() was added, complementing the older drm_vblank_off() to solve these problems elegantly, so use those calls in nouveaus suspend/resume code. For kernels 3.8 - 3.15, we need to cherry-pick the drm_vblank_on() patch to support this patch. Signed-off-by: Mario Kleiner <[email protected]> Cc: <[email protected]> #v3.16 Cc: <[email protected]> #v3.8+: f275228: drm: Add drm_vblank_on() Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: platform: update moved Tegra headerAlexandre Courbot1-1/+1
Header for tegra_powergate functions has moved to soc/tegra/pmc.h. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/gk20a: reclocking supportAlexandre Courbot5-0/+669
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 <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: support for non-BIOS pstatesAlexandre Courbot9-20/+30
Make nouveau_clock_create() take new two optional arguments: an array of pstates and its size. When these are specified, nouveau_clock_create() will use the provided pstates instead of probing them using the BIOS. This is useful for platforms which do not provide a BIOS, like Tegra. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/clk: make therm and volt devices optionalAlexandre Courbot1-14/+22
Allow the clock subsystem to operate even if voltage and thermal devices are not set for the device (for people with watercooling! ;)) Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/perfmon: do not forget to destroy the engine contextSamuel Pitoiset1-0/+1
This fixes a crash when we reload Nouveau DRM. Signed-off-by: Samuel Pitoiset <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau: map pages using DMA APIAlexandre Courbot5-41/+26
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 <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nouveau/pwr/macros: Stop playing Russian roulette on data memoryRoy Spliet5-663/+663
Signed-off-by: Roy Spliet <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-08-10drm/nve4/graph: do not crash if no power device presentAlexandre Courbot1-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 <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>