summaryrefslogtreecommitdiff
path: root/drm
Commit message (Collapse)AuthorAgeFilesLines
...
* core: initial support for GP102Ben Skeggs2016-11-081-0/+29
| | | | | | | From visual inspection of traces, what we currently implement appears to be identical to GP104. Seems to work well enough too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device/pci: fix oops if no mmu subdev presentBen Skeggs2016-11-081-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAPBen Skeggs2016-11-071-2/+5
| | | | | | Fixes certain displays not being detected due to DPAUX errors. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gf100-: protect channel preempt with subdev mutexBen Skeggs2016-11-072-6/+11
| | | | | | | | | | | This avoids an issue that occurs when we're attempting to preempt multiple channels simultaneously. HW seems to ignore preempt requests while it's still processing a previous one, which, well, makes sense. Fixes random "fifo: SCHED_ERROR 0d []" + GPCCS page faults during parallel piglit runs on (at least) GM107. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr: fallback to legacy paths during firmware lookupAlexandre Courbot2016-11-071-4/+46
| | | | | | | | | | | | | | Look for firmware files using the legacy ("nouveau/nvxx_fucxxxx") path if they cannot be found in the new, "official" path. User setups were broken by the switch, which is bad. There are only 4 firmware files we may want to look up that way, so hardcode them into the lookup function. All new firmware files should use the standard "nvidia/<chip>/gr/" path. Fixes: 8539b37acef7 ("drm/nouveau/gr: use NVIDIA-provided external firmwares") Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: initial support for DP 1.2 multi-streamBen Skeggs2016-11-074-2/+571
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: allow encoder update to be called from other modulesBen Skeggs2016-11-072-44/+44
| | | | | | MST encoders will make use of this to share code with SOR> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: rename remaining nv50_crtc to nv50_headBen Skeggs2016-11-071-58/+55
| | | | | | No code changes, just renames + shuffles. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove code to create ctxdma for every framebufferBen Skeggs2016-11-073-90/+7
| | | | | | This is now handled by prepare_fb(). Legacy flips were the last user. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove code to support non-atomic page flipsBen Skeggs2016-11-078-288/+27
| | | | | | Made completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove code to support non-atomic connector propertiesBen Skeggs2016-11-074-27/+9
| | | | | | Made completely unreachable by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove code to support non-atomic dpmsBen Skeggs2016-11-072-84/+2
| | | | | | Made completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove code to support non-atomic modesetsBen Skeggs2016-11-071-386/+0
| | | | | | Make completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: transition to atomic interfaces internallyBen Skeggs2016-11-073-89/+779
| | | | | | | | | | | | | | | | | | | | This commit implements the atomic commit interfaces, and implements the legacy modeset and page flipping interfaces on top of them. There's two major changes in behavior from before: - We're now making use of interlocks between core and satellite EVO channels, which greatly improves our ability to keep their states synchronised. - DPMS is now implemented as a full modeset to either tear down the entire pipe (or bring it back up). This choice was made mostly to ease the initial implementation, but I'm also not sure what we gain by bring backing the old behaviour. We shall see. This does NOT currently expose the atomic ioctl by default, due to limited testing having been performed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: turn mode_set_base_atomic() into a stubBen Skeggs2016-11-071-3/+1
| | | | | | This cannot currently be supported with atomic modesettting. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: convert encoder mode_fixup into an atomic_check()Ben Skeggs2016-11-071-17/+53
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: clean-up encoder functionsBen Skeggs2016-11-073-140/+122
| | | | | | | | Just a shuffle of blocks into an order consistent with the rest of the code, renaming hdmi/audio funtions for atomic, and removal of unused code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: ensure encoder normal power state is enabled at startupBen Skeggs2016-11-071-0/+19
| | | | | | | | | | | | | | | To handle low-power DPMS states, we currently change an OR's (Output Resource) normal (active) power state to be off, leaving the rest of the display configured as usual. Under atomic modesetting, we will instead be doing a full modeset to tear down the pipe fully when entering a low-power state. As we'll no longer be touching the OR's PWR registers during runtime operation, we need to ensure the normal power state is set correctly during initialisation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: prepare ctxdma interface to be usable with atomicBen Skeggs2016-11-071-105/+92
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out cursor channel commitBen Skeggs2016-11-071-40/+158
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out base channel commitBen Skeggs2016-11-071-92/+743
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out vblank dmi commitBen Skeggs2016-11-071-22/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out procamp commitBen Skeggs2016-11-071-17/+50
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out dither commitBen Skeggs2016-11-071-31/+70
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out viewport commitBen Skeggs2016-11-072-93/+129
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out base/ovly channel usage bounds commitBen Skeggs2016-11-071-15/+71
| | | | | | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. We're no longer touching the overlay channel usage bounds as of this commit. The code to do so is in place for when overlay planes are added. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out cursor surface commitBen Skeggs2016-11-072-51/+97
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out lut commitBen Skeggs2016-11-071-51/+70
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out core surface commitBen Skeggs2016-11-071-45/+175
| | | | | | | | | | | | | | | | | | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. As of this commit, we're no longer bothering to point the core surface at a valid framebuffer. Prior to this, we'd initially point the core channel to the framebuffer passed in a mode_set()/mode_set_base(), and then use the base channel for any page-flip updates, leaving the core channel pointing at stale information. The important thing here is to configure the core surface parameters in such a way that EVO's error checking is satisfied. TL;DR: The situation isn't too much different to before. There may be brief periods of times during modesets where the (garbage) core surface will be showing. This issue will be resolved once support for atomic commits has been implemented and we're able to interlock the updates that involve multiple channels. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: separate out mode commitBen Skeggs2016-11-072-55/+167
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: give more useful names to encodersBen Skeggs2016-11-071-3/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: control evo trace output with DRM_UT_KMSBen Skeggs2016-11-071-7/+5
| | | | | | Will be useful in debugging the transition to atomic. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: switch mst sink back into sst modeBen Skeggs2016-11-074-10/+142
| | | | | | | | | | | | Sometimes we load with a sink already in MST mode. If, however, we can't or don't want to use MST, we need to be able to switch it back to SST. This commit instantiates a stub topology manager for any output path that we believe (the detection of this could use some improvement) has support for MST, and adds the connector detect() logic for detecting sink support and switching between modes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: never call drm_helper_disable_unused_functions() with atomicBen Skeggs2016-11-071-1/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: prepare to support suspend/resume of display state with atomicBen Skeggs2016-11-072-0/+140
| | | | | | | | | | | This is different from the equivilant functions in the atomic helpers in that we fully disable the pipe instead of just setting it to inactive. We do this (primarily) to ensure the framebuffer cleanup paths are hit, allowing buffers to be un-pinned from memory so they can be evicted to system memory and not lose their contents while suspended. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: prepare to support vbl timestamp calculation with atomicBen Skeggs2016-11-071-2/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: prepare to support legacy connector set_property with atomicBen Skeggs2016-11-071-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: prepare to support legacy connector dpms with atomicBen Skeggs2016-11-071-3/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: separate connector property attach from nouveau_connectorBen Skeggs2016-11-072-62/+78
| | | | | | These will also be used by MST connectors. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: subclass atomic connector stateBen Skeggs2016-11-074-221/+339
| | | | | | | | | | | | | | | | This commit implements the atomic property hooks for a connector, and wraps the legacy interface handling on top of those. For the moment, a full modeset will be done after any property change in order to ease subsequent changes. The optimised behaviour will be restored for Tesla and later (earlier boards always do full modesets) once atomic commits are implemented. Some functions are put under the "nouveau_conn" namespace now, rather than "nouveau_connector", to distinguish functions that will work for (upcoming) MST connectors too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: execute drm_mode_config_reset() after constructing displayBen Skeggs2016-11-071-0/+2
| | | | | | | This will ensure we have some kind of initial atomic state for all objects after initialisation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: move drm_crtc_force_disable_all() earlierBen Skeggs2016-11-073-5/+7
| | | | | | | | | | nouveau_display_fini() is responsible for quiescing the hardware, so this is where such actions belong. More than that, nouveau_display_fini() switches off the receiving of sink irqs, which MST will require while shutting down an active head. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: drop dpms off/on in response to hotplugBen Skeggs2016-11-071-8/+0
| | | | | | | | | | This primarily existed to ensure the DP link got retrained, and is now unnecessary as that's handled by NVKM already. For anything beyond that, we send an event to userspace and let it decide on an appropriate action to take. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fbcon: refcount the drm_framebufferBen Skeggs2016-11-074-38/+34
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fbcon: make use of drm_fb_helper.fbBen Skeggs2016-11-074-33/+25
| | | | | | Transitional step towards properly refcounting the fbcon fb. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fbcon: make use of drm_fb_helper.devBen Skeggs2016-11-075-22/+20
| | | | | | | No need to store the pointer ourselves when it's already present in the base struct. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/g94-: stop listening for dp (sst) retrain irq when disabling linkBen Skeggs2016-11-072-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/sor/gf119-: add method to program mst payload informationBen Skeggs2016-11-076-0/+50
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/sor/gf119-: add method to control mst enableBen Skeggs2016-11-075-11/+43
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/dp: remove workqueue for link trainingBen Skeggs2016-11-077-37/+20
| | | | | | | There haven't been any callers from an atomic context for a while now, so let's remove the extra complexity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>