]> asedeno.scripts.mit.edu Git - linux.git/log
linux.git
5 years agodrm/msm/dpu: Remove dpu_kms_pm_suspend/resume
Bruce Wang [Fri, 5 Oct 2018 21:04:00 +0000 (17:04 -0400)]
drm/msm/dpu: Remove dpu_kms_pm_suspend/resume

PM resume was crashing during dpu_kms_pm_resume. This patch removes
dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic
helpers instead (see next patch). This patch also removes
dpu_kms_is_suspend_blocked since it is never called.

v2: Reorganized patches in patchset

Signed-off-by: Bruce Wang <bzwang@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
5 years agodrm/msm: dpu: Add tracing around CTL_FLUSH
Sean Paul [Wed, 3 Oct 2018 18:36:44 +0000 (14:36 -0400)]
drm/msm: dpu: Add tracing around CTL_FLUSH

I found these tracepoints useful for debugging cursor/ctl, someone else
might find them useful too

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
5 years agodrm: Fix docs warning in drm_damage_helper.c
Deepak Rawat [Thu, 6 Dec 2018 19:44:44 +0000 (11:44 -0800)]
drm: Fix docs warning in drm_damage_helper.c

Modify description to match actual argument list.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
5 years agodrm/selftest: fix spelling mistake "dimention" -> "dimension"
Colin Ian King [Mon, 10 Dec 2018 09:26:19 +0000 (09:26 +0000)]
drm/selftest: fix spelling mistake "dimention" -> "dimension"

There is a spelling mistake in a pr_err message, fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
5 years agodrm/nouveau/ce/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ce/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/disp/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/disp/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/dma/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/dma/tu106: initial support

Appears to be compatible with GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/therm/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/therm/tu106: initial support

Appears to be compatible with GP100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/pmu/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/pmu/tu106: initial support

Appears to be compatible with GP102.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fault/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fault/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bar/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bar/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/mmu/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/mmu/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/ltc/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ltc/tu106: initial support

Appears to be compatible with GP102.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fb/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fb/tu106: initial support

Appears to be compatible with GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/imem/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/imem/tu106: initial support

Appears to be compatible with NV50.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/tmr/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/tmr/tu106: initial support

Appears to be compatible with GK20A.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bus/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bus/tu106: initial support

Appears to be compatible with GF100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/mc/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/mc/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fuse/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fuse/tu106: initial support

Appears to be compatible with GM107.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/i2c/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/i2c/tu106: initial support

Appears to be compatible with GM200.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/gpio/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/gpio/tu106: initial support

Appears to be compatible with GK104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/ibus/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ibus/tu106: initial support

Appears to be compatible with GM200.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/top/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/top/tu106: initial support

Appears to be compatible with GK104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/devinit/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/devinit/tu106: initial support

Appears to be compatible with TU104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bios/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bios/tu106: initial support

No real surprised here so far.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/pci/tu106: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/pci/tu106: initial support

Appears to be compatible with GP100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/core: recognise TU106
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/core: recognise TU106

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/core: increase maximum number of nvdec instances to 3
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/core: increase maximum number of nvdec instances to 3

RTX2070 appears to have 3 copies of the engine.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/kms/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/kms/tu104: initial support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/ce/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ce/tu104: initial support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/tu104: initial support

Various different bits and pieces vs GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/disp/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/disp/tu104: initial support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/dma/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/dma/tu104: initial support

Appears to be compatible with GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/therm/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/therm/tu104: initial support

Appears to be compatible with GP100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/pmu/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/pmu/tu104: initial support

Appears to be compatible with GP102.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fault/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fault/tu104: initial support

New registers.

Currently uncertain how exactly to mask fault buffer interrupts.  This will
likely be corrected at around the same time as the new MC interrupt stuff
has been properly figured out and implemented.

For the moment, it shouldn't matter too much.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bar/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bar/tu104: initial support

New registers.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/mmu/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/mmu/tu104: initial support

New flush method.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/ltc/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ltc/tu104: initial support

Appears to be compatible with GP102.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fb/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fb/tu104: initial support

Appears to be compatible with GV100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/imem/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/imem/tu104: initial support

Appears to be compatible with NV50.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/tmr/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/tmr/tu104: initial support

Appears to be compatible with GK20A.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bus/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bus/tu104: initial support

Appears to be compatible with GF100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/mc/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/mc/tu104: initial support

Things are a bit different here on Turing, and will require further changes
yet once I've investigated them more thoroughly.

For now though, the existing GP100 code is compatible enough with one small
hack to forward on fault buffer interrupts.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fuse/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fuse/tu104: initial support

