aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_display.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index a20bf43389b3..c85df4afcb7a 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -334,27 +334,19 @@ static bool radeon_setup_enc_conn(struct drm_device *dev)
334 334
335int radeon_ddc_get_modes(struct radeon_connector *radeon_connector) 335int radeon_ddc_get_modes(struct radeon_connector *radeon_connector)
336{ 336{
337 struct edid *edid;
338 int ret = 0; 337 int ret = 0;
339 338
340 if (!radeon_connector->ddc_bus) 339 if (!radeon_connector->ddc_bus)
341 return -1; 340 return -1;
342 if (!radeon_connector->edid) { 341 if (!radeon_connector->edid) {
343 radeon_i2c_do_lock(radeon_connector, 1); 342 radeon_i2c_do_lock(radeon_connector, 1);
344 edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); 343 radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter);
345 radeon_i2c_do_lock(radeon_connector, 0); 344 radeon_i2c_do_lock(radeon_connector, 0);
346 } else 345 }
347 edid = radeon_connector->edid;
348 346
349 if (edid) { 347 if (radeon_connector->edid) {
350 /* update digital bits here */ 348 drm_mode_connector_update_edid_property(&radeon_connector->base, radeon_connector->edid);
351 if (edid->input & DRM_EDID_INPUT_DIGITAL) 349 ret = drm_add_edid_modes(&radeon_connector->base, radeon_connector->edid);
352 radeon_connector->use_digital = 1;
353 else
354 radeon_connector->use_digital = 0;
355 drm_mode_connector_update_edid_property(&radeon_connector->base, edid);
356 ret = drm_add_edid_modes(&radeon_connector->base, edid);
357 kfree(edid);
358 return ret; 350 return ret;
359 } 351 }
360 drm_mode_connector_update_edid_property(&radeon_connector->base, NULL); 352 drm_mode_connector_update_edid_property(&radeon_connector->base, NULL);