From mboxrd@z Thu Jan 1 00:00:00 1970 From: Egbert Eich Subject: Re: [PATCH] drm/i915: force full modeset if the connector is in DPMS OFF mode Date: Fri, 3 May 2013 19:40:08 +0200 Message-ID: <20130503174008.GF17947@debian> References: <1367580129-6681-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FEA4E5DEF for ; Fri, 3 May 2013 10:40:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1367580129-6681-1-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Imre Deak Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, May 03, 2013 at 02:22:09PM +0300, Imre Deak wrote: > Currently the driver's assumed behavior for a modeset with an attached > FB is that the corresponding connector will be switched to DPMS ON mode > if it happened to be in DPMS OFF (or another power save mode). This > wasn't enforced though if only the FB changed, everything else (format, > connector etc.) remaining the same. In this case we only set the new FB > base and left the connector in the old power save mode. > > Fix this by forcing a full modeset whenever there is an attached FB and > any affected connector is in a power save mode. > > Signed-off-by: Imre Deak [..] > @@ -8397,8 +8412,12 @@ 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 > + } else if (crtc_connector_off(set->crtc, *set->connectors, > + set->num_connectors)) { > + config->mode_changed = true; > + } else { > config->fb_changed = true; > + } > } > > if (set->fb && (set->x != set->crtc->x || set->y != set->crtc->y)) On https://bugs.freedesktop.org/show_bug.cgi?id=64178 I had a similar problem for which I found a very similar 'workaround': Assuming the Xserver is displaying a mode a on output A, doing a: xrandr --output A --off xrandr --output A --mode a will not light up the screen. This all sounds quite similar, to the issues describe by this patch, however the patch as is will not fix this issue: With this setup the fb does not change. The crtc_connector_off() test however only runs if set->crtc->fb != set->fb is true. Thus the connector_off() test needs to happen before: - if (set->crtc->fb != set->fb) { + if (set->connectors != NULL && + connector_off(set->crtc, *set->connectors, + set->num_connectors)) { + config->mode_changed = true; + } else if (set->crtc->fb != set->fb) { Mind the test for set->connectors != NULL as now the connectors list may be empty. Cheers, Egbert.