summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-15 10:04:28 +1000
committerDave Airlie <airlied@redhat.com>2008-02-15 10:04:28 +1000
commit75b01cf996f2efdd72c5280238460443d5d1fbc7 (patch)
tree6679080a18dfc0b1fd574767858a51fcb4077986
parentf2f8ace3e1342d83096bf392922130d39cd86ec2 (diff)
switch naming to new proposed scheme
-rw-r--r--linux-core/drmP.h4
-rw-r--r--linux-core/drm_proc.c2
-rw-r--r--linux-core/drm_stub.c18
-rw-r--r--linux-core/drm_sysfs.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 697dc9a1..ab17ba0e 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -762,8 +762,8 @@ struct drm_driver {
#define DRM_MINOR_UNASSIGNED 0
#define DRM_MINOR_CONTROL 1
-#define DRM_MINOR_RENDER 2
-#define DRM_MINOR_GPGPU 3 /* this node is restricted to operations that don't require a master */
+#define DRM_MINOR_LEGACY 2
+#define DRM_MINOR_RENDER 3
/**
* DRM minor structure. This structure represents a drm minor number.
*/
diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c
index 2ccf6d99..e10501f2 100644
--- a/linux-core/drm_proc.c
+++ b/linux-core/drm_proc.c
@@ -210,7 +210,6 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data)
{
struct drm_minor *minor = (struct drm_minor *) data;
- struct drm_master *master = minor->master;
struct drm_device *dev = minor->dev;
int len = 0;
struct drm_map *map;
@@ -269,7 +268,6 @@ static int drm_vm_info(char *buf, char **start, off_t offset, int request,
int *eof, void *data)
{
struct drm_minor *minor = (struct drm_minor *) data;
- struct drm_master *master = minor->master;
struct drm_device *dev = minor->dev;
int ret;
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index d3992584..801dab09 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -56,14 +56,14 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
{
int new_id;
int ret;
- int base = 0, limit = 127;
+ int base = 0, limit = 63;
if (type == DRM_MINOR_CONTROL) {
+ base += 64;
+ limit = base + 127;
+ } else if (type == DRM_MINOR_RENDER) {
base += 128;
- limit = base + 64;
- } else if (type == DRM_MINOR_GPGPU) {
- base += 192;
- limit = base + 64;
+ limit = base + 255;
}
again:
@@ -270,7 +270,7 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t
idr_replace(&drm_minors_idr, new_minor, minor_id);
- if (type == DRM_MINOR_RENDER) {
+ if (type == DRM_MINOR_LEGACY) {
ret = drm_proc_init(new_minor, minor_id, drm_proc_root);
if (ret) {
DRM_ERROR("DRM: Failed to initialize /proc/dri.\n");
@@ -292,7 +292,7 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t
err_g2:
- if (new_minor->type == DRM_MINOR_RENDER)
+ if (new_minor->type == DRM_MINOR_LEGACY)
drm_proc_cleanup(new_minor, drm_proc_root);
err_mem:
kfree(new_minor);
@@ -345,7 +345,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
if ((ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL)))
goto err_g3;
- if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_RENDER)))
+ if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY)))
goto err_g4;
if (dev->driver->load)
@@ -416,7 +416,7 @@ int drm_put_minor(struct drm_minor **minor_p)
struct drm_minor *minor = *minor_p;
DRM_DEBUG("release secondary minor %d\n", minor->index);
- if (minor->type == DRM_MINOR_RENDER)
+ if (minor->type == DRM_MINOR_LEGACY)
drm_proc_cleanup(minor, drm_proc_root);
drm_sysfs_device_remove(minor);
diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c
index cd03da8a..f03e5d4e 100644
--- a/linux-core/drm_sysfs.c
+++ b/linux-core/drm_sysfs.c
@@ -171,6 +171,8 @@ int drm_sysfs_device_add(struct drm_minor *minor)
minor->kdev.devt = minor->device;
if (minor->type == DRM_MINOR_CONTROL)
minor_str = "controlD%d";
+ else if (minor->type == DRM_MINOR_RENDER)
+ minor_str = "renderD%d";
else
minor_str = "card%d";