summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv17_tv.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-06-28 14:35:50 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-07-13 10:13:09 +1000
commit8f1a60868f4594bc5576cca8952635f475e8bec6 (patch)
tree23eeab5d99ecaee1f6c8c94e21911cfa8fc47de1 /drivers/gpu/drm/nouveau/nv17_tv.c
parent3195c5f9784aa8ec27a7bb19a6840dc67e9e90f1 (diff)
downloadblackbird-op-linux-8f1a60868f4594bc5576cca8952635f475e8bec6.tar.gz
blackbird-op-linux-8f1a60868f4594bc5576cca8952635f475e8bec6.zip
drm/nouveau: tidy connector/encoder creation a little
Create connectors before encoders to avoid having to do another loop across encoder list whenever we create a new connector. This allows us to pass the connector to the encoder creation functions, and avoid using a create_resources() callback since we can now call it directly. This can also potentially modify the connector ordering on nv50. On cards where the DCB connector and encoder tables are in the same order, things will be unchanged. However, there's some cards where the ordering between the tables differ, and in one case, leads us to naming the connectors "wrongly". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv17_tv.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv17_tv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv17_tv.c b/drivers/gpu/drm/nouveau/nv17_tv.c
index 74c880374fb9..44437ff46394 100644
--- a/drivers/gpu/drm/nouveau/nv17_tv.c
+++ b/drivers/gpu/drm/nouveau/nv17_tv.c
@@ -744,8 +744,10 @@ static struct drm_encoder_funcs nv17_tv_funcs = {
.destroy = nv17_tv_destroy,
};
-int nv17_tv_create(struct drm_device *dev, struct dcb_entry *entry)
+int
+nv17_tv_create(struct drm_connector *connector, struct dcb_entry *entry)
{
+ struct drm_device *dev = connector->dev;
struct drm_encoder *encoder;
struct nv17_tv_encoder *tv_enc = NULL;
@@ -774,5 +776,7 @@ int nv17_tv_create(struct drm_device *dev, struct dcb_entry *entry)
encoder->possible_crtcs = entry->heads;
encoder->possible_clones = 0;
+ nv17_tv_create_resources(encoder, connector);
+ drm_mode_connector_attach_encoder(connector, encoder);
return 0;
}
OpenPOWER on IntegriCloud