[Intel-gfx] [PATCH v2 05/10] drm: Add a new function for updating color blob

Sharma, Shashank shashank.sharma at intel.com
Sat Jun 6 04:54:46 PDT 2015


Regards
Shashank

On 6/6/2015 6:30 AM, Matt Roper wrote:
> On Thu, Jun 04, 2015 at 07:12:36PM +0530, Kausal Malladi wrote:
>> From: Kausal Malladi <Kausal.Malladi at intel.com>
>>
>> This patch adds a new function to update color blob properties
>> and exports it.
>>
>> v2: Addressing Sonika's comment,
>> 1. Moved this function to a separate patch
>> 2. Removed one input parameter to the function
>>
>> Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
>> Signed-off-by: Kausal Malladi <Kausal.Malladi at intel.com>
>
> This function is basically just a pass-through.  Can we just un-static
> drm_property_replace_global_blob() so that it can be called directly
> instead?
>
>
> Matt
Yes, sure. In fact we would like to do that, the same comment was given 
by other reviewers. But when we looked at some other examples present in 
the same file (mode_property, edid_property), they have created a 
wrapper function around this, in the same file. So just followed the 
convention, but if that can be done, we will do it in the next patch set.
>
>> ---
>>   drivers/gpu/drm/drm_crtc.c | 15 +++++++++++++++
>>   include/drm/drm_crtc.h     |  4 ++++
>>   2 files changed, 19 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
>> index 77f87b2..f6fa147 100644
>> --- a/drivers/gpu/drm/drm_crtc.c
>> +++ b/drivers/gpu/drm/drm_crtc.c
>> @@ -4691,6 +4691,21 @@ int drm_mode_connector_set_tile_property(struct drm_connector *connector)
>>   }
>>   EXPORT_SYMBOL(drm_mode_connector_set_tile_property);
>>
>> +int drm_mode_crtc_update_color_property(struct drm_property_blob **blob,
>> +					size_t length, const void *color_data,
>> +					struct drm_mode_object *obj_holds_id,
>> +					struct drm_property *prop_holds_id)
>> +{
>> +	struct drm_device *dev = prop_holds_id->dev;
>> +	int ret;
>> +
>> +	ret = drm_property_replace_global_blob(dev,
>> +			blob, length, color_data, obj_holds_id, prop_holds_id);
>> +
>> +	return ret;
>> +}
>> +EXPORT_SYMBOL(drm_mode_crtc_update_color_property);
>> +
>>   /**
>>    * drm_mode_connector_update_edid_property - update the edid property of a connector
>>    * @connector: drm connector
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index bc44f27..31b52cb 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -1343,6 +1343,10 @@ extern void drm_mode_config_cleanup(struct drm_device *dev);
>>
>>   extern int drm_mode_connector_set_path_property(struct drm_connector *connector,
>>   						const char *path);
>> +extern int drm_mode_crtc_update_color_property(struct drm_property_blob **blob,
>> +			size_t length, const void *color_data,
>> +			struct drm_mode_object *obj_holds_id,
>> +			struct drm_property *prop_holds_id);
>>   int drm_mode_connector_set_tile_property(struct drm_connector *connector);
>>   extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
>>   						   const struct edid *edid);
>> --
>> 2.4.2
>>
>


More information about the Intel-gfx mailing list