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: Clarence Ip <cip@codeaurora.org>
This commit is contained in:
parent
07324253e2
commit
777a58fa41
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue