[PATCH 08/12] drm: Export drm_property_replace_global_blob function

Damien Lespiau damien.lespiau at intel.com
Thu Jul 2 09:32:10 PDT 2015


On Wed, Jul 01, 2015 at 09:18:18PM +0530, Kausal Malladi wrote:
> From: Kausal Malladi <Kausal.Malladi at intel.com>
> 
> drm_property_replace_global_blob() is getting used by many wrapper
> functions to replace an existing blob with new values. Because this
> function was static, modules are forced to create wrapper functions in
> same file. Exporting this function will remove need for such wrapper
> functions.
> 
> This patch makes the function drm_property_replace_global_blob() be
> accessible globally.
> 
> Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
> Signed-off-by: Kausal Malladi <Kausal.Malladi at intel.com>
> ---
>  drivers/gpu/drm/drm_crtc.c | 2 +-
>  include/drm/drm_crtc.h     | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 5d12ea9..15263a1 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -4458,7 +4458,7 @@ EXPORT_SYMBOL(drm_property_lookup_blob);
>   * a completely atomic update. The access to path_blob_ptr is protected by the
>   * caller holding a lock on the connector.
>   */
> -static int drm_property_replace_global_blob(struct drm_device *dev,
> +int drm_property_replace_global_blob(struct drm_device *dev,
>                                              struct drm_property_blob **replace,
>                                              size_t length,
>                                              const void *data,

Whether this is a good idea or not, you probably want an EXPORT_SYMBOL().

-- 
Damien

> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 408d39a..821424e 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -1541,6 +1541,12 @@ extern struct drm_property *drm_mode_create_rotation_property(struct drm_device
>  							      unsigned int supported_rotations);
>  extern unsigned int drm_rotation_simplify(unsigned int rotation,
>  					  unsigned int supported_rotations);
> +extern int drm_property_replace_global_blob(struct drm_device *dev,
> +					struct drm_property_blob **replace,
> +					size_t length,
> +					const void *data,
> +					struct drm_mode_object *obj_holds_id,
> +					struct drm_property *prop_holds_id);
>  
>  /* Helpers */
>  
> -- 
> 2.4.5
> 


More information about the dri-devel mailing list