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

Commit 777a58fa authored by Clarence Ip's avatar Clarence Ip Committed by Lakshmi Narayana Kalavala
Browse files

drm/msm: init enum properties to default value



Initialize DRM/KMS enumeration properties to the first
defined value rather than 0 since enumeration properties
are meant to store the actual value rather than simply
an enumeration index.

Change-Id: I23dd62308a2d3a45c763090b6f0557634ed49d63
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 07324253
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -340,9 +340,16 @@ void msm_property_install_enum(struct msm_property_info *info,
		info->property_data[property_idx].default_value = default_value;
		info->property_data[property_idx].force_dirty = false;

		/* select first defined value for enums */
		if (!is_bitmask)
			info->property_data[property_idx].default_value =
				values->type;

		/* always attach property, if created */
		if (*prop) {
			drm_object_attach_property(info->base, *prop, 0);
			drm_object_attach_property(info->base, *prop,
					info->property_data
					[property_idx].default_value);
			++info->install_count;
		}
	}