drm: Rename crtc_idr as object_idr to KMS cleanups
This patch solves this TODO task: drm_mode_config.crtc_idr is misnamed, since it contains all KMS object. Should be renamed to drm_mode_config.object_idr. Signed-off-by: Shayenne da Luz Moura <shayenneluzmoura@gmail.com> [danvet: resolve conflict with addition of privobj_list.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20181213212957.vkitkyl5cj2qh7qr@smtp.gmail.com
This commit is contained in:

committed by
Daniel Vetter

parent
63d5e06aa3
commit
b5f06893c4
@@ -38,7 +38,7 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj,
|
||||
int ret;
|
||||
|
||||
mutex_lock(&dev->mode_config.idr_mutex);
|
||||
ret = idr_alloc(&dev->mode_config.crtc_idr, register_obj ? obj : NULL,
|
||||
ret = idr_alloc(&dev->mode_config.object_idr, register_obj ? obj : NULL,
|
||||
1, 0, GFP_KERNEL);
|
||||
if (ret >= 0) {
|
||||
/*
|
||||
@@ -79,7 +79,7 @@ void drm_mode_object_register(struct drm_device *dev,
|
||||
struct drm_mode_object *obj)
|
||||
{
|
||||
mutex_lock(&dev->mode_config.idr_mutex);
|
||||
idr_replace(&dev->mode_config.crtc_idr, obj, obj->id);
|
||||
idr_replace(&dev->mode_config.object_idr, obj, obj->id);
|
||||
mutex_unlock(&dev->mode_config.idr_mutex);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void drm_mode_object_unregister(struct drm_device *dev,
|
||||
{
|
||||
mutex_lock(&dev->mode_config.idr_mutex);
|
||||
if (object->id) {
|
||||
idr_remove(&dev->mode_config.crtc_idr, object->id);
|
||||
idr_remove(&dev->mode_config.object_idr, object->id);
|
||||
object->id = 0;
|
||||
}
|
||||
mutex_unlock(&dev->mode_config.idr_mutex);
|
||||
@@ -131,7 +131,7 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev,
|
||||
struct drm_mode_object *obj = NULL;
|
||||
|
||||
mutex_lock(&dev->mode_config.idr_mutex);
|
||||
obj = idr_find(&dev->mode_config.crtc_idr, id);
|
||||
obj = idr_find(&dev->mode_config.object_idr, id);
|
||||
if (obj && type != DRM_MODE_OBJECT_ANY && obj->type != type)
|
||||
obj = NULL;
|
||||
if (obj && obj->id != id)
|
||||
|
Reference in New Issue
Block a user