linux/drivers/gpu/drm/nouveau
Lyude Paul d7787cc04e drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
While I thought I had this correct (since it actually did reject modes
like I expected during testing), Ville Syrjala from Intel pointed out
that the logic here isn't correct. max_clock refers to the max data rate
supported by the DP encoder. So, limiting it to the output of ds_clock (which
refers to the maximum dotclock of the downstream DP device) doesn't make any
sense. Additionally, since we're using the connector's bpc as the canonical BPC
we should use this in mode_valid until we support dynamically setting the bpp
based on bandwidth constraints.

https://lists.freedesktop.org/archives/dri-devel/2020-September/280276.html

For more info.

So, let's rewrite this using Ville's advice.

v2:
* Ville pointed out I mixed up the dotclock and the link rate. So fix that...
* ...and also rename all the variables in this function to be more appropriately
  labeled so I stop mixing them up.
* Reuse the bpp from the connector for now until we have dynamic bpp selection.
* Use use DIV_ROUND_UP for calculating the mode rate like i915 does, which we
  should also have been doing from the start

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 409d38139b ("drm/nouveau/kms/nv50-: Use downstream DP clock limits for mode validation")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2020-10-30 09:34:13 +10:00
..
dispnv04 Merge drm/drm-next into drm-misc-next 2020-09-14 18:11:40 +02:00
dispnv50 drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
include drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps 2020-10-30 09:34:12 +10:00
nvif drm/nouveau/nvif: add support for object-level debug output 2020-07-24 18:50:51 +10:00
nvkm drm/nouveau/device: fix changing endianess code to work on older GPUs 2020-10-30 09:34:12 +10:00
Kbuild drm/nouveau/bo: split buffer move functions into their own source files 2020-07-24 18:50:56 +10:00
Kconfig drm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interface 2020-07-24 18:50:51 +10:00
nouveau_abi16.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nouveau_abi16.h
nouveau_acpi.c drm/nouveau: Use generic helper to check _PR3 presence 2020-05-22 11:13:50 +10:00
nouveau_acpi.h drm/nouveau/bios: move ACPI _ROM handling 2020-05-22 11:13:49 +10:00
nouveau_backlight.c
nouveau_bios.c
nouveau_bios.h
nouveau_bo74c1.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo85b5.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo90b5.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo0039.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo5039.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo9039.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_bo.c drm/ttm: drop special pipeline accel cleanup function. 2020-09-18 06:23:06 +10:00
nouveau_bo.h drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nouveau_boa0b5.c Merge drm/drm-next into drm-misc-next 2020-08-12 20:42:08 +02:00
nouveau_chan.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nouveau_chan.h drm/nouveau: interop with new push macros 2020-07-24 18:50:56 +10:00
nouveau_connector.c drm/nouveau/kms/nv50-: Get rid of bogus nouveau_conn_mode_valid() 2020-10-30 09:34:13 +10:00
nouveau_connector.h drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths 2020-08-31 19:10:08 -04:00
nouveau_crtc.h
nouveau_debugfs.c drm/nouveau/nvif: give every object a human-readable identifier 2020-07-24 18:50:50 +10:00
nouveau_debugfs.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
nouveau_display.c drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths 2020-08-31 19:10:08 -04:00
nouveau_display.h drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths 2020-08-31 19:10:08 -04:00
nouveau_dma.c drm/nouveau/fbcon: convert imageblit() to new push macros 2020-07-24 18:50:56 +10:00
nouveau_dma.h drm/nouveau/fence: use NVIDIA's headers for sync() 2020-07-24 18:51:04 +10:00
nouveau_dmem.c drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
nouveau_dmem.h drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
nouveau_dp.c drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid() 2020-10-30 09:34:13 +10:00
nouveau_drm.c drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths 2020-08-31 19:10:08 -04:00
nouveau_drv.h Merge drm/drm-next into drm-misc-next 2020-09-14 18:11:40 +02:00
nouveau_encoder.h drm/nouveau/kms/nv50-: Add support for DP_SINK_COUNT 2020-08-31 19:10:09 -04:00
nouveau_fbcon.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nouveau_fbcon.h drm/nouveau/kms: Move struct nouveau_framebuffer.vma to struct nouveau_fbdev 2020-05-22 11:11:14 +10:00
nouveau_fence.c drm/nouveau/nvif: give every notify object a human-readable name 2020-07-24 18:50:51 +10:00
nouveau_fence.h drm/nouveau: signal pending fences when channel has been killed 2020-01-29 15:49:47 +10:00
nouveau_gem.c drm/nouveau/gem: fix "refcount_t: underflow; use-after-free" 2020-10-30 09:34:12 +10:00
nouveau_gem.h
nouveau_hwmon.c
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c
nouveau_led.h
nouveau_mem.c drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
nouveau_mem.h drm/ttm: rename ttm_mem_reg to ttm_resource. 2020-08-06 13:19:21 +10:00
nouveau_nvif.c
nouveau_platform.c drm/nouveau/gr/gk20a: move MODULE_FIRMWARE firmware definitions 2020-05-22 11:13:49 +10:00
nouveau_platform.h
nouveau_prime.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nouveau_reg.h
nouveau_sgdma.c drm/ttm: move unbind into the tt destroy. 2020-09-18 06:15:24 +10:00
nouveau_svm.c drm/nouveau/nouveau: fix the start/end range for migration 2020-10-30 09:34:11 +10:00
nouveau_svm.h nouveau/svm: use the new migration invalidation 2020-07-28 16:20:33 -03:00
nouveau_ttm.c drm/ttm: remove available_caching 2020-09-15 16:05:19 +02:00
nouveau_ttm.h drm/nouveau/ttm: use driver bind/unbind/destroy functions. 2020-09-09 08:30:11 +10:00
nouveau_usif.c
nouveau_usif.h
nouveau_vga.c drm: Avoid drm_global_mutex for simple inc/dec of dev->open_count 2020-01-24 17:41:34 +00:00
nouveau_vga.h
nouveau_vmm.c drm/nouveau/nvif: give every vmm object a human-readable identifier 2020-07-24 18:50:51 +10:00
nouveau_vmm.h
nv04_fbcon.c drm/nouveau/fbcon: convert copyarea() to new push macros 2020-07-24 18:50:56 +10:00
nv04_fence.c drm/nouveau/fence: convert emit() to new push macros 2020-07-24 18:50:58 +10:00
nv10_fence.c drm/nouveau/fence: use NVIDIA's headers for read() 2020-07-24 18:51:04 +10:00
nv10_fence.h
nv17_fence.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nv50_display.h
nv50_fbcon.c drm/nouveau/fbcon/nv50-: use NVIDIA's headers for fillrect() 2020-07-24 18:51:04 +10:00
nv50_fence.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nv84_fence.c drm/nouveau: stop using TTM placement flags 2020-09-11 13:31:23 +02:00
nvc0_fbcon.c drm/nouveau/fbcon/nv50-: use NVIDIA's headers for fillrect() 2020-07-24 18:51:04 +10:00
nvc0_fence.c drm/nouveau/fence: use NVIDIA's headers for sync() 2020-07-24 18:51:04 +10:00