drm/nouveau/nvkm/dp: Add workaround to fix DP 1.3+ DPCD issues
authorLyude Paul <lyude@redhat.com>
Fri, 28 Jul 2023 22:58:57 +0000 (18:58 -0400)
committerLyude Paul <lyude@redhat.com>
Fri, 28 Jul 2023 23:20:39 +0000 (19:20 -0400)
commitcc4adf3a7323212f303bc9ff0f96346c44fcba06
tree80bbe5dba7f9abf676dc78aeeac349022d4b5dde
parentc1f386ab6418f76823186c279aa9a1929c099908
drm/nouveau/nvkm/dp: Add workaround to fix DP 1.3+ DPCD issues

Currently we use the drm_dp_dpcd_read_caps() helper in the DRM side of
nouveau in order to read the DPCD of a DP connector, which makes sure we do
the right thing and also check for extended DPCD caps. However, it turns
out we're not currently doing this on the nvkm side since we don't have
access to the drm_dp_aux structure there - which means that the DRM side of
the driver and the NVKM side can end up with different DPCD capabilities
for the same connector.

Ideally in order to fix this, we just want to use the
drm_dp_read_dpcd_caps() helper in nouveau. That's not currently possible
though, and is going to depend on having a bunch of the DP code moved out
of nvkm and into the DRM side of things as part of the GSP enablement work.

Until then however, let's workaround this problem by porting a copy of
drm_dp_read_dpcd_caps() into NVKM - which should fix this issue.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/211
Link: https://patchwork.freedesktop.org/patch/msgid/20230728225858.350581-1-lyude@redhat.com
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c