Appears to be compatible with GM107.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/i2c/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/i2c/tu104: initial support

Appears to be compatible with GM200.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/gpio/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/gpio/tu104: initial support

Appears to be compatible with GK104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/ibus/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/ibus/tu104: initial support

Appears to be compatible with GM200.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/top/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/top/tu104: initial support

Appears to be compatible with GK104.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/devinit/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/devinit/tu104: initial support

The GPU executes DEVINIT itself now, which makes our lives a bit easier.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bios/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bios/tu104: initial support

No real surprises here so far.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/pci/tu104: initial support
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/pci/tu104: initial support

Appears to be compatible with GP100.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/core: recognise TU104
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/core: recognise TU104

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/kms/nv50-: allow more flexibility with lut formats
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/kms/nv50-: allow more flexibility with lut formats

Will be required for Turing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau: remove left-over struct member
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau: remove left-over struct member

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gv100: return work submission token in channel ctor args
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gv100: return work submission token in channel ctor args

The token will also contain runlist ID on Turing, so instead expose it as
an opaque value from NVKM so the client doesn't need to care.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gv100: allocate method buffer
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gv100: allocate method buffer

The GPU saves off some stuff to the address specified in this part of RAMFC
when the channel faults, so we should probably point it at a valid address.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gm200-: read pbdma count more directly
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gm200-: read pbdma count more directly

The trick we used (and still use for older GPUs) doesn't work on Turing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gk104-: virtualise pbdma enable function
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gk104-: virtualise pbdma enable function

Turing will require different code.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gk104-: group pbdma functions together
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gk104-: group pbdma functions together

We're about to be adding more of them.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gk104-: separate runlist building from committing to hw
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gk104-: separate runlist building from committing to hw

We will need to bash different registers on Turing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gk104-: support enabling privileged ce functions
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gk104-: support enabling privileged ce functions

Will be used by SVM code to allow direct (without going through MMU) memcpy
using the GPU copy engines.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gk104-: return channel instance in ctor args
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gk104-: return channel instance in ctor args

Will be used to match fault buffer entries with a channel.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fifo/gf100-: call into BAR to reset BARs after MMU fault
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fifo/gf100-: call into BAR to reset BARs after MMU fault

This is needed for Turing, but we're supposed to wait for completion after
re-writing the value on older GPUs anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/disp/gv100: fix name of window channels in debug output
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/disp/gv100: fix name of window channels in debug output

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/mmu: add more general vmm free/node handling functions
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/mmu: add more general vmm free/node handling functions

Aside from being a nice cleanup, these will to allow the upcoming direct
page mapping interfaces to play nicely with normal mappings.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fault: add explicit control over fault buffer interrupts
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fault: add explicit control over fault buffer interrupts

The GPU will continually fire interrupts while a fault buffer GET != PUT,
and to stop the spurious interrupts while the handler does its thing, we
were disabling the fault buffer temporarily.

This is not actually a great idea to begin with, and made worse by Volta
resetting GET/PUT when it's reactivated.  So, let's not do that.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fault: store get/put pri address in nvkm_fault_buffer
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fault: store get/put pri address in nvkm_fault_buffer

Will allow more shared fault buffer handling code between Pascal/Volta.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/fault: remove manual mapping of fault buffers into BAR2
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/fault: remove manual mapping of fault buffers into BAR2

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/imem/nv50: support pinning objects in BAR2 and returning address
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/imem/nv50: support pinning objects in BAR2 and returning address

Various structures are accessed by the GPU through BAR2 for some reason
on newer GPUs.  This commit makes it more convenient to handle.

Will be used for GP100- fault buffers, and GV100- fault method buffers.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/tmr: detect stalled gpu timer and break out of waits
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/tmr: detect stalled gpu timer and break out of waits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/devinit/gm200-: export function to upload+execute PMU/PRE_OS
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/devinit/gm200-: export function to upload+execute PMU/PRE_OS

Will be used for Turing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bios: translate USB-C connector type
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bios: translate USB-C connector type

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/bios: translate additional memory types
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/bios: translate additional memory types

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/core: support multiple nvdec instances
Ben Skeggs [Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)]
drm/nouveau/core: support multiple nvdec instances

Turing GPUs can have more than one.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/drm/nouveau: Don't forget to label dp_aux devices
Lyude Paul [Thu, 12 Jul 2018 17:13:52 +0000 (13:13 -0400)]
drm/nouveau/drm/nouveau: Don't forget to label dp_aux devices

