OSDN Git Service

drm/nouveau/kms: Cache DP encoders in nouveau_connector
authorLyude Paul <lyude@redhat.com>
Wed, 17 Aug 2022 19:38:40 +0000 (15:38 -0400)
committerLyude Paul <lyude@redhat.com>
Tue, 23 Aug 2022 20:53:40 +0000 (16:53 -0400)
commit11d2738940ebeb3fd3abc78d44684d5edb400a6e
tree7ff94e566f6ff7e81d7448546ab3c821df07f54e
parent083351e963865a7eab55158042b81b8f8c0316b6
drm/nouveau/kms: Cache DP encoders in nouveau_connector

Post-NV50, the only kind of encoder you'll find for DP connectors on Nvidia
GPUs are SORs (serial output resources). Because SORs have fixed
associations with their connectors, we can correctly assume that any DP
connector on a nvidia GPU will have exactly one SOR encoder routed to it
for DisplayPort.

Since we're going to need to be able to retrieve this fixed SOR DP encoder
much more often as a result of hooking up MST helpers for tracking
SST<->MST transitions in atomic states, let's simply cache this encoder in
nouveau_connector for any DP connectors on the system to avoid looking it
up each time. This isn't safe for NV50 since PIORs then come into play,
however there's no code pre-NV50 that would need to look this up anyhow -
so it's not really an issue.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-12-lyude@redhat.com
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h