Skip to contentSkip to conversation

sensors-detect: Skip addresses 0x37 and 0x4f on DDC channels

PATCH In review Jean Delvare 2 participants 3 messages May 28, 2015 – May 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sensors-detect: Skip addresses 0x37 and 0x4f on DDC channels

We already skip EDID addresses (0x50-0x57) by default on graphics card I2C/DDC buses. Also skip 0x37 (DDC/CI) and 0x4f which was recently reported as corrupting a laptop's display when probed.

This closes ticket #2392.
http://www.lm-sensors.org/ticket/2392

---
 prog/detect/sensors-detect |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
prog/detect/sensors-detect +4 -2
@@ -3943,8 +3943,10 @@ sub scan_i2c_adapter
 		chomp($input);
 		@not_to_scan = parse_not_to_scan(0x03, 0x77, $input);
 	} elsif (($class & 0xff00) = 0x0300) {
-		# Skip EDID addresses by default on graphics adapters
-		@not_to_scan = parse_not_to_scan(0x03, 0x77, "0x50-0x57");
+		# Skip EDID and DDC/CI addresses by default on graphics
+		# adapters. Also skip address 0x4f which was reported in a
+		# display corruption case.
+		@not_to_scan = parse_not_to_scan(0x03, 0x77, "0x37,0x50-0x57,0x4f");
 	}
 
 	open(local *FILE, "$dev_i2c$adapter_nr") or
Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 6 lines · Jean Delvare

We already skip EDID addresses (0x50-0x57) by default on graphics card I2C/DDC buses. Also skip 0x37 (DDC/CI) and 0x4f which was recently reported as corrupting a laptop's display when probed.

This closes ticket #2392.
http://www.lm-sensors.org/ticket/2392

Looks good. Would it make sense to add a comment somewhere to the Linux kernel, listing addresses which should not be scanned as well as the reasons ?

Thanks,
Guenter

Quoted 29 lines
---
 prog/detect/sensors-detect |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
prog/detect/sensors-detect +4 -2
@@ -3943,8 +3943,10 @@ sub scan_i2c_adapter
 		chomp($input);
 		@not_to_scan = parse_not_to_scan(0x03, 0x77, $input);
 	} elsif (($class & 0xff00) = 0x0300) {
-		# Skip EDID addresses by default on graphics adapters
-		@not_to_scan = parse_not_to_scan(0x03, 0x77, "0x50-0x57");
+		# Skip EDID and DDC/CI addresses by default on graphics
+		# adapters. Also skip address 0x4f which was reported in a
+		# display corruption case.
+		@not_to_scan = parse_not_to_scan(0x03, 0x77, "0x37,0x50-0x57,0x4f");
 	}
 
 	open(local *FILE, "$dev_i2c$adapter_nr") or
Signature · 8 lines
-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Jean Delvare
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare

We already skip EDID addresses (0x50-0x57) by default on graphics card I2C/DDC buses. Also skip 0x37 (DDC/CI) and 0x4f which was recently reported as corrupting a laptop's display when probed.

This closes ticket #2392.
http://www.lm-sensors.org/ticket/2392

Looks good. Would it make sense to add a comment somewhere to the Linux kernel, listing addresses which should not be scanned as well as the reasons ?

Why not... Maybe in the "New drivers" section of
Documentation/hwmon/submitting-patches?

In fact it might be better to list the address ranges which can probed:
0x18-0x1f, 0x28-0x2f and 0x48-0x4f. Then there are 4 individual addresses also probed by sensors-detect: 0x58, 0x5c, 0x73 and 0x77. Ideally hwmon drivers would not probe any other address.

I'll prepare a patch, thanks for the suggestion.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors