[Intel-gfx] [PATCH 1/5] drm/modes: add connector reference counting. (v2)
Daniel Vetter
daniel at ffwll.ch
Wed Apr 27 07:28:04 UTC 2016
On Wed, Apr 27, 2016 at 12:03:25PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This uses the previous changes to add reference counts
> to drm connector objects.
>
> v2: move fbdev changes to their own patch.
> add some kerneldoc
> Signed-off-by: Dave Airlie <airlied at redhat.com>
[cut]
> @@ -2639,6 +2647,28 @@ static inline uint32_t drm_framebuffer_read_refcount(struct drm_framebuffer *fb)
> return atomic_read(&fb->base.refcount.refcount);
> }
>
> +/*
/**
otherwise kerneldoc doesn't pick it up. With that fixed
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> + * drm_connector_reference - incr the connector refcnt
> + * @connector: connector
> + *
> + * This function increments the connector's refcount.
> + */
> +static inline void drm_connector_reference(struct drm_connector *connector)
> +{
> + drm_mode_object_reference(&connector->base);
> +}
> +
> +/**
> + * drm_connector_unreference - unref a connector
> + * @connector: connector to unref
> + *
> + * This function decrements the connector's refcount and frees it if it drops to zero.
> + */
> +static inline void drm_connector_unreference(struct drm_connector *connector)
> +{
> + drm_mode_object_unreference(&connector->base);
> +}
> +
> /* Plane list iterator for legacy (overlay only) planes. */
> #define drm_for_each_legacy_plane(plane, dev) \
> list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
> --
> 2.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list