linux/drivers/gpu/drm/nouveau/dispnv50
Lyude Paul 24d9422e26 drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps
Not entirely sure why this never came up when I originally tested this
(maybe some BIOSes already have this setup?) but the ->caps_init vfunc
appears to cause the display engine to throw an exception on driver
init, at least on my ThinkPad P72:

nouveau 0000:01:00.0: disp: chid 0 mthd 008c data 00000000 0000508c 0000102b

This is magic nvidia speak for "You need to have the DMA notifier offset
programmed before you can call NV507D_GET_CAPABILITIES." So, let's fix
this by doing that, and also perform an update afterwards to prevent
racing with the GPU when reading capabilities.

v2:
* Don't just program the DMA notifier offset, make sure to actually
  perform an update
v3:
* Don't call UPDATE()
* Actually read the correct notifier fields, as apparently the
  CAPABILITIES_DONE field lives in a different location than the main
  NV_DISP_CORE_NOTIFIER_1 field. As well, 907d+ use a different
  CAPABILITIES_DONE field then pre-907d cards.
v4:
* Don't forget to check the return value of core507d_read_caps()
v5:
* Get rid of NV50_DISP_CAPS_NTFY[14], use NV50_DISP_CORE_NTFY
* Disable notifier after calling GetCapabilities()

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 4a2cb4181b ("drm/nouveau/kms/nv50-: Probe SOR and PIOR caps for DP interlacing support")
Cc: <stable@vger.kernel.org> # v5.8+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2020-10-30 09:34:12 +10:00
..
Kbuild drm/nouveau/kms/nvd9-: Add CRC support 2020-07-16 18:16:33 -04:00
atom.h drm/nouveau/kms/nvd9-: Add CRC support 2020-07-16 18:16:33 -04:00
base.c drm/nouveau/kms/gk104-: add support for [XA]2R10G10B10 formats 2018-05-18 15:01:30 +10:00
base.h drm/nouveau/kms/nv50-: convert wndw update() to new push macros 2020-07-24 18:50:53 +10:00
base507c.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw update() 2020-07-24 18:51:00 +10:00
base827c.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
base907c.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
base917c.c drm/nouveau/kms/nv50-: add fp16 scanout support 2019-08-23 12:55:31 +10:00
core.c drm/nouveau/disp/tu102: rename implementation from tu104 2019-02-20 08:59:58 +10:00
core.h drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
core507d.c drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
core827d.c drm/nouveau/kms/nv50-: Probe SOR and PIOR caps for DP interlacing support 2020-05-22 11:13:51 +10:00
core907d.c drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
core917d.c drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
corec37d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core wndw_owner() 2020-07-24 18:51:01 +10:00
corec57d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core init() 2020-07-24 18:51:00 +10:00
crc.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or() 2020-07-24 18:51:03 +10:00
crc.h drm/nouveau/kms/nv50-: Fix CRC-related compile errors with debugfs disabled 2020-07-24 18:51:05 +10:00
crc907d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core crc_set_ctx() 2020-07-24 18:51:03 +10:00
crcc37d.c drm/nouveau/kms/gv100-: Include correct push header in crcc37d.c 2020-09-03 15:32:23 +10:00
curs.c drm/nouveau/disp/tu102: rename implementation from tu104 2019-02-20 08:59:58 +10:00
curs.h drm/nouveau/kms/gv100: initial support 2018-05-18 15:01:46 +10:00
curs507a.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm update() 2020-07-24 18:50:58 +10:00
curs907a.c drm/nouveau/kms/nv50-: simplify tracking of channel interlocks 2018-05-18 15:01:29 +10:00
cursc37a.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm update() 2020-07-24 18:50:58 +10:00
dac507d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
dac907d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
disp.c drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state() 2020-09-14 22:37:31 +03:00
disp.h drm/nouveau/kms/nv50-: implement proper push buffer control logic 2020-07-24 18:50:56 +10:00
handles.h drm/nouveau/kms/nvd9-: Add CRC support 2020-07-16 18:16:33 -04:00
head.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_dither() 2020-07-24 18:51:03 +10:00
head.h drm/nouveau/kms/nv50-: convert core head_or() to new push macros 2020-07-24 18:50:55 +10:00
head507d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_procamp() 2020-07-24 18:51:03 +10:00
head827d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_clr() 2020-07-24 18:51:02 +10:00
head907d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or() 2020-07-24 18:51:03 +10:00
head917d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_dither() 2020-07-24 18:51:03 +10:00
headc37d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or() 2020-07-24 18:51:03 +10:00
headc57d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or() 2020-07-24 18:51:03 +10:00
lut.c drm/nouveau/nvif: give every mem object a human-readable identifier 2020-07-24 18:50:51 +10:00
lut.h drm/nouveau/kms/nv50-: allow more flexibility with lut formats 2018-12-11 15:37:49 +10:00
oimm.c drm/nouveau/kms/nv50-: split each resource type into their own source files 2018-05-18 15:01:28 +10:00
oimm.h drm/nouveau/kms/nv50-: split each resource type into their own source files 2018-05-18 15:01:28 +10:00
oimm507b.c drm/nouveau/nvif: give every object a human-readable identifier 2020-07-24 18:50:50 +10:00
ovly.c drm/nouveau/kms/nv50-: initial overlay support 2018-05-18 15:01:31 +10:00
ovly.h drm/nouveau/kms/nv50-: convert wndw update() to new push macros 2020-07-24 18:50:53 +10:00
ovly507e.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw scale_set() 2020-07-24 18:51:00 +10:00
ovly827e.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
ovly907e.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
ovly917e.c drm/nouveau/kms/nv50-: remove overlay alpha formats 2019-08-23 12:55:32 +10:00
pior507d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
sor507d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
sor907d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_get_caps() 2020-07-24 18:51:01 +10:00
sorc37d.c drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
wimm.c drm/nouveau/disp/tu102: rename implementation from tu104 2019-02-20 08:59:58 +10:00
wimm.h drm/nouveau/kms/gv100: initial support 2018-05-18 15:01:46 +10:00
wimmc37b.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm update() 2020-07-24 18:50:58 +10:00
wndw.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
wndw.h drm/nouveau/kms/nv50-: convert wndw update() to new push macros 2020-07-24 18:50:53 +10:00
wndwc37e.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw update() 2020-07-24 18:51:00 +10:00
wndwc57e.c drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00