@@ -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,
@@ -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)
@@ -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);
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@samsung.com> --- 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(-)