summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/Makefile.am1
-rw-r--r--shared-core/i915_dma.c6
-rw-r--r--shared-core/radeon_ms.h15
-rw-r--r--shared-core/radeon_ms_dac.c4
-rw-r--r--shared-core/radeon_ms_drm.h8
-rw-r--r--shared-core/radeon_ms_family.c10
-rw-r--r--shared-core/radeon_ms_i2c.c15
-rw-r--r--shared-core/radeon_ms_output.c4
8 files changed, 30 insertions, 33 deletions
diff --git a/shared-core/Makefile.am b/shared-core/Makefile.am
index 42e08e75..7193e527 100644
--- a/shared-core/Makefile.am
+++ b/shared-core/Makefile.am
@@ -32,7 +32,6 @@ klibdrminclude_HEADERS = \
nouveau_drm.h \
r128_drm.h \
radeon_drm.h \
- radeon_ms_drm.h \
savage_drm.h \
sis_drm.h \
via_drm.h \
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 23e8b491..4c1a07ac 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -780,7 +780,7 @@ int i915_process_relocs(struct drm_file *file_priv,
struct drm_i915_validate_buffer *buffers,
uint32_t num_buffers)
{
- struct drm_device *dev = file_priv->head->dev;
+ struct drm_device *dev = file_priv->minor->dev;
struct drm_buffer_object *reloc_list_object;
uint32_t cur_handle = *reloc_buf_handle;
uint32_t *reloc_page;
@@ -866,7 +866,7 @@ static int i915_exec_reloc(struct drm_file *file_priv, drm_handle_t buf_handle,
struct drm_i915_validate_buffer *buffers,
uint32_t buf_count)
{
- struct drm_device *dev = file_priv->head->dev;
+ struct drm_device *dev = file_priv->minor->dev;
struct i915_relocatee_info relocatee;
int ret = 0;
int b;
@@ -926,7 +926,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
unsigned long next = 0;
int ret = 0;
unsigned buf_count = 0;
- struct drm_device *dev = file_priv->head->dev;
+ struct drm_device *dev = file_priv->minor->dev;
uint32_t buf_reloc_handle, buf_handle;
diff --git a/shared-core/radeon_ms.h b/shared-core/radeon_ms.h
index d86c40b9..ee795f3a 100644
--- a/shared-core/radeon_ms.h
+++ b/shared-core/radeon_ms.h
@@ -87,6 +87,17 @@ 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,
@@ -120,6 +131,7 @@ struct radeon_ms_connector {
int crtc;
uint32_t i2c_reg;
char outputs[RADEON_MAX_OUTPUTS];
+ char name[32];
};
struct radeon_ms_output {
@@ -447,7 +459,8 @@ 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, int type);
+ const uint32_t reg,
+ const char *name);
/* radeon_ms_irq.c */
void radeon_ms_irq_emit(struct drm_device *dev);
diff --git a/shared-core/radeon_ms_dac.c b/shared-core/radeon_ms_dac.c
index 2483eab8..297623a0 100644
--- a/shared-core/radeon_ms_dac.c
+++ b/shared-core/radeon_ms_dac.c
@@ -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 != ConnectorComposite &&
- connector->type != ConnectorSVIDEO) {
+ if (connector->type != CONNECTOR_CTV &&
+ connector->type != CONNECTOR_STV) {
state->dac_cntl2 |= DAC_CNTL2__DAC2_CLK_SEL;
}
}
diff --git a/shared-core/radeon_ms_drm.h b/shared-core/radeon_ms_drm.h
index 7186030c..842d5331 100644
--- a/shared-core/radeon_ms_drm.h
+++ b/shared-core/radeon_ms_drm.h
@@ -57,12 +57,4 @@ struct drm_radeon_execbuffer {
struct drm_fence_arg fence_arg;
};
-#define RADEON_MS_MAX_SAREA_CLIPRECTS 16
-
-struct drm_radeon_ms_sarea {
- /* the cliprects */
- struct drm_clip_rect boxes[RADEON_MS_MAX_SAREA_CLIPRECTS];
- unsigned int nbox;
-};
-
#endif
diff --git a/shared-core/radeon_ms_family.c b/shared-core/radeon_ms_family.c
index fcfec799..779595d6 100644
--- a/shared-core/radeon_ms_family.c
+++ b/shared-core/radeon_ms_family.c
@@ -58,17 +58,19 @@ static struct radeon_ms_output radeon_ms_dac2 = {
};
static struct radeon_ms_connector radeon_ms_vga = {
- NULL, NULL, NULL, ConnectorVGA, MT_NONE, 0, GPIO_DDC1,
+ NULL, NULL, NULL, CONNECTOR_VGA, 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, ConnectorDVII, MT_NONE, 0, GPIO_DDC2,
+ NULL, NULL, NULL, CONNECTOR_DVI_I, MT_NONE, 0, GPIO_DDC2,
{
1, -1, -1, -1, -1, -1, -1, -1
- }
+ },
+ "DVI-I"
};
static struct radeon_ms_properties properties[] = {
diff --git a/shared-core/radeon_ms_i2c.c b/shared-core/radeon_ms_i2c.c
index f8730702..1801c496 100644
--- a/shared-core/radeon_ms_i2c.c
+++ b/shared-core/radeon_ms_i2c.c
@@ -219,7 +219,8 @@ 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, int type)
+ const uint32_t reg,
+ const char *name)
{
struct radeon_ms_i2c *i2c;
int ret;
@@ -232,17 +233,7 @@ struct radeon_ms_i2c *radeon_ms_i2c_create(struct drm_device *dev,
i2c->drm_dev = dev;
i2c->reg = reg;
- 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;
- }
+ snprintf(i2c->adapter.name, I2C_NAME_SIZE, "radeon-%s", name);
i2c->adapter.owner = THIS_MODULE;
/* fixme need to take a look at what its needed for */
i2c->adapter.id = I2C_HW_B_RADEON;
diff --git a/shared-core/radeon_ms_output.c b/shared-core/radeon_ms_output.c
index a1ed29cb..35e5c376 100644
--- a/shared-core/radeon_ms_output.c
+++ b/shared-core/radeon_ms_output.c
@@ -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->type);
+ connector->i2c_reg, connector->name);
if (connector->i2c == NULL) {
radeon_ms_connectors_destroy(dev);
return -ENOMEM;
}
output = drm_output_create(dev,
&radeon_ms_output_funcs,
- connector->type);
+ connector->name);
if (output == NULL) {
radeon_ms_connectors_destroy(dev);
return -EINVAL;