aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_sor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_sor.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_sor.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
index 812778db76ac..4832bba7c43a 100644
--- a/drivers/gpu/drm/nouveau/nv50_sor.c
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
@@ -272,32 +272,22 @@ static const struct drm_encoder_funcs nv50_sor_encoder_funcs = {
272}; 272};
273 273
274int 274int
275nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry) 275nv50_sor_create(struct drm_connector *connector, struct dcb_entry *entry)
276{ 276{
277 struct nouveau_encoder *nv_encoder = NULL; 277 struct nouveau_encoder *nv_encoder = NULL;
278 struct drm_device *dev = connector->dev;
278 struct drm_encoder *encoder; 279 struct drm_encoder *encoder;
279 bool dum;
280 int type; 280 int type;
281 281
282 NV_DEBUG_KMS(dev, "\n"); 282 NV_DEBUG_KMS(dev, "\n");
283 283
284 switch (entry->type) { 284 switch (entry->type) {
285 case OUTPUT_TMDS: 285 case OUTPUT_TMDS:
286 NV_INFO(dev, "Detected a TMDS output\n"); 286 case OUTPUT_DP:
287 type = DRM_MODE_ENCODER_TMDS; 287 type = DRM_MODE_ENCODER_TMDS;
288 break; 288 break;
289 case OUTPUT_LVDS: 289 case OUTPUT_LVDS:
290 NV_INFO(dev, "Detected a LVDS output\n");
291 type = DRM_MODE_ENCODER_LVDS; 290 type = DRM_MODE_ENCODER_LVDS;
292
293 if (nouveau_bios_parse_lvds_table(dev, 0, &dum, &dum)) {
294 NV_ERROR(dev, "Failed parsing LVDS table\n");
295 return -EINVAL;
296 }
297 break;
298 case OUTPUT_DP:
299 NV_INFO(dev, "Detected a DP output\n");
300 type = DRM_MODE_ENCODER_TMDS;
301 break; 291 break;
302 default: 292 default:
303 return -EINVAL; 293 return -EINVAL;
@@ -342,5 +332,6 @@ nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry)
342 nv_encoder->dp.mc_unknown = 5; 332 nv_encoder->dp.mc_unknown = 5;
343 } 333 }
344 334
335 drm_mode_connector_attach_encoder(connector, encoder);
345 return 0; 336 return 0;
346} 337}