diff options
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 59d6b9bf204b..6764dce44e84 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -1398,7 +1398,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper) | |||
1398 | struct drm_mode_set *modeset; | 1398 | struct drm_mode_set *modeset; |
1399 | bool *enabled; | 1399 | bool *enabled; |
1400 | int width, height; | 1400 | int width, height; |
1401 | int i, ret; | 1401 | int i; |
1402 | 1402 | ||
1403 | DRM_DEBUG_KMS("\n"); | 1403 | DRM_DEBUG_KMS("\n"); |
1404 | 1404 | ||
@@ -1419,16 +1419,23 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper) | |||
1419 | 1419 | ||
1420 | drm_enable_connectors(fb_helper, enabled); | 1420 | drm_enable_connectors(fb_helper, enabled); |
1421 | 1421 | ||
1422 | ret = drm_target_cloned(fb_helper, modes, enabled, width, height); | 1422 | if (!(fb_helper->funcs->initial_config && |
1423 | if (!ret) { | 1423 | fb_helper->funcs->initial_config(fb_helper, crtcs, modes, |
1424 | ret = drm_target_preferred(fb_helper, modes, enabled, width, height); | 1424 | enabled, width, height))) { |
1425 | if (!ret) | 1425 | memset(modes, 0, dev->mode_config.num_connector*sizeof(modes[0])); |
1426 | memset(crtcs, 0, dev->mode_config.num_connector*sizeof(crtcs[0])); | ||
1427 | |||
1428 | if (!drm_target_cloned(fb_helper, | ||
1429 | modes, enabled, width, height) && | ||
1430 | !drm_target_preferred(fb_helper, | ||
1431 | modes, enabled, width, height)) | ||
1426 | DRM_ERROR("Unable to find initial modes\n"); | 1432 | DRM_ERROR("Unable to find initial modes\n"); |
1427 | } | ||
1428 | 1433 | ||
1429 | DRM_DEBUG_KMS("picking CRTCs for %dx%d config\n", width, height); | 1434 | DRM_DEBUG_KMS("picking CRTCs for %dx%d config\n", |
1435 | width, height); | ||
1430 | 1436 | ||
1431 | drm_pick_crtcs(fb_helper, crtcs, modes, 0, width, height); | 1437 | drm_pick_crtcs(fb_helper, crtcs, modes, 0, width, height); |
1438 | } | ||
1432 | 1439 | ||
1433 | /* need to set the modesets up here for use later */ | 1440 | /* need to set the modesets up here for use later */ |
1434 | /* fill out the connector<->crtc mappings into the modesets */ | 1441 | /* fill out the connector<->crtc mappings into the modesets */ |