switch naming to new proposed scheme
parent
f2f8ace3e1
commit
75b01cf996
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in New Issue