|
@@ -516,6 +516,9 @@ int drm_fb_helper_init(struct drm_device *dev,
|
|
struct drm_crtc *crtc;
|
|
struct drm_crtc *crtc;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
+ if (!max_conn_count)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
fb_helper->dev = dev;
|
|
fb_helper->dev = dev;
|
|
|
|
|
|
INIT_LIST_HEAD(&fb_helper->kernel_fb_list);
|
|
INIT_LIST_HEAD(&fb_helper->kernel_fb_list);
|
|
@@ -809,8 +812,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
|
|
struct drm_fb_helper *fb_helper = info->par;
|
|
struct drm_fb_helper *fb_helper = info->par;
|
|
struct drm_device *dev = fb_helper->dev;
|
|
struct drm_device *dev = fb_helper->dev;
|
|
struct fb_var_screeninfo *var = &info->var;
|
|
struct fb_var_screeninfo *var = &info->var;
|
|
- int ret;
|
|
|
|
- int i;
|
|
|
|
|
|
|
|
if (var->pixclock != 0) {
|
|
if (var->pixclock != 0) {
|
|
DRM_ERROR("PIXEL CLOCK SET\n");
|
|
DRM_ERROR("PIXEL CLOCK SET\n");
|
|
@@ -818,13 +819,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
|
|
}
|
|
}
|
|
|
|
|
|
drm_modeset_lock_all(dev);
|
|
drm_modeset_lock_all(dev);
|
|
- for (i = 0; i < fb_helper->crtc_count; i++) {
|
|
|
|
- ret = drm_mode_set_config_internal(&fb_helper->crtc_info[i].mode_set);
|
|
|
|
- if (ret) {
|
|
|
|
- drm_modeset_unlock_all(dev);
|
|
|
|
- return ret;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ drm_fb_helper_restore_fbdev_mode(fb_helper);
|
|
drm_modeset_unlock_all(dev);
|
|
drm_modeset_unlock_all(dev);
|
|
|
|
|
|
if (fb_helper->delayed_hotplug) {
|
|
if (fb_helper->delayed_hotplug) {
|