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 <ch...@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.v...@gmail.com>
---
 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;
                } else {
                        config->fb_changed = true;
                }
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to