On Tue, Aug 13, 2013 at 10:32:19PM +0200, Daniel Vetter wrote: > On Tue, Aug 13, 2013 at 06:59:34PM +0100, Chris Wilson wrote: > > If the CRTC for this modeset is not attached to any encoder, it will be > > off. In this case, we will need to turn it on as well as update its > > base. This requires a full modeset sequence. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030 > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index 4f9c3d8..30bd919 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -8836,9 +8836,8 @@ is_crtc_connector_off(struct drm_mode_set *set) > > > > for (i = 0; i < set->num_connectors; i++) > > if (set->connectors[i]->encoder && > > - set->connectors[i]->encoder->crtc == set->crtc && > > - set->connectors[i]->dpms != DRM_MODE_DPMS_ON) > > - return true; > > + set->connectors[i]->encoder->crtc == set->crtc) > > + return set->connectors[i]->dpms != DRM_MODE_DPMS_ON; > > > > return false; > > } > > @@ -8853,11 +8852,10 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set, > > if (is_crtc_connector_off(set)) { > > config->mode_changed = true; > > } else if (set->crtc->fb != set->fb) { > > - /* If we have no fb then treat it as a full mode set */ > > - if (set->crtc->fb == NULL) { > > - struct intel_crtc *intel_crtc = > > - to_intel_crtc(set->crtc); > > + struct intel_crtc *intel_crtc = to_intel_crtc(set->crtc); > > > > + /* If we have no fb (or off) then treat it as a full mode set */ > > + if (set->crtc->fb == NULL) { > > if (intel_crtc->active && i915_fastboot) { > > DRM_DEBUG_KMS("crtc has no fb, will flip\n"); > > config->fb_changed = true; > > @@ -8870,6 +8868,8 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set, > > } else if (set->fb->pixel_format != > > set->crtc->fb->pixel_format) { > > config->mode_changed = true; > > + } else if (!intel_crtc->active) { > > + config->mode_changed = true; > > This hunk here /should/ be redundant, at least if we don't botch up the > connector iteration above. Also can you please pimp the commit message a > bit to trace the epic multi-chapter train wreak this has become? The connector iteration doesn't quite capture everything, the condition it misses (the change of encoder->crtc) should be spotted by intel_modeset_stage_output_state(). This patch shouldn't be doing anything but terminating the iteration earlier upon finding the crtc match. The bug is definitely that we skip a mode_changed in favour of a simple fb_changed on a disabled output.. but where? -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx