Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c251569b authored by Jin Li's avatar Jin Li Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: add default value for plane enum property



Add default value support for plane enum property which caller is
able to pass in different default value when initialize the enum
property list.

Change-Id: I57595bf7c42b0e528a18ab0951655a169b00d611
Signed-off-by: default avatarJin Li <jinl@codeaurora.org>
parent 88c0bfd9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ void msm_property_install_rotation(struct msm_property_info *info,
void msm_property_install_enum(struct msm_property_info *info,
		const char *name, int flags, int is_bitmask,
		const struct drm_prop_enum_list *values, int num_values,
		uint32_t property_idx)
		uint32_t property_idx, uint64_t default_value)
{
	struct drm_property **prop;

@@ -243,7 +243,7 @@ void msm_property_install_enum(struct msm_property_info *info,
		}

		/* save init value for later */
		info->property_data[property_idx].default_value = 0;
		info->property_data[property_idx].default_value = default_value;

		/* always attach property, if created */
		if (*prop) {
+3 −1
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ void msm_property_install_rotation(struct msm_property_info *info,
 * @values: Array of allowable enumeration/bitmask values
 * @num_values: Size of values array
 * @property_idx: Property index
 * @default_value: Default value of current property
 */
void msm_property_install_enum(struct msm_property_info *info,
		const char *name,
@@ -211,7 +212,8 @@ void msm_property_install_enum(struct msm_property_info *info,
		int is_bitmask,
		const struct drm_prop_enum_list *values,
		int num_values,
		uint32_t property_idx);
		uint32_t property_idx,
		uint64_t default_value);

/**
 * msm_property_install_blob - install standard drm blob property
+2 −2
Original line number Diff line number Diff line
@@ -583,11 +583,11 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
	msm_property_install_enum(&c_conn->property_info, "topology_name",
			DRM_MODE_PROP_IMMUTABLE, 0, e_topology_name,
			ARRAY_SIZE(e_topology_name),
			CONNECTOR_PROP_TOPOLOGY_NAME);
			CONNECTOR_PROP_TOPOLOGY_NAME, 0);
	msm_property_install_enum(&c_conn->property_info, "topology_control",
			0, 1, e_topology_control,
			ARRAY_SIZE(e_topology_control),
			CONNECTOR_PROP_TOPOLOGY_CONTROL);
			CONNECTOR_PROP_TOPOLOGY_CONTROL, 0);

	rc = msm_property_install_get_status(&c_conn->property_info);
	if (rc) {
+4 −2
Original line number Diff line number Diff line
@@ -1212,10 +1212,12 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
		BIT(DRM_REFLECT_X) | BIT(DRM_REFLECT_Y), PLANE_PROP_ROTATION);

	msm_property_install_enum(&psde->property_info, "blend_op", 0x0, 0,
		e_blend_op, ARRAY_SIZE(e_blend_op), PLANE_PROP_BLEND_OP);
		e_blend_op, ARRAY_SIZE(e_blend_op), PLANE_PROP_BLEND_OP,
		SDE_DRM_BLEND_OP_PREMULTIPLIED);

	msm_property_install_enum(&psde->property_info, "src_config", 0x0, 1,
		e_src_config, ARRAY_SIZE(e_src_config), PLANE_PROP_SRC_CONFIG);
		e_src_config, ARRAY_SIZE(e_src_config), PLANE_PROP_SRC_CONFIG,
		0);

	list_for_each_entry(pp, &psde->phy_planes, list)
		if (pp->pipe_hw->ops.setup_solidfill)