summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_crtc_helper.c18
-rw-r--r--linux-core/intel_fb.c9
2 files changed, 19 insertions, 8 deletions
diff --git a/linux-core/drm_crtc_helper.c b/linux-core/drm_crtc_helper.c
index 1b6118de..edb739f5 100644
--- a/linux-core/drm_crtc_helper.c
+++ b/linux-core/drm_crtc_helper.c
@@ -67,6 +67,7 @@ void drm_helper_probe_single_connector_modes(struct drm_connector *connector, ui
struct drm_connector_helper_funcs *connector_funcs = connector->helper_private;
int ret;
+ DRM_DEBUG("%s\n", drm_get_connector_name(connector));
/* set all modes to the unverified state */
list_for_each_entry_safe(mode, t, &connector->modes, head)
mode->status = MODE_UNVERIFIED;
@@ -186,8 +187,11 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
- if (!crtc->enabled)
+ crtc->enabled = drm_helper_crtc_in_use(crtc);
+ if (!crtc->enabled) {
crtc_funcs->dpms(crtc, DPMSModeOff);
+ crtc->fb = NULL;
+ }
}
}
EXPORT_SYMBOL(drm_helper_disable_unused_functions);
@@ -209,6 +213,7 @@ static void drm_pick_crtcs (struct drm_device *dev)
struct drm_connector_helper_funcs *connector_funcs;
int found;
+ DRM_DEBUG("\n");
/* clean out all the encoder/crtc combos */
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
encoder->crtc = NULL;
@@ -515,8 +520,13 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
/* We should be able to check here if the fb has the same properties
* and then just flip_or_move it */
- if (set->crtc->fb != set->fb)
- flip_or_move = true;
+ if (set->crtc->fb != set->fb) {
+ /* if we have no fb then its a change not a flip */
+ if (set->crtc->fb == NULL)
+ changed = true;
+ else
+ flip_or_move = true;
+ }
if (set->x != set->crtc->x || set->y != set->crtc->y)
flip_or_move = true;
@@ -629,6 +639,8 @@ EXPORT_SYMBOL(drm_crtc_helper_set_config);
bool drm_helper_plugged_event(struct drm_device *dev)
{
+ DRM_DEBUG("\n");
+
drm_helper_probe_connector_modes(dev, dev->mode_config.max_width, dev->mode_config.max_height);
drm_pick_crtcs(dev);
diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c
index b4afb155..5ec5bb8f 100644
--- a/linux-core/intel_fb.c
+++ b/linux-core/intel_fb.c
@@ -309,11 +309,9 @@ static int intelfb_set_par(struct fb_info *info)
int ret;
list_for_each_entry(modeset, &par->mode_set_list, head) {
- if (modeset->num_connectors) {
- ret = modeset->crtc->funcs->set_config(modeset);
- if (ret)
- return ret;
- }
+ ret = modeset->crtc->funcs->set_config(modeset);
+ if (ret)
+ return ret;
}
return 0;
}
@@ -782,6 +780,7 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
struct intelfb_par *par;
struct drm_mode_set *modeset;
+ DRM_DEBUG("\n");
/* first up get a count of crtcs now in use and new min/maxes width/heights */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
if (drm_helper_crtc_in_use(crtc)) {