From: Hans de Goede Subject: [PATCH 2/2] uxa: Mark the output as off before making pipe changes Date: Wed, 18 Jun 2014 15:01:37 +0200 Message-ID: <1403096497-7570-2-git-send-email-hdegoede@redhat.com> References: <1403096497-7570-1-git-send-email-hdegoede@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 1DDA86E54E for ; Wed, 18 Jun 2014 06:01:42 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5ID1fYU015190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Jun 2014 09:01:41 -0400 In-Reply-To: <1403096497-7570-1-git-send-email-hdegoede@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This is a partial "backport" of commit c6cd10f536, which makes the same change for sna, to avoid users still using uxa ending up with a blackscreen after plugging in an external monitor. Signed-off-by: Hans de Goede --- src/uxa/intel_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index e00b9c2..a745dc5 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -320,6 +320,14 @@ intel_crtc_apply(xf86CrtcPtr crtc) xf86OutputPtr output = xf86_config->output[i]; struct intel_output *intel_output; + /* Make sure we mark the output as off (and save the backlight) + * before the kernel turns it off due to changing the pipe. + * This is necessary as the kernel may turn off the backlight + * and we lose track of the user settings. + */ + if (output->crtc == NULL) + output->funcs->dpms(output, DPMSModeOff); + if (output->crtc != crtc) continue; -- 2.0.0