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

Commit 96b5b27b authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm: add ability to flag properties as dirty



This patch adds a new msm_property function to allow clients
to explicitly flag a property as being dirty. This is helpful
if certain properties need to be conditionally reevaluated
even if their values haven't changed.

CRs-Fixed: 2062083
Change-Id: Ic510c618587508f8602bfb03ad57a1047309e4f2
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 96854c2d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -371,6 +371,18 @@ int msm_property_index(struct msm_property_info *info,
	return rc;
}

int msm_property_set_dirty(struct msm_property_info *info, int property_idx)
{
	if (!info) {
		DRM_ERROR("invalid property info\n");
		return -EINVAL;
	}
	mutex_lock(&info->property_lock);
	_msm_property_set_dirty_no_lock(info, property_idx);
	mutex_unlock(&info->property_lock);
	return 0;
}

int msm_property_atomic_set(struct msm_property_info *info,
		uint64_t *property_values,
		struct drm_property_blob **property_blobs,
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -265,6 +265,14 @@ int msm_property_install_get_status(struct msm_property_info *info);
int msm_property_index(struct msm_property_info *info,
		struct drm_property *property);

/**
 * msm_property_set_dirty - forcibly flag a property as dirty
 * @info: Pointer to property info container struct
 * @property_idx: Property index
 * Returns: Zero on success
 */
int msm_property_set_dirty(struct msm_property_info *info, int property_idx);

/**
 * msm_property_atomic_set - helper function for atomic property set callback
 * @info: Pointer to property info container struct