diff options
author | Dave Airlie <airlied@redhat.com> | 2017-03-07 13:59:53 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-03-07 13:59:53 +1000 |
commit | b558dfd56a5c1f915327967ecfe1181cf2a7a494 (patch) | |
tree | 28ed2b90b5d362eaf535b725a3f560eb645892f0 /drivers/gpu/drm/drm_mode_object.c | |
parent | c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff) | |
parent | ca39b449f6d03e8235969f12f5dd25b8eb4304d6 (diff) | |
download | linux-b558dfd56a5c1f915327967ecfe1181cf2a7a494.tar.bz2 |
Merge tag 'drm-misc-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc into drm-next
First slice of drm-misc-next for 4.12:
Core/subsystem-wide:
- link status core patch from Manasi, for signalling link train fail
to userspace. I also had the i915 patch in here, but that had a
small buglet in our CI, so reverted.
- more debugfs_remove removal from Noralf, almost there now (Noralf
said he'll try to follow up with the stragglers).
- drm todo moved into kerneldoc, for better visibility (see
Documentation/gpu/todo.rst), lots of starter tasks in there.
- devm_ of helpers + use it in sti (from Ben Gaignard, acked by Rob
Herring)
- extended framebuffer fbdev support (for fbdev flipping), and vblank
wait ioctl fbdev support (Maxime Ripard)
- misc small things all over, as usual
- add vblank callbacks to drm_crtc_funcs, plus make lots of good use
of this to simplify drivers (Shawn Guo)
- new atomic iterator macros to unconfuse old vs. new state
Small drivers:
- vc4 improvements from Eric
- vc4 kerneldocs (Eric)!
- tons of improvements for dw-mipi-dsi in rockchip from John Keeping
and Chris Zhong.
- MAINTAINERS entries for drivers managed in drm-misc. It's not yet
official, still an experiment, but definitely not complete fail and
better to avoid confusion. We kinda screwed that up with drm-misc a
bit when we started committers last year.
- qxl atomic conversion (Gabriel Krisman)
- bunch of virtual driver polish (qxl, virgl, ...)
- misc tiny patches all over
This is the first time we've done the same merge-window blackout for
drm-misc as we've done for drm-intel for ages, hence why we have a
_lot_ of stuff queued already. But it's still only half of drm-intel
(room to grow!), and the drivers in drm-misc experiment seems to work
at least insofar as that you also get lots of driver updates here
alredy.
* tag 'drm-misc-next-2017-03-06' of git://anongit.freedesktop.org/git/drm-misc: (141 commits)
drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
drm/vc4: Fulfill user BO creation requests from the kernel BO cache.
Revert "drm/i915: Implement Link Rate fallback on Link training failure"
drm/fb-helper: implement ioctl FBIO_WAITFORVSYNC
drm: Update drm_fbdev_cma_init documentation
drm/rockchip/dsi: add dw-mipi power domain support
drm/rockchip/dsi: fix insufficient bandwidth of some panel
dt-bindings: add power domain node for dw-mipi-rockchip
drm/rockchip/dsi: remove mode_valid function
drm/rockchip/dsi: dw-mipi: correct the coding style
drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi
dt-bindings: add rk3399 support for dw-mipi-rockchip
drm/rockchip: dw-mipi-dsi: add reset control
drm/rockchip: dw-mipi-dsi: support non-burst modes
drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
drm/rockchip: vop: test for P{H,V}SYNC
drm/rockchip: dw-mipi-dsi: use positive check for N{H, V}SYNC
drm/rockchip: dw-mipi-dsi: use specific poll helper
drm/rockchip: dw-mipi-dsi: improve PLL configuration
drm/rockchip: dw-mipi-dsi: properly configure PHY timing
...
Diffstat (limited to 'drivers/gpu/drm/drm_mode_object.c')
-rw-r--r-- | drivers/gpu/drm/drm_mode_object.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index 220a6c1f4ab9..da9a9adbcc98 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -31,11 +31,9 @@ * Internal function to assign a slot in the object idr and optionally * register the object into the idr. */ -int drm_mode_object_get_reg(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, bool register_obj, + void (*obj_free_cb)(struct kref *kref)) { int ret; @@ -59,23 +57,21 @@ int drm_mode_object_get_reg(struct drm_device *dev, } /** - * drm_mode_object_get - allocate a new modeset identifier + * drm_mode_object_add - allocate a new modeset identifier * @dev: DRM device * @obj: object pointer, used to generate unique ID * @obj_type: object type * * Create a unique identifier based on @ptr in @dev's identifier space. Used - * for tracking modes, CRTCs and connectors. Note that despite the _get postfix - * modeset identifiers are _not_ reference counted. Hence don't use this for - * reference counted modeset objects like framebuffers. + * for tracking modes, CRTCs and connectors. * * Returns: * Zero on success, error code on failure. */ -int drm_mode_object_get(struct drm_device *dev, +int drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, uint32_t obj_type) { - return drm_mode_object_get_reg(dev, obj, obj_type, true, NULL); + return __drm_mode_object_add(dev, obj, obj_type, true, NULL); } void drm_mode_object_register(struct drm_device *dev, @@ -137,7 +133,7 @@ struct drm_mode_object *__drm_mode_object_find(struct drm_device *dev, * * This function is used to look up a modeset object. It will acquire a * reference for reference counted objects. This reference must be dropped again - * by callind drm_mode_object_unreference(). + * by callind drm_mode_object_put(). */ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type) @@ -150,38 +146,38 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, EXPORT_SYMBOL(drm_mode_object_find); /** - * drm_mode_object_unreference - decr the object refcnt - * @obj: mode_object + * drm_mode_object_put - release a mode object reference + * @obj: DRM mode object * * This function decrements the object's refcount if it is a refcounted modeset * object. It is a no-op on any other object. This is used to drop references - * acquired with drm_mode_object_reference(). + * acquired with drm_mode_object_get(). */ -void drm_mode_object_unreference(struct drm_mode_object *obj) +void drm_mode_object_put(struct drm_mode_object *obj) { if (obj->free_cb) { DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); kref_put(&obj->refcount, obj->free_cb); } } -EXPORT_SYMBOL(drm_mode_object_unreference); +EXPORT_SYMBOL(drm_mode_object_put); /** - * drm_mode_object_reference - incr the object refcnt - * @obj: mode_object + * drm_mode_object_get - acquire a mode object reference + * @obj: DRM mode object * * This function increments the object's refcount if it is a refcounted modeset * object. It is a no-op on any other object. References should be dropped again - * by calling drm_mode_object_unreference(). + * by calling drm_mode_object_put(). */ -void drm_mode_object_reference(struct drm_mode_object *obj) +void drm_mode_object_get(struct drm_mode_object *obj) { if (obj->free_cb) { DRM_DEBUG("OBJ ID: %d (%d)\n", obj->id, kref_read(&obj->refcount)); kref_get(&obj->refcount); } } -EXPORT_SYMBOL(drm_mode_object_reference); +EXPORT_SYMBOL(drm_mode_object_get); /** * drm_object_attach_property - attach a property to a modeset object @@ -367,7 +363,7 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, &arg->count_props); out_unref: - drm_mode_object_unreference(obj); + drm_mode_object_put(obj); out: drm_modeset_unlock_all(dev); return ret; @@ -432,7 +428,7 @@ int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, drm_property_change_valid_put(property, ref); out_unref: - drm_mode_object_unreference(arg_obj); + drm_mode_object_put(arg_obj); out: drm_modeset_unlock_all(dev); return ret; |