Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276304
b: refs/heads/master
c: 6eebd6b
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Dec 2, 2011
1 parent ca13641 commit d912620
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 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: 2ed4d9d648cbd4fb1c232a646dbdbdfdd373ca94
refs/heads/master: 6eebd6bb5f1ea04f04019e5c39f87a0f17ffb472
27 changes: 25 additions & 2 deletions trunk/drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,30 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
EXPORT_SYMBOL(drm_crtc_helper_set_mode);


static int
drm_crtc_helper_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct drm_connector *connector;
struct drm_encoder *encoder;

/* Decouple all encoders and their attached connectors from this crtc */
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
if (encoder->crtc != crtc)
continue;

list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->encoder != encoder)
continue;

connector->encoder = NULL;
}
}

drm_helper_disable_unused_functions(dev);
return 0;
}

/**
* drm_crtc_helper_set_config - set a new config from userspace
* @crtc: CRTC to setup
Expand Down Expand Up @@ -510,8 +534,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
(int)set->num_connectors, set->x, set->y);
} else {
DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id);
set->mode = NULL;
set->num_connectors = 0;
return drm_crtc_helper_disable(set->crtc);
}

dev = set->crtc->dev;
Expand Down

0 comments on commit d912620

Please sign in to comment.