Commit 0880bf4c authored by Ben Skeggs's avatar Ben Skeggs Committed by Lyude Paul

drm/nouveau/kms/nv50-: create heads after outps/conns

- output info will be used later to determine MST support
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Acked-by: default avatarDanilo Krummrich <me@dakr.org>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-41-lyude@redhat.com
parent 571028c4
...@@ -2774,38 +2774,6 @@ nv50_display_create(struct drm_device *dev) ...@@ -2774,38 +2774,6 @@ nv50_display_create(struct drm_device *dev)
dev->mode_config.cursor_height = 64; dev->mode_config.cursor_height = 64;
} }
/* create crtc objects to represent the hw heads */
for_each_set_bit(i, &disp->disp->head_mask, sizeof(disp->disp->head_mask) * 8) {
struct nv50_head *head;
head = nv50_head_create(dev, i);
if (IS_ERR(head)) {
ret = PTR_ERR(head);
goto out;
}
if (has_mst) {
head->msto = nv50_msto_new(dev, head, i);
if (IS_ERR(head->msto)) {
ret = PTR_ERR(head->msto);
head->msto = NULL;
goto out;
}
/*
* FIXME: This is a hack to workaround the following
* issues:
*
* https://gitlab.gnome.org/GNOME/mutter/issues/759
* https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277
*
* Once these issues are closed, this should be
* removed
*/
head->msto->encoder.possible_crtcs = disp->disp->head_mask;
}
}
/* create encoder/connector objects based on VBIOS DCB table */ /* create encoder/connector objects based on VBIOS DCB table */
for (i = 0, dcbe = &dcb->entry[0]; i < dcb->entries; i++, dcbe++) { for (i = 0, dcbe = &dcb->entry[0]; i < dcb->entries; i++, dcbe++) {
struct nouveau_encoder *outp; struct nouveau_encoder *outp;
...@@ -2868,6 +2836,38 @@ nv50_display_create(struct drm_device *dev) ...@@ -2868,6 +2836,38 @@ nv50_display_create(struct drm_device *dev)
connector->funcs->destroy(connector); connector->funcs->destroy(connector);
} }
/* create crtc objects to represent the hw heads */
for_each_set_bit(i, &disp->disp->head_mask, sizeof(disp->disp->head_mask) * 8) {
struct nv50_head *head;
head = nv50_head_create(dev, i);
if (IS_ERR(head)) {
ret = PTR_ERR(head);
goto out;
}
if (has_mst) {
head->msto = nv50_msto_new(dev, head, i);
if (IS_ERR(head->msto)) {
ret = PTR_ERR(head->msto);
head->msto = NULL;
goto out;
}
/*
* FIXME: This is a hack to workaround the following
* issues:
*
* https://gitlab.gnome.org/GNOME/mutter/issues/759
* https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277
*
* Once these issues are closed, this should be
* removed
*/
head->msto->encoder.possible_crtcs = disp->disp->head_mask;
}
}
/* Disable vblank irqs aggressively for power-saving, safe on nv50+ */ /* Disable vblank irqs aggressively for power-saving, safe on nv50+ */
dev->vblank_disable_immediate = true; dev->vblank_disable_immediate = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment