Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250561
b: refs/heads/master
c: 7394371
h: refs/heads/master
i:
  250559: 86a3885
v: v3
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Apr 28, 2011
1 parent 61eeb20 commit 8208b49
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da05a5a71ad8fc7c51d526151be193b7ef6e6c95
refs/heads/master: 7394371d85699a1d6d49b61f65583d6cd902a6a2
26 changes: 22 additions & 4 deletions trunk/drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,17 +1516,33 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
}
EXPORT_SYMBOL(drm_fb_helper_initial_config);

bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
/**
* drm_fb_helper_hotplug_event - respond to a hotplug notification by
* probing all the outputs attached to the fb.
* @fb_helper: the drm_fb_helper
*
* LOCKING:
* Called at runtime, must take mode config lock.
*
* Scan the connectors attached to the fb_helper and try to put together a
* setup after *notification of a change in output configuration.
*
* RETURNS:
* 0 on success and a non-zero error code otherwise.
*/
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
{
struct drm_device *dev = fb_helper->dev;
int count = 0;
u32 max_width, max_height, bpp_sel;
bool bound = false, crtcs_bound = false;
struct drm_crtc *crtc;

if (!fb_helper->fb)
return false;
return 0;

list_for_each_entry(crtc, &fb_helper->dev->mode_config.crtc_list, head) {
mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
if (crtc->fb)
crtcs_bound = true;
if (crtc->fb == fb_helper->fb)
Expand All @@ -1535,7 +1551,8 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)

if (!bound && crtcs_bound) {
fb_helper->delayed_hotplug = true;
return false;
mutex_unlock(&dev->mode_config.mutex);
return 0;
}
DRM_DEBUG_KMS("\n");

Expand All @@ -1546,6 +1563,7 @@ bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
max_height);
drm_setup_crtcs(fb_helper);
mutex_unlock(&dev->mode_config.mutex);

return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/drm/drm_fb_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,

int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);

bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper);
int drm_fb_helper_debug_enter(struct fb_info *info);
Expand Down

0 comments on commit 8208b49

Please sign in to comment.