diff options
author | Dave Airlie <airlied@redhat.com> | 2014-03-18 19:23:22 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-03-18 19:23:22 +1000 |
commit | 5a08c07526e9586318c5b57fd90af4350f83e26e (patch) | |
tree | 14a93206e71a98ec2f26a05c0edc0ce40cae0e5a /drivers/gpu/drm/drm_fb_helper.c | |
parent | 7550e3668ce1414f6c7edbe8b13c1169a1aa5960 (diff) | |
parent | c94adc4a65c67a79f0d19285bf5c32fe4c00176f (diff) |
Merge branch 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel into drm-next
Merge straggling core drm patches.
* 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel:
drm: Fix use-after-free in the shadow-attache exit code
drm/fb-helper: Do the 'max_conn_count' zero check
drm: Check if the allocation has succeeded before dereferencing newmode
drm/fb-helper: Use drm_fb_helper_restore_fbdev_mode() in drm_fb_helper_set_par()
drm/edid: request HDMI underscan by default
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 060d25aa46fa..87876198801d 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -516,6 +516,9 @@ int drm_fb_helper_init(struct drm_device *dev, struct drm_crtc *crtc; int i; + if (!max_conn_count) + return -EINVAL; + fb_helper->dev = dev; 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_device *dev = fb_helper->dev; struct fb_var_screeninfo *var = &info->var; - int ret; - int i; if (var->pixclock != 0) { 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); - 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); if (fb_helper->delayed_hotplug) { |