diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-03-17 02:07:37 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-03-31 00:55:52 -0400 |
commit | e2b0a8e1e697dbcd62574a32f4f96151d21bdd36 (patch) | |
tree | f01af37a48144020bcdd9fdc0cbf6c381c5b316b | |
parent | ac1aade6876465060ebf9a71675dcb7305f0bafa (diff) |
drm/radeon/kms: add hw_i2c module option
Turn off hw i2c by default except for mm i2c which
is hw only until we sort out the remaining prescale
issues on older chips. hw i2c can be enabled with
hw_i2c=1.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_i2c.c | 8 |
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 1710b9e3ef7d..034218c3dbbb 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -92,6 +92,7 @@ extern int radeon_new_pll; | |||
92 | extern int radeon_dynpm; | 92 | extern int radeon_dynpm; |
93 | extern int radeon_audio; | 93 | extern int radeon_audio; |
94 | extern int radeon_disp_priority; | 94 | extern int radeon_disp_priority; |
95 | extern int radeon_hw_i2c; | ||
95 | 96 | ||
96 | /* | 97 | /* |
97 | * Copy from radeon_drv.h so we don't have to include both and have conflicting | 98 | * Copy from radeon_drv.h so we don't have to include both and have conflicting |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 6fd511eec96c..055a51732dcb 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -93,6 +93,7 @@ int radeon_new_pll = -1; | |||
93 | int radeon_dynpm = -1; | 93 | int radeon_dynpm = -1; |
94 | int radeon_audio = 1; | 94 | int radeon_audio = 1; |
95 | int radeon_disp_priority = 0; | 95 | int radeon_disp_priority = 0; |
96 | int radeon_hw_i2c = 0; | ||
96 | 97 | ||
97 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); | 98 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); |
98 | module_param_named(no_wb, radeon_no_wb, int, 0444); | 99 | module_param_named(no_wb, radeon_no_wb, int, 0444); |
@@ -139,6 +140,9 @@ module_param_named(audio, radeon_audio, int, 0444); | |||
139 | MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); | 140 | MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); |
140 | module_param_named(disp_priority, radeon_disp_priority, int, 0444); | 141 | module_param_named(disp_priority, radeon_disp_priority, int, 0444); |
141 | 142 | ||
143 | MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); | ||
144 | module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); | ||
145 | |||
142 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) | 146 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) |
143 | { | 147 | { |
144 | drm_radeon_private_t *dev_priv = dev->dev_private; | 148 | drm_radeon_private_t *dev_priv = dev->dev_private; |
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 352110fd68f6..5def6f5dff38 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c | |||
@@ -879,9 +879,11 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, | |||
879 | i2c->adapter.owner = THIS_MODULE; | 879 | i2c->adapter.owner = THIS_MODULE; |
880 | i2c->dev = dev; | 880 | i2c->dev = dev; |
881 | i2c_set_adapdata(&i2c->adapter, i2c); | 881 | i2c_set_adapdata(&i2c->adapter, i2c); |
882 | if (rec->hw_capable && | 882 | if (rec->mm_i2c || |
883 | ((rdev->family <= CHIP_RS480) || | 883 | (rec->hw_capable && |
884 | ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580)))) { | 884 | radeon_hw_i2c && |
885 | ((rdev->family <= CHIP_RS480) || | ||
886 | ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580))))) { | ||
885 | /* set the radeon hw i2c adapter */ | 887 | /* set the radeon hw i2c adapter */ |
886 | sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name); | 888 | sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name); |
887 | i2c->adapter.algo = &radeon_i2c_algo; | 889 | i2c->adapter.algo = &radeon_i2c_algo; |