Make drm_mode_object_add() and drm_mode_object_unregister() functions public, so the drivers can register their own DRM objects to the core. Those objects can be queried by generic DRM_IOCTL_MODE_OBJ_GETPROPERTIES ioctl. Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> --- drivers/gpu/drm/drm_crtc_internal.h | 4 ---- drivers/gpu/drm/drm_mode_object.c | 2 ++ include/drm/drm_mode_object.h | 6 ++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index d077c5490041..160d489f7240 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -101,14 +101,10 @@ int drm_mode_destroyblob_ioctl(struct drm_device *dev, int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, uint32_t obj_type, bool register_obj, void (*obj_free_cb)(struct kref *kref)); -int drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, - uint32_t obj_type); void drm_mode_object_register(struct drm_device *dev, struct drm_mode_object *obj); struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type); -void drm_mode_object_unregister(struct drm_device *dev, - struct drm_mode_object *object); int drm_mode_object_get_properties(struct drm_mode_object *obj, bool atomic, uint32_t __user *prop_ptr, uint64_t __user *prop_values, diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index da9a9adbcc98..052dcabe26af 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -73,6 +73,7 @@ int drm_mode_object_add(struct drm_device *dev, { return __drm_mode_object_add(dev, obj, obj_type, true, NULL); } +EXPORT_SYMBOL(drm_mode_object_add); void drm_mode_object_register(struct drm_device *dev, struct drm_mode_object *obj) @@ -103,6 +104,7 @@ void drm_mode_object_unregister(struct drm_device *dev, } mutex_unlock(&dev->mode_config.idr_mutex); } +EXPORT_SYMBOL(drm_mode_object_unregister); struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type) diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h index a767b4a30a6d..f91aee0a1705 100644 --- a/include/drm/drm_mode_object.h +++ b/include/drm/drm_mode_object.h @@ -112,6 +112,12 @@ struct drm_object_properties { return "(unknown)"; \ } +int drm_mode_object_add(struct drm_device *dev, + struct drm_mode_object *obj, uint32_t obj_type); + +void drm_mode_object_unregister(struct drm_device *dev, + struct drm_mode_object *object); + struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type); void drm_mode_object_get(struct drm_mode_object *obj); -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel