Skip to contentSkip to conversation

drm/radeon/kms: Fix I2C mask definitions

PATCH In review Jean Delvare 2 participants 2 messages Oct 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: Fix I2C mask definitions

Commit 9b9fe724 accidentally used RADEON_GPIO_EN_* where RADEON_GPIO_MASK_* was intended. This caused improper initialization of I2C buses, mostly visible when setting i2c_algo_bit.bit_test=1. Using the right constants fixes the problem.

---
This needs testing on more combios-based Radeon cards, please. I could only test it on one Radeon 9200 (RV280) card.

 drivers/gpu/drm/radeon/radeon_combios.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_combios.c +2 -2
@@ -620,8 +620,8 @@ static struct radeon_i2c_bus_rec combios
 		i2c.y_data_mask = 0x80;
 	} else {
 		/* default masks for ddc pads */
-		i2c.mask_clk_mask = RADEON_GPIO_EN_1;
-		i2c.mask_data_mask = RADEON_GPIO_EN_0;
+		i2c.mask_clk_mask = RADEON_GPIO_MASK_1;
+		i2c.mask_data_mask = RADEON_GPIO_MASK_0;
 		i2c.a_clk_mask = RADEON_GPIO_A_1;
 		i2c.a_data_mask = RADEON_GPIO_A_0;
 		i2c.en_clk_mask = RADEON_GPIO_EN_1;
Signature · 2 lines
Jean Delvare
Suse L3
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines

-----Original Message-----
From: Jean Delvare [mailto:[email protected]]
Sent: Thursday, October 06, 2011 12:16 PM
To: David Airlie
Cc: Deucher, Alexander; [email protected]; Jerome Glisse
Subject: [PATCH] drm/radeon/kms: Fix I2C mask definitions

Commit 9b9fe724 accidentally used RADEON_GPIO_EN_* where RADEON_GPIO_MASK_* was intended. This caused improper initialization of I2C buses, mostly visible when setting i2c_algo_bit.bit_test=1. Using the right constants fixes the problem.

Quoted 4 lines

The patch is correct. Looks like a copy paste error.

Quoted 26 lines

---
This needs testing on more combios-based Radeon cards, please. I could only test it on one Radeon 9200 (RV280) card.

 drivers/gpu/drm/radeon/radeon_combios.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-3.0.orig/drivers/gpu/drm/radeon/radeon_combios.c 2011-10-06
14:52:59.000000000 +0200
+++ linux-3.0/drivers/gpu/drm/radeon/radeon_combios.c 2011-10-06
14:53:23.000000000 +0200

drivers/gpu/drm/radeon/radeon_combios.c +2 -3
@@ -620,8 +620,8 @@ static struct radeon_i2c_bus_rec combios
 		i2c.y_data_mask = 0x80;
 	} else {
 		/* default masks for ddc pads */
-		i2c.mask_clk_mask = RADEON_GPIO_EN_1;
-		i2c.mask_data_mask = RADEON_GPIO_EN_0;
+		i2c.mask_clk_mask = RADEON_GPIO_MASK_1;
+		i2c.mask_data_mask = RADEON_GPIO_MASK_0;
 		i2c.a_clk_mask = RADEON_GPIO_A_1;
 		i2c.a_data_mask = RADEON_GPIO_A_0;
 		i2c.en_clk_mask = RADEON_GPIO_EN_1;
 
--

Jean Delvare
Suse L3