radeon_ms: update to follow lastest modesetting change

main
Jerome Glisse 2007-12-20 12:35:54 +01:00
parent d8c94a84b7
commit 21b01cd4b5
5 changed files with 21 additions and 27 deletions

View File

@ -87,17 +87,6 @@ enum radeon_monitor_type {
MT_STV = 5
};
enum radeon_connector_type {
CONNECTOR_NONE,
CONNECTOR_PROPRIETARY,
CONNECTOR_VGA,
CONNECTOR_DVI_I,
CONNECTOR_DVI_D,
CONNECTOR_CTV,
CONNECTOR_STV,
CONNECTOR_UNSUPPORTED
};
enum radeon_output_type {
OUTPUT_NONE,
OUTPUT_DAC1,
@ -131,7 +120,6 @@ struct radeon_ms_connector {
int crtc;
uint32_t i2c_reg;
char outputs[RADEON_MAX_OUTPUTS];
char name[32];
};
struct radeon_ms_output {
@ -459,8 +447,7 @@ int radeon_ms_wait_for_idle(struct drm_device *dev);
/* radeon_ms_i2c.c */
void radeon_ms_i2c_destroy(struct radeon_ms_i2c *i2c);
struct radeon_ms_i2c *radeon_ms_i2c_create(struct drm_device *dev,
const uint32_t reg,
const char *name);
const uint32_t reg, int type);
/* radeon_ms_irq.c */
void radeon_ms_irq_emit(struct drm_device *dev);

View File

@ -369,8 +369,8 @@ int radeon_ms_dac2_mode_set(struct radeon_ms_output *output,
case CHIP_R420:
case CHIP_R430:
case CHIP_R480:
if (connector->type != CONNECTOR_CTV &&
connector->type != CONNECTOR_STV) {
if (connector->type != ConnectorComposite &&
connector->type != ConnectorSVIDEO) {
state->dac_cntl2 |= DAC_CNTL2__DAC2_CLK_SEL;
}
}

View File

@ -58,19 +58,17 @@ static struct radeon_ms_output radeon_ms_dac2 = {
};
static struct radeon_ms_connector radeon_ms_vga = {
NULL, NULL, NULL, CONNECTOR_VGA, MT_NONE, 0, GPIO_DDC1,
NULL, NULL, NULL, ConnectorVGA, MT_NONE, 0, GPIO_DDC1,
{
0, -1, -1, -1, -1, -1, -1, -1
},
"VGA"
}
};
static struct radeon_ms_connector radeon_ms_dvi_i_2 = {
NULL, NULL, NULL, CONNECTOR_DVI_I, MT_NONE, 0, GPIO_DDC2,
NULL, NULL, NULL, ConnectorDVII, MT_NONE, 0, GPIO_DDC2,
{
1, -1, -1, -1, -1, -1, -1, -1
},
"DVI-I"
}
};
static struct radeon_ms_properties properties[] = {

View File

@ -219,8 +219,7 @@ static void set_data(void *i2c_priv, int data)
*
*/
struct radeon_ms_i2c *radeon_ms_i2c_create(struct drm_device *dev,
const uint32_t reg,
const char *name)
const uint32_t reg, int type)
{
struct radeon_ms_i2c *i2c;
int ret;
@ -233,7 +232,17 @@ struct radeon_ms_i2c *radeon_ms_i2c_create(struct drm_device *dev,
i2c->drm_dev = dev;
i2c->reg = reg;
snprintf(i2c->adapter.name, I2C_NAME_SIZE, "radeon-%s", name);
switch (type) {
case ConnectorVGA:
snprintf(i2c->adapter.name, I2C_NAME_SIZE, "radeon-VGA");
break;
case ConnectorDVII:
snprintf(i2c->adapter.name, I2C_NAME_SIZE, "radeon-DVII");
break;
default:
snprintf(i2c->adapter.name, I2C_NAME_SIZE, "radeon-UNKNOWN");
break;
}
i2c->adapter.owner = THIS_MODULE;
/* fixme need to take a look at what its needed for */
i2c->adapter.id = I2C_HW_B_RADEON;

View File

@ -249,14 +249,14 @@ int radeon_ms_connectors_from_properties(struct drm_device *dev)
dev_priv->properties->connectors[i],
sizeof(struct radeon_ms_connector));
connector->i2c = radeon_ms_i2c_create(dev,
connector->i2c_reg, connector->name);
connector->i2c_reg, connector->type);
if (connector->i2c == NULL) {
radeon_ms_connectors_destroy(dev);
return -ENOMEM;
}
output = drm_output_create(dev,
&radeon_ms_output_funcs,
connector->name);
connector->type);
if (output == NULL) {
radeon_ms_connectors_destroy(dev);
return -EINVAL;