This makes debugging with DP tracing a lot harder to interpret, so name
each i2c based off the name of the encoder that it's for

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume()
Lyude Paul [Thu, 15 Nov 2018 01:39:51 +0000 (20:39 -0500)]
drm/nouveau/drm/nouveau: Check rc from drm_dp_mst_topology_mgr_resume()

We need to actually make sure we check this on resume since otherwise we
won't know whether or not the topology is still there once we've
resumed, which will cause us to still think the topology is connected
even after it's been removed if the removal happens mid-suspend.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau: Add size to vbios.rom file in debugfs
Lyude Paul [Wed, 19 Sep 2018 17:13:52 +0000 (13:13 -0400)]
drm/nouveau: Add size to vbios.rom file in debugfs

With this, nvbios /sys/kernel/debug/dri/*/vbios.rom now works!

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/nouveau: Add strap_peek to debugfs
Lyude Paul [Wed, 19 Sep 2018 17:13:51 +0000 (13:13 -0400)]
drm/nouveau: Add strap_peek to debugfs

Since we already expose the vbios.rom file here, why not also expose the
strap_peek?

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5 years agodrm/amdgpu/powerplay: Add special avfs cases for some polaris asics (v3)
Alex Deucher [Thu, 6 Dec 2018 15:41:27 +0000 (10:41 -0500)]
drm/amdgpu/powerplay: Add special avfs cases for some polaris asics (v3)

Add special avfs handling for some polaris variants.

v2: fix copy paste typo.
v3: fix asic rid check

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: remove set but not used variable 'grbm_soft_reset'
YueHaibing [Sat, 8 Dec 2018 15:01:13 +0000 (15:01 +0000)]
drm/amdgpu: remove set but not used variable 'grbm_soft_reset'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_pre_soft_reset':
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4950:27: warning:
 variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_post_soft_reset':
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:5054:27: warning:
 variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit d31a501ead7f ("drm/amdgpu: add
pre_soft_reset ip func") and e4ae0fc33631 ("drm/amdgpu: implement
gfx8 post_soft_reset")

Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: Limit vm max ctx number to 4096
Rex Zhu [Wed, 24 Oct 2018 08:10:33 +0000 (16:10 +0800)]
drm/amdgpu: Limit vm max ctx number to 4096

driver need to reserve resource for each ctx for
some hw features. so add this limitation.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: bypass RLC init under sriov for Tonga (v2)
Tiecheng Zhou [Fri, 7 Dec 2018 01:11:35 +0000 (09:11 +0800)]
drm/amdgpu: bypass RLC init under sriov for Tonga (v2)

RLC will go wrong in soft_reset under sriov

Workaroound: only need to init RLC csb, and skip RLC stop, reset, start
    this is because host-driver has already done full initialization on RLC

v2: squash in build fix

Signed-off-by: Tiecehng Zhou <Tiecheng.Zhou@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: move IV prescreening into the GMC code
Christian König [Wed, 26 Sep 2018 09:50:09 +0000 (11:50 +0200)]
drm/amdgpu: move IV prescreening into the GMC code

The GMC/VM subsystem is causing the faults, so move the handling here as
well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: remove VM fault_credit handling
Christian König [Wed, 26 Sep 2018 09:15:36 +0000 (11:15 +0200)]
drm/amdgpu: remove VM fault_credit handling

printk_ratelimit() is much better suited to limit the number of reported
VM faults.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: send IVs to the KFD only after processing them v3
Christian König [Wed, 26 Sep 2018 09:08:32 +0000 (11:08 +0200)]
drm/amdgpu: send IVs to the KFD only after processing them v3

This allows us to filter out VM faults in the GMC code.

v2: don't filter out all faults
v3: fix copy&paste typo, send all IV to the KFD, don't change message level

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdkfd: Add support for doorbell BOs
Felix Kuehling [Wed, 21 Nov 2018 02:44:27 +0000 (21:44 -0500)]
drm/amdkfd: Add support for doorbell BOs

This allows user mode to map doorbell pages into GPUVM address space.
That way GPUs can submit to user mode queues (self-dispatch).

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdkfd: Add DMABuf import functionality
Felix Kuehling [Wed, 21 Nov 2018 02:00:29 +0000 (21:00 -0500)]
drm/amdkfd: Add DMABuf import functionality

This is used for interoperability between ROCm compute and graphics
APIs. It allows importing graphics driver BOs into the ROCm SVM
address space for zero-copy GPU access.

The API is split into two steps (query and import) to allow user mode
to manage the virtual address space allocation for the imported buffer.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdkfd: Add NULL-pointer check
Felix Kuehling [Wed, 21 Nov 2018 01:52:37 +0000 (20:52 -0500)]
drm/amdkfd: Add NULL-pointer check

top_dev->gpu is NULL for CPUs. Avoid dereferencing it if NULL.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: Add KFD VRAM limit checking
Felix Kuehling [Tue, 20 Nov 2018 01:05:54 +0000 (20:05 -0500)]
drm/amdgpu: Add KFD VRAM limit checking

We don't want KFD processes evicting each other over VRAM usage.
Therefore prevent overcommitting VRAM among KFD applications with
a per-GPU limit. Also leave enough room for page tables on top
of the application memory usage.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: Workaround build failure due to trace conflict
Kuehling, Felix [Fri, 7 Dec 2018 22:07:20 +0000 (22:07 +0000)]
drm/amdgpu: Workaround build failure due to trace conflict

Avoid including mmu_context.h in amdgpu_amdkfd.h since that may be
included in other header files that define traces. This leads to
conflicts due to traces defined in other headers included via
mmu_context.h.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: rv dal-pplib interface refactor powerplay part
hersen wu [Wed, 28 Nov 2018 21:55:47 +0000 (16:55 -0500)]
drm/amd/powerplay: rv dal-pplib interface refactor powerplay part

[WHY] clarify dal input parameters to pplib interface, remove
un-used parameters. dal knows exactly which parameters needed
and their effects at pplib and smu sides.

current dal sequence for dcn1_update_clock to pplib:

1.smu10_display_clock_voltage_request for dcefclk
2.smu10_display_clock_voltage_request for fclk
3.phm_store_dal_configuration_data {
  set_min_deep_sleep_dcfclk
  set_active_display_count
  store_cc6_data --- this data never be referenced

new sequence will be:

1. set_display_count  --- need add new pplib interface
2. set_min_deep_sleep_dcfclk -- new pplib interface
3. set_hard_min_dcfclk_by_freq
4. set_hard_min_fclk_by_freq

after this code refactor, smu10_display_clock_voltage_request,
phm_store_dal_configuration_data will not be needed for rv.

[HOW] step 1: add new functions at pplib interface
      step 2: add new functions at amdgpu dm and dc

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: Skip ring soft recovery when fence was NULL
wentalou [Thu, 6 Dec 2018 02:29:52 +0000 (10:29 +0800)]
drm/amdgpu: Skip ring soft recovery when fence was NULL

amdgpu_ring_soft_recovery would have Call-Trace,
when s_fence->parent was NULL inside amdgpu_job_timedout.
Check fence first, as drm_sched_hw_job_reset did.

Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: Destroy psp ring when doing gpu reset
Xiangliang Yu [Wed, 5 Dec 2018 06:36:33 +0000 (14:36 +0800)]
drm/amdgpu/psp: Destroy psp ring when doing gpu reset

PSP ring need to be destroy before starting reinit for vf.
This patche move it from hypervisor driver into guest.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Frank Min <Frank.Min@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: Add support VMR ring for VF
Xiangliang Yu [Wed, 5 Dec 2018 03:23:43 +0000 (11:23 +0800)]
drm/amdgpu/psp: Add support VMR ring for VF

PSP only support VMR ring for SRIOV vf since v45 and all commands will
be send to VMR ring for executing.

VMR ring use C2PMSG 101 ~ 103 instead of C2PMSG 64 ~ 71.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: Get psp fw version through reading register
Xiangliang Yu [Tue, 4 Dec 2018 07:13:28 +0000 (15:13 +0800)]
drm/amdgpu/psp: Get psp fw version through reading register

If PSP FW is running already, driver will not load PSP FW again and skip
it. So psp fw version is not correct if reading it from FW binary file,
need to get right version from register.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: always reserve one more shared slot for pipelined BO moves
Christian König [Mon, 24 Sep 2018 11:35:08 +0000 (13:35 +0200)]
drm/amdgpu: always reserve one more shared slot for pipelined BO moves

This allows us to drop the extra reserve in TTM.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: always reserve two slots for the VM
Christian König [Fri, 21 Sep 2018 16:09:59 +0000 (18:09 +0200)]
drm/amdgpu: always reserve two slots for the VM

And drop the now superflous extra reservations.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: fix using shared fence for exported BOs v2
Christian König [Wed, 19 Sep 2018 14:54:35 +0000 (16:54 +0200)]
drm/amdgpu: fix using shared fence for exported BOs v2

It is perfectly possible that the BO list is created before the BO is
exported. While at it clean up setting shared to one instead of true.

v2: add comment and simplify logic

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>