drm/radeon/kms: add hw_i2c module option
Subsystems (2)
PATCH 1/1 drm/radeon/kms: add hw_i2c module option
Quoted 1 line
From
05f313069127e7dfbd28e4d8ff2142657650aeeeMon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Wed, 17 Mar 2010 02:07:37 -0400
Subject: [PATCH] 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.
--- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 4 ++++ drivers/gpu/drm/radeon/radeon_i2c.c | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon.h +1 -0
@@ -91,6 +91,7 @@ extern int radeon_tv;extern int radeon_new_pll;extern int radeon_dynpm;extern int radeon_audio; +extern int radeon_hw_i2c;/* * Copy from radeon_drv.h so we don't have to include both and have conflicting
(quoted diff) +0 -0
b/drivers/gpu/drm/radeon/radeon_drv.c
index 6eec0ec..1de124f 100644
drivers/gpu/drm/radeon/radeon_drv.c +4 -0
@@ -91,6 +91,7 @@ int radeon_tv = 1;int radeon_new_pll =-1 ;int radeon_dynpm =-1 ;int radeon_audio =1 ; +int radeon_hw_i2c =0 ;MODULE_PARM_DESC (no_wb,"Disable AGP writeback for scratch registers" );module_param_named (no_wb, radeon_no_wb, int,0444 );
@@ -134,6 +135,9 @@ module_param_named(dynpm, radeon_dynpm, int, 0444);MODULE_PARM_DESC (audio,"Audio enable (0 = disable)" );module_param_named (audio, radeon_audio, int,0444 ); +MODULE_PARM_DESC (hw_i2c,"hw i2c engine enable (0 = disable)" ); +module_param_named (hw_i2c, radeon_hw_i2c, int,0444 ); +static int radeon_suspend (struct drm_device *dev,pm_message_t state) {drm_radeon_private_t *dev_priv = dev->dev_private;
(quoted diff) +0 -0
b/drivers/gpu/drm/radeon/radeon_i2c.c
index 352110f..5def6f5 100644
drivers/gpu/drm/radeon/radeon_i2c.c +0 -0
@@ -879,9 +879,11 @@ struct radeon_i2c_chan *radeon_i2c_create(struct
drm_device *dev,
i2c->adapter.owner = THIS_MODULE;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
- if (rec->hw_capable &&
- ((rdev->family <= CHIP_RS480) ||
- ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580)))) {
+ if (rec->mm_i2c ||
+ (rec->hw_capable &&
+ radeon_hw_i2c &&
+ ((rdev->family <= CHIP_RS480) ||
+ ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580))))) {
/* set the radeon hw i2c adapter */ sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name); i2c->adapter.algo = &radeon_i2c_algo;
Signature · 1 line
1.5.6.3
From 05f313069127e7dfbd28e4d8ff2142657650aeee Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Wed, 17 Mar 2010 02:07:37 -0400
Subject: [PATCH] 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.
--- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 4 ++++ drivers/gpu/drm/radeon/radeon_i2c.c | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon.h +1 -0
@@ -91,6 +91,7 @@ extern int radeon_tv;extern int radeon_new_pll;extern int radeon_dynpm;extern int radeon_audio; +extern int radeon_hw_i2c;/* * Copy from radeon_drv.h so we don't have to include both and have conflicting
drivers/gpu/drm/radeon/radeon_drv.c +4 -0
@@ -91,6 +91,7 @@ int radeon_tv = 1;int radeon_new_pll =-1 ;int radeon_dynpm =-1 ;int radeon_audio =1 ; +int radeon_hw_i2c =0 ;MODULE_PARM_DESC (no_wb,"Disable AGP writeback for scratch registers" );module_param_named (no_wb, radeon_no_wb, int,0444 );
@@ -134,6 +135,9 @@ module_param_named(dynpm, radeon_dynpm, int, 0444);MODULE_PARM_DESC (audio,"Audio enable (0 = disable)" );module_param_named (audio, radeon_audio, int,0444 ); +MODULE_PARM_DESC (hw_i2c,"hw i2c engine enable (0 = disable)" ); +module_param_named (hw_i2c, radeon_hw_i2c, int,0444 ); +static int radeon_suspend (struct drm_device *dev,pm_message_t state) {drm_radeon_private_t *dev_priv = dev->dev_private;
drivers/gpu/drm/radeon/radeon_i2c.c +5 -3
@@ -879,9 +879,11 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, i2c->adapter.owner =THIS_MODULE ; i2c->dev = dev;i2c_set_adapdata (&i2c->adapter, i2c); -if (rec->hw_capable && - ((rdev->family <=CHIP_RS480 ) || - ((rdev->family >=CHIP_RV515 ) && (rdev->family <=CHIP_R580 )))) { +if (rec->mm_i2c || + (rec->hw_capable && + radeon_hw_i2c && + ((rdev->family <=CHIP_RS480 ) || + ((rdev->family >=CHIP_RV515 ) && (rdev->family <=CHIP_R580 ))))) {/* set the radeon hw i2c adapter */ sprintf (i2c->adapter.name,"Radeon i2c hw bus %s" , name); i2c->adapter.algo = &radeon_i2c_algo;
Signature · 1 line
1.5.6.3
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel