summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drmP.h2
-rw-r--r--linux-core/drm_compat.h4
-rw-r--r--linux-core/drm_stub.c70
-rw-r--r--linux/drmP.h2
-rw-r--r--linux/drm_compat.h4
-rw-r--r--linux/drm_stub.h70
-rw-r--r--shared-core/radeon_cp.c6
-rw-r--r--shared/radeon_cp.c6
8 files changed, 4 insertions, 160 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index f4b11be1..6a0a73a6 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -672,8 +672,6 @@ typedef struct drm_device {
drm_sigdata_t sigdata; /**< For block_all_signals */
sigset_t sigmask;
- int need_reset; /**< secondary device needing reset */
-
struct file_operations *fops; /**< file operations */
struct drm_driver_fn fn_tbl;
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index f2aa10a3..d1c55cd1 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -122,10 +122,6 @@ static inline void class_simple_destroy(struct class_simple *cs){}
static inline struct class_simple *class_simple_create(struct module *owner, char *name) { return (struct class_simple *)owner; }
-static inline void drm_hotplug(void) {}
-
-static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)(void)) {}
-
#ifndef pci_pretty_name
#define pci_pretty_name(x) x->name
#endif
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index cc788a83..7037338a 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -91,73 +91,6 @@ static struct file_operations DRM(stub_fops) = {
.open = stub_open
};
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
-static int drm_hotplug (struct class_device *cdev, char **envp, int num_envp,
- char *buffer, int buffer_size)
-{
- drm_device_t *dev;
- struct pci_dev *pdev;
- char *scratch;
- int i = 0;
- int length = 0;
-
- DRM_DEBUG("\n");
- if (!cdev)
- return -ENODEV;
-
- pdev = to_pci_dev(cdev->dev);
- if (!pdev)
- return -ENODEV;
-
- scratch = buffer;
-
- /* stuff we want to pass to /sbin/hotplug */
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_CLASS=%04X",
- pdev->class);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_ID=%04X:%04X",
- pdev->vendor, pdev->device);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length,
- "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
- pdev->subsystem_device);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s",
- pci_name(pdev));
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- dev = pci_get_drvdata(pdev);
- if (dev) {
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length,
- "RESET=%s", (dev->need_reset ? "true" : "false"));
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- }
- envp[i] = 0;
-
- return 0;
-}
-#endif
/**
* Get a device minor number.
@@ -197,7 +130,7 @@ static int get_minor(struct pci_dev *pdev, const struct pci_device_id *ent)
printk (KERN_ERR "DRM: Failed to initialize /proc/dri.\n");
goto err_g1;
}
- if (!DRM(fb_loaded)) { /* set this before device_add hotplug uses it */
+ if (!DRM(fb_loaded)) {
pci_set_drvdata(pdev, dev);
pci_request_regions(pdev, DRIVER_NAME);
pci_enable_device(pdev);
@@ -407,7 +340,6 @@ int DRM(probe)(struct pci_dev *pdev, const struct pci_device_id *ent)
ret = PTR_ERR(global->drm_class);
goto err_p3;
}
- class_simple_set_hotplug(global->drm_class, drm_hotplug);
global->proc_root = create_proc_entry("dri", S_IFDIR, NULL);
if (!global->proc_root) {
diff --git a/linux/drmP.h b/linux/drmP.h
index f4b11be1..6a0a73a6 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -672,8 +672,6 @@ typedef struct drm_device {
drm_sigdata_t sigdata; /**< For block_all_signals */
sigset_t sigmask;
- int need_reset; /**< secondary device needing reset */
-
struct file_operations *fops; /**< file operations */
struct drm_driver_fn fn_tbl;
diff --git a/linux/drm_compat.h b/linux/drm_compat.h
index f2aa10a3..d1c55cd1 100644
--- a/linux/drm_compat.h
+++ b/linux/drm_compat.h
@@ -122,10 +122,6 @@ static inline void class_simple_destroy(struct class_simple *cs){}
static inline struct class_simple *class_simple_create(struct module *owner, char *name) { return (struct class_simple *)owner; }
-static inline void drm_hotplug(void) {}
-
-static inline void class_simple_set_hotplug(struct class_simple *cs, void (*fn)(void)) {}
-
#ifndef pci_pretty_name
#define pci_pretty_name(x) x->name
#endif
diff --git a/linux/drm_stub.h b/linux/drm_stub.h
index cc788a83..7037338a 100644
--- a/linux/drm_stub.h
+++ b/linux/drm_stub.h
@@ -91,73 +91,6 @@ static struct file_operations DRM(stub_fops) = {
.open = stub_open
};
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
-static int drm_hotplug (struct class_device *cdev, char **envp, int num_envp,
- char *buffer, int buffer_size)
-{
- drm_device_t *dev;
- struct pci_dev *pdev;
- char *scratch;
- int i = 0;
- int length = 0;
-
- DRM_DEBUG("\n");
- if (!cdev)
- return -ENODEV;
-
- pdev = to_pci_dev(cdev->dev);
- if (!pdev)
- return -ENODEV;
-
- scratch = buffer;
-
- /* stuff we want to pass to /sbin/hotplug */
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_CLASS=%04X",
- pdev->class);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_ID=%04X:%04X",
- pdev->vendor, pdev->device);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length,
- "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
- pdev->subsystem_device);
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length, "PCI_SLOT_NAME=%s",
- pci_name(pdev));
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- ++length;
- scratch += length;
-
- dev = pci_get_drvdata(pdev);
- if (dev) {
- envp[i++] = scratch;
- length += snprintf (scratch, buffer_size - length,
- "RESET=%s", (dev->need_reset ? "true" : "false"));
- if ((buffer_size - length <= 0) || (i >= num_envp))
- return -ENOMEM;
- }
- envp[i] = 0;
-
- return 0;
-}
-#endif
/**
* Get a device minor number.
@@ -197,7 +130,7 @@ static int get_minor(struct pci_dev *pdev, const struct pci_device_id *ent)
printk (KERN_ERR "DRM: Failed to initialize /proc/dri.\n");
goto err_g1;
}
- if (!DRM(fb_loaded)) { /* set this before device_add hotplug uses it */
+ if (!DRM(fb_loaded)) {
pci_set_drvdata(pdev, dev);
pci_request_regions(pdev, DRIVER_NAME);
pci_enable_device(pdev);
@@ -407,7 +340,6 @@ int DRM(probe)(struct pci_dev *pdev, const struct pci_device_id *ent)
ret = PTR_ERR(global->drm_class);
goto err_p3;
}
- class_simple_set_hotplug(global->drm_class, drm_hotplug);
global->proc_root = create_proc_entry("dri", S_IFDIR, NULL);
if (!global->proc_root) {
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index b1b9bf6e..cbde7ce9 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1730,7 +1730,7 @@ int radeon_cp_buffers( DRM_IOCTL_ARGS )
/* Always create a map record for MMIO and FB memory, done from DRIVER_POSTINIT */
int radeon_preinit( struct drm_device *dev, unsigned long flags )
{
- u32 save, temp, memmode;
+ u32 save, temp;
drm_radeon_private_t *dev_priv;
int ret = 0;
@@ -1769,10 +1769,6 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
/* Check if we need a reset */
if (!(dev_priv->mmio = drm_core_findmap(dev , pci_resource_start( dev->pdev, 2 ))))
return DRM_ERR(ENOMEM);
-
- memmode = RADEON_READ(RADEON_MEM_SDRAM_MODE_REG);
- DRM_DEBUG("Memmode is %x, if zero needs reset\n", memmode);
- dev->need_reset = (memmode == 0);
#if defined(__linux__)
ret = radeon_create_i2c_busses(dev);
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index b1b9bf6e..cbde7ce9 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -1730,7 +1730,7 @@ int radeon_cp_buffers( DRM_IOCTL_ARGS )
/* Always create a map record for MMIO and FB memory, done from DRIVER_POSTINIT */
int radeon_preinit( struct drm_device *dev, unsigned long flags )
{
- u32 save, temp, memmode;
+ u32 save, temp;
drm_radeon_private_t *dev_priv;
int ret = 0;
@@ -1769,10 +1769,6 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
/* Check if we need a reset */
if (!(dev_priv->mmio = drm_core_findmap(dev , pci_resource_start( dev->pdev, 2 ))))
return DRM_ERR(ENOMEM);
-
- memmode = RADEON_READ(RADEON_MEM_SDRAM_MODE_REG);
- DRM_DEBUG("Memmode is %x, if zero needs reset\n", memmode);
- dev->need_reset = (memmode == 0);
#if defined(__linux__)
ret = radeon_create_i2c_busses(dev);