Skip to contentSkip to conversation

drm/radeon: warn users when hw_i2c is enabled

PATCH In review Alex Deucher 4 participants 6 messages Jan 7, 2014

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

PATCH 1/1 drm/radeon: warn users when hw_i2c is enabled

The hw i2c engines are disabled by default as the current implementation is still experimental. Print a warning when users enable it so that it's obvious when the option is enabled.

---
 drivers/gpu/drm/radeon/radeon_i2c.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_i2c.c +3 -0
index fc60b74..74bfbf8 100644
@@ -1020,6 +1020,9 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)
 /* Add the default buses */
 void radeon_i2c_init(struct radeon_device *rdev)
 {
+	if (radeon_hw_i2c == 1)
+		DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n");
+
 	if (rdev->is_atom_bios)
 		radeon_atombios_i2c_init(rdev);
 	else
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Am 07.01.2014 16:14, schrieb Alex Deucher:

Quoted 7 lines

The hw i2c engines are disabled by default as the current implementation is still experimental. Print a warning when users enable it so that it's obvious when the option is enabled.

Quoted 18 lines
---
  drivers/gpu/drm/radeon/radeon_i2c.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/radeon/radeon_i2c.c +3 -0
index fc60b74..74bfbf8 100644
@@ -1020,6 +1020,9 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)
  /* Add the default buses */
  void radeon_i2c_init(struct radeon_device *rdev)
  {
+	if (radeon_hw_i2c == 1)
+		DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n");
+
  	if (rdev->is_atom_bios)
  		radeon_atombios_i2c_init(rdev);
  	else
#2 lore raw
In reply to Alex Deucher
Quoted 5 lines · Alex Deucher

The hw i2c engines are disabled by default as the current implementation is still experimental. Print a warning when users enable it so that it's obvious when the option is enabled.

Does hardware I2C actually have any advantage in the DDC use case? AFAICT it's only transferring small amounts of data and mostly on display connect events, so not very often.

Best regards
Grigori

#3 lore raw
Quoted 11 lines · Grigori Goronzy
Quoted 6 lines · Alex Deucher

The hw i2c engines are disabled by default as the current implementation is still experimental. Print a warning when users enable it so that it's obvious when the option is enabled.

Does hardware I2C actually have any advantage in the DDC use case? AFAICT it's only transferring small amounts of data and mostly on display connect events, so not very often.

It's lower CPU usage compared to bit-banging and can generate interrupts if you want to do something else while it fetches the EDID.

Alex

#4 lore raw
In reply to Alex Deucher

2014/1/7 Alex Deucher <[email protected]>:

drivers/gpu/drm/radeon/radeon_i2c.c void radeon_i2c_destroy(struct radeon_i2c_chan *i2c) · line 1024

Quoted 2 lines
drivers/gpu/drm/radeon/radeon_i2c.c +2 -0
+       if (radeon_hw_i2c == 1)
+               DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n");

What about simple
if (radeon_hw_i2c)
? Values 2, 3, ... also enable i2c.

#5 lore raw
Quoted 7 lines · Rafał Miłecki

2014/1/7 Alex Deucher <[email protected]>:

drivers/gpu/drm/radeon/radeon_i2c.c void radeon_i2c_destroy(struct radeon_i2c_chan *i2c) · line 1024

Quoted 2 lines
drivers/gpu/drm/radeon/radeon_i2c.c +2 -0
+       if (radeon_hw_i2c == 1)
+               DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n");

What about simple
if (radeon_hw_i2c)
? Values 2, 3, ... also enable i2c.

Updated patch sent. thanks!

Alex