- 02 Nov, 2017 40 commits
-
-
Ben Skeggs authored
This is not as simple as it was for earlier GPUs, due to the need to swap accessor functions depending on whether BAR2 is usable or not. We were previously protected by nvkm_instobj's accessor functions keeping an object mapped permanently, with some unclear magic that managed to hit the slow-path where needed even if an object was marked as mapped. That's been replaced here by reference counting maps (some objects, like page tables can be accessed concurrently), and swapping the functions as necessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
This is to simplify upcoming changes. The slow-path is something that currently occurs during bootstrap of the BAR2 VMM, while backing up an object during suspend/resume, or when BAR2 address space runs out. The latter is a real problem that can happen at runtime, and occurs in Fedora 26 already (due to some change that causes a lot of channels to be created at login), so ideally we'd prefer not to make it any slower. We'd also like suspend/resume speed to not suffer. Upcoming commits will solve those problems in a better way, making the extra overhead of moving the locking here a non-issue. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
acquire()/boot() will need different logic in addition to performing the actual mapping. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
This will eliminate a step through the call chain, and give backends more flexibility. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
The accessor functions can change as a result of acquire()/release() calls, and are protected by any refcounting done there. Other functions must remain constant, as they can be called any time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Discovered by accident while working to use BAR2 access to instmem objects on more paths. We've apparently been relying on luck up until now! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
If we initialise BAR2 earlier, we're able to complete BAR1 setup using the instmem fast-path. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
GP100's page table nests a lot more deeply than the GF100-compatible layout we're currently using, which means our hackish-but-simple way of dealing with BAR2 VMM teardown won't work anymore. In order to sanely handle the chicken-and-egg (BAR2's PTs get mapped into themselves) problem, we need prevent page tables getting mapped back into BAR2 during the destruction of its VMM. To do this, we simply key off the state that's now maintained by the BAR2 init/fini functions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Match API with the BAR1 version. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Upcoming changes will remove the nvkm_vmm pointer from nvkm_vma, instead requiring it to be explicitly specified on each operation. It's not currently possible to get this information for BAR1 mappings, so let's fix that ahead of time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Will prevent spurious MMU fault interrupts if something decides to touch BAR1 after we've unloaded the driver. Exposed external to BAR so that INSTMEM can use it to better control the suspend/resume fast-path access. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
If we want to be able to hit the instmem fast-path in a few trickier cases, we need to be more flexible with when we can initialise BAR2 access. There's probably a decent case to be made for merging BAR/INSTMEM into BUS, but that's something to ponder another day. Flushes have been added after the write to bind the instance block, as later commits will reveal the need for them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Will prevent spurious MMU fault interrupts if something decides to touch BAR1 after we've unloaded the driver. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
BAR2 being done for practical reasons, this is just for consistency. Flushes have been added after the write to bind the instance block, as later commits will reveal the need for them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
NVIDIA call it BAR2, Linux APIs treat it as BAR3 due to BAR1 being a 64-bit BAR, which I presume take two slots or something. No actual code changes here, just to make future commits less messy. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
It's handled by FIFO preinit() now. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Will already be done by MMU as a result of the PT writes that occur during BAR2 bootstrapping. This is likely just a left-over from the days when it was hardcoded. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
RM appears to do this really early in its initialisation, before DEVINIT. We currently do this before BAR2 initialisation for some reason. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
nvkm_device hasn't subclassed nvkm_object in a long time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
nvkm_gpuobj hasn't subclassed nvkm_object in a long time. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
MMU will be using this for BAR mappings. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
MMU will be needing this to specify kind info on BAR mappings. We have no userspace currently using these interfaces, so break the ABI instead of supporting both. NVIF version bump so any future use can be guarded. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Want to be able to include this from core/device.h without pulling in core/object.h. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
The correct thing to do on OOM is to return 0 and set mm_node to NULL, otherwise TTM will assume some other kind of error, and not attempt to evict other buffers to make space. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ilia Mirkin authored
This was already done in dcb.c inside nvkm, but the other parser did not get the update. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Jérémy Lefaure authored
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to re-invent it. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Rhys Kidd authored
nouveau supports the Tegra K1 and higher after the SoC-based GPUs converged with the main GeForce GPU families. v2: - Qualify that support is Tegra K1+ (Martin Peres) Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Acked-by: Pierre Moreau <pierre.morrow@free.fr> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Rhys Kidd authored
v2: - add nv138 and drop nv13b chipsets (Ilia Mirkin) - refactor out status variable and instead mask tsensor (Ilia Mirkin) - switch SHADOWed state message away from nvkm_error() (Ilia Mirkin) - rename internal temperature variable (Karol Herbst) v3: - use nvkm_trace() for SHADOWed state message (Ben Skeggs) Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-
Dave Airlie authored
Linux 4.14-rc7 Requested by Ben Skeggs for nouveau to avoid major conflicts, and things were getting a bit conflicty already, esp around amdgpu reverts.
-
Dave Airlie authored
For 4.15 * tag 'drm-hisilicon-next-2017-11-01' of github.com:xin3liang/linux: drm/hisilicon: Ensure LDI regs are properly configured.
-
git://people.freedesktop.org/~robclark/linuxDave Airlie authored
+ preemption support for a5xx[1][2] + display fixes for 8x96 (snapdragon 820) including fixes for 4k scanout (hwpipe assignment re-work to handle multiple hwpipe assigned to plane for wide scanout) + async cursor plane updates and fixes + refactor adreno_bind/hwinit.. still defer fw loading until device open, but move clk/irq/etc to probe/bind time to fix issues when fw isn't present in filesys + clk/dt bindings cleanups w/ backward compat via msm_clk_get() (dt docs part ack'ed by Rob Herring) + fw loading re-work with helper to handle either /lib/firmware/qcom/$fw or /lib/firmware/$fw.. background, we've started landing fw for some of generations in linux-firmware, but there is a preference to put fw files under 'qcom' subdirectory, which is not what was done on android or for people who copied fw from android. So now we first look in qcom subdir and then fallback to the original location. + bunch of GPU debugging enhancements, to dump full cmdline of processes that trigger faults, and to add a new debugfs to capture cmdstream of just submits that triggered faults.. both quite useful for piglit ;-) * tag 'drm-msm-next-2017-11-01' of git://people.freedesktop.org/~robclark/linux: (38 commits) drm/msm: use %z format modifier for printing size_t drm/msm/mdp5: Don't use async plane update path if plane visibility changes drm/msm/mdp5: mdp5_crtc: Restore cursor state only if LM cursors are enabled drm/msm/mdp5: Update mdp5_pipe_assign to spit out both planes drm/msm/mdp5: Prepare mdp5_pipe_assign for some rework drm/msm: remove mdp5_cursor_plane_funcs drm/msm: update cursors asynchronously through atomic drm/msm/atomic: switch to drm_atomic_helper_check drm/msm/mdp5: restore cursor state when enabling crtc drm/msm/mdp5: don't use autosuspend drm/msm/mdp5: ignore planes that are not visible drm/msm: dump submits which triggered gpu hang drm/msm: preserve IOVAs in submit's bo table drm/msm/rd: allow adding addition msg to top of dump drm/msm: split rd debugfs file drm/msm: add special _get_vaddr_active() for cmdstream dumps drm/msm: show task cmdline in gpu recovery messages drm/msm: dump a rd GPUADDR header for all buffers in the command drm/msm: Removed unused struct_mutex_task drm/msm: Implement preemption for A5XX targets ...
-