From 82fa7ec352426c7e3d5210aac8ea1030232cc0f3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 6 Jan 2014 14:30:56 +0000 Subject: [PATCH] uxa: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff As we assume that Suspend, Standby alias to Off and disable the crtc when switching to any mode other than On, we need to also perform the backlight updates for Suspend,Standby prior to passing the DPMS value onto the kernel. Suggested-by: Alexander Monakov Signed-off-by: Chris Wilson --- src/uxa/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index f584f357..39d85071 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -1118,7 +1118,7 @@ intel_output_dpms(xf86OutputPtr output, int dpms) if (!strcmp(props->name, "DPMS")) { /* Make sure to reverse the order between on and off. */ - if (dpms == DPMSModeOff) + if (dpms != DPMSModeOn) intel_output_dpms_backlight(output, intel_output->dpms_mode, dpms); @@ -1129,7 +1129,7 @@ intel_output_dpms(xf86OutputPtr output, int dpms) props->prop_id, dpms); - if (dpms != DPMSModeOff) + if (dpms == DPMSModeOn) intel_output_dpms_backlight(output, intel_output->dpms_mode, dpms);