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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 06, 2015 at 05:24:46PM +0530, Sharma, Shashank wrote:
> 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@xxxxxxxxx>
> >>
> >>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@xxxxxxxxx>
> >>Signed-off-by: Kausal Malladi <Kausal.Malladi@xxxxxxxxx>
> >
> >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.

I think those other functions started out as somewhat more complicated
functions before drm_property_replace_global_blob() ever existed, then
eventually got whittled down to their current state via refactoring.
Rather than creating new functions today it's probably easiest to just
unstatic the function here so it can be called directly.


Matt

> >
> >>---
> >>  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
> >>
> >

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux