diff mbox

drm/i915/crt: fix DPMS standby and suspend mode handling

Message ID 1352116311-29874-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Nov. 5, 2012, 11:51 a.m. UTC
PCH platforms and VLV should map DPMS standby and suspend modes to off, but
due to a buggy reversed comparison this is done on pre-PCH platforms
instead.

Reported-by: Loïc Yhuel <loic.yhuel@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56754
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_crt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter Nov. 6, 2012, 9:50 a.m. UTC | #1
On Mon, Nov 05, 2012 at 01:51:51PM +0200, Jani Nikula wrote:
> PCH platforms and VLV should map DPMS standby and suspend modes to off, but
> due to a buggy reversed comparison this is done on pre-PCH platforms
> instead.
> 
> Reported-by: Loïc Yhuel <loic.yhuel@gmail.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56754
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Picked up for -fixes, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 1c97c27..4cbb9ab 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -143,7 +143,7 @@  static void intel_crt_dpms(struct drm_connector *connector, int mode)
 	int old_dpms;
 
 	/* PCH platforms and VLV only support on/off. */
-	if (INTEL_INFO(dev)->gen < 5 && mode != DRM_MODE_DPMS_ON)
+	if (INTEL_INFO(dev)->gen >= 5 && mode != DRM_MODE_DPMS_ON)
 		mode = DRM_MODE_DPMS_OFF;
 
 	if (mode == connector->dpms)