summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_encoder.h
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2020-08-26 14:24:42 -0400
committerLyude Paul <lyude@redhat.com>2020-08-31 19:10:08 -0400
commit09838c4efe9afb6fefa889d92c3571d49029af26 (patch)
treefd0d1c6b123b5b74cf0c02e1f4f46d4318936038 /drivers/gpu/drm/nouveau/nouveau_encoder.h
parent254e7e3bfcfcae829e120e53e21050e2fe5ce1d7 (diff)
downloadlinux-09838c4efe9afb6fefa889d92c3571d49029af26.tar.gz
linux-09838c4efe9afb6fefa889d92c3571d49029af26.tar.bz2
linux-09838c4efe9afb6fefa889d92c3571d49029af26.zip
drm/nouveau/kms: Search for encoders' connectors properly
While the way we find the associated connector for an encoder is just fine for legacy modesetting, it's not correct for nv50+ since that uses atomic modesetting. For reference, see the drm_encoder kdocs. Fix this by removing nouveau_encoder_connector_get(), and replacing it with nv04_encoder_get_connector(), nv50_outp_get_old_connector(), and nv50_outp_get_new_connector(). v2: * Don't line-wrap for_each_(old|new)_connector_in_state in nv50_outp_get_(old|new)_connector() - sravn v3: * Fix potential uninitialized usage of nv_connector (needs to be initialized to NULL at the start). Thanks kernel test robot! v4: * Actually fix uninitialized nv_connector usage in nv50_audio_component_get_eld(). The previous fix wouldn't have worked since we would have started out with nv_connector == NULL, but wouldn't clear it after a single drm_for_each_encoder() iteration. Thanks again Kernel bot! Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-7-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_encoder.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_encoder.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h
index 6424cdcb4913..b0e1dad2367d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_encoder.h
+++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h
@@ -113,7 +113,11 @@ enum drm_mode_status nv50_dp_mode_valid(struct drm_connector *,
unsigned *clock);
struct nouveau_connector *
-nouveau_encoder_connector_get(struct nouveau_encoder *encoder);
+nv50_outp_get_new_connector(struct nouveau_encoder *outp,
+ struct drm_atomic_state *state);
+struct nouveau_connector *
+nv50_outp_get_old_connector(struct nouveau_encoder *outp,
+ struct drm_atomic_state *state);
int nv50_mstm_detect(struct nv50_mstm *, u8 dpcd[8], int allow);
void nv50_mstm_remove(struct nv50_mstm *);