1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/nouveau/include/nvhw/class
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
..
cl006c.h drm/nouveau/fbcon: convert accel_init() to new push macros 2020-07-24 18:50:56 +10:00
cl006e.h drm/nouveau/fence: use NVIDIA's headers for emit() 2020-07-24 18:51:04 +10:00
cl0039.h drm/nouveau/bo: use NVIDIA's headers for move init() 2020-07-24 18:51:04 +10:00
cl176e.h drm/nouveau/fence: use NVIDIA's headers for sync() 2020-07-24 18:51:04 +10:00
cl206e.h drm/nouveau/fbcon: convert accel_init() to new push macros 2020-07-24 18:50:56 +10:00
cl502d.h drm/nouveau/fbcon/nv50-: use NVIDIA's headers for accel_init() 2020-07-24 18:51:03 +10:00
cl507a.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm space() 2020-07-24 18:50:58 +10:00
cl507c.h drm/nouveau/kms/nv50-: convert wndw sema_set() to new push macros 2020-07-24 18:50:52 +10:00
cl507d.h drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
cl507e.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
cl826f.h drm/nouveau/fence: use NVIDIA's headers for emit() 2020-07-24 18:51:04 +10:00
cl827c.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
cl827d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_set() 2020-07-24 18:51:02 +10:00
cl827e.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_reset() 2020-07-24 18:50:59 +10:00
cl837d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
cl887d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
cl902d.h drm/nouveau/fbcon/nv50-: use NVIDIA's headers for accel_init() 2020-07-24 18:51:03 +10:00
cl906f.h drm/nouveau/fbcon: convert accel_init() to new push macros 2020-07-24 18:50:56 +10:00
cl907c.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw csc_set() 2020-07-24 18:50:59 +10:00
cl907d.h drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
cl907e.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() 2020-07-24 18:51:00 +10:00
cl917d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() 2020-07-24 18:51:01 +10:00
cl5039.h drm/nouveau/bo: use NVIDIA's headers for move init() 2020-07-24 18:51:04 +10:00
cl9039.h drm/nouveau/bo: use NVIDIA's headers for move init() 2020-07-24 18:51:04 +10:00
cla0b5.h drm/nouveau/bo: use NVIDIA's headers for move move() 2020-07-24 18:51:04 +10:00
clc37a.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm point() 2020-07-24 18:50:58 +10:00
clc37b.h
clc37d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core init() 2020-07-24 18:51:00 +10:00
clc37e.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw sema_set() 2020-07-24 18:50:58 +10:00
clc57d.h drm/nouveau/kms/nv50-: use NVIDIA's headers for core init() 2020-07-24 18:51:00 +10:00
clc57e.h drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw csc_set() 2020-07-24 18:50:59 +10:00