Skip to content

Commit

Permalink
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Browse files Browse the repository at this point in the history
Pull drm fixes from Dave Airlie:
 "One fix for a hotplug locking regressions, and one fix for an oops if
  you unplug the monitor at an inopportune moment on the udl device."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event
  udl: handle EDID failure properly.
  • Loading branch information
Linus Torvalds committed Apr 14, 2013
2 parents ba3b7d8 + 89ced12 commit 93263e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,10 +1544,10 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
if (!fb_helper->fb)
return 0;

drm_modeset_lock_all(dev);
mutex_lock(&fb_helper->dev->mode_config.mutex);
if (!drm_fb_helper_is_bound(fb_helper)) {
fb_helper->delayed_hotplug = true;
drm_modeset_unlock_all(dev);
mutex_unlock(&fb_helper->dev->mode_config.mutex);
return 0;
}
DRM_DEBUG_KMS("\n");
Expand All @@ -1558,9 +1558,11 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)

count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
max_height);
mutex_unlock(&fb_helper->dev->mode_config.mutex);

drm_modeset_lock_all(dev);
drm_setup_crtcs(fb_helper);
drm_modeset_unlock_all(dev);

drm_fb_helper_set_par(fb_helper->fbdev);

return 0;
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/udl/udl_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ static int udl_get_modes(struct drm_connector *connector)
int ret;

edid = (struct edid *)udl_get_edid(udl);
if (!edid) {
drm_mode_connector_update_edid_property(connector, NULL);
return 0;
}

/*
* We only read the main block, but if the monitor reports extension
Expand Down

0 comments on commit 93263e5

Please sign in to comment.