[Intel-gfx] [PATCH] drm/i915: fix ELD writing for SandyBridge

Wu Fengguang fengguang.wu at intel.com
Wed Nov 9 07:55:47 CET 2011


SandyBridge should be using the same register addresses as IvyBridge.

btw, rename the register names accordingly.

Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h      |    6 +++---
 drivers/gpu/drm/i915/intel_display.c |   10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

--- linux.orig/drivers/gpu/drm/i915/i915_reg.h	2011-11-09 13:17:19.000000000 +0800
+++ linux/drivers/gpu/drm/i915/i915_reg.h	2011-11-09 13:18:39.000000000 +0800
@@ -3543,8 +3543,8 @@
 #define GEN5_ELD_VALIDB			(1 << 0)
 #define GEN5_CP_READYB			(1 << 1)
 
-#define GEN7_HDMIW_HDMIEDID_A		0xE5050
-#define GEN7_AUD_CNTRL_ST_A		0xE50B4
-#define GEN7_AUD_CNTRL_ST2		0xE50C0
+#define GEN6_HDMIW_HDMIEDID_A		0xE5050
+#define GEN6_AUD_CNTL_ST_A		0xE50B4
+#define GEN6_AUD_CNTRL_ST2		0xE50C0
 
 #endif /* _I915_REG_H_ */
--- linux.orig/drivers/gpu/drm/i915/intel_display.c	2011-11-09 13:19:28.000000000 +0800
+++ linux/drivers/gpu/drm/i915/intel_display.c	2011-11-09 13:20:02.000000000 +0800
@@ -5857,14 +5857,14 @@ static void ironlake_write_eld(struct dr
 	int aud_cntl_st;
 	int aud_cntrl_st2;
 
-	if (IS_IVYBRIDGE(connector->dev)) {
-		hdmiw_hdmiedid = GEN7_HDMIW_HDMIEDID_A;
-		aud_cntl_st = GEN7_AUD_CNTRL_ST_A;
-		aud_cntrl_st2 = GEN7_AUD_CNTRL_ST2;
-	} else {
+	if (IS_GEN5(connector->dev)) {
 		hdmiw_hdmiedid = GEN5_HDMIW_HDMIEDID_A;
 		aud_cntl_st = GEN5_AUD_CNTL_ST_A;
 		aud_cntrl_st2 = GEN5_AUD_CNTL_ST2;
+	} else {
+		hdmiw_hdmiedid = GEN6_HDMIW_HDMIEDID_A;
+		aud_cntl_st = GEN6_AUD_CNTL_ST_A;
+		aud_cntrl_st2 = GEN6_AUD_CNTRL_ST2;
 	}
 
 	i = to_intel_crtc(crtc)->pipe;



More information about the Intel-gfx mailing list