disp: sde: add CRTC property for VM requests

Add a CRTC property to request the VM to acquire/release
HW resources.

Display driver in trusted VM boots up without HW ownership. Set
the default value of the property as RELEASED to handle resource
assignments.

Change-Id: Iea651a2fea902d95d4b954052af4ef016af15a91
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This commit is contained in:
Jeykumar Sankaran
2020-03-11 16:10:18 -07:00
parent 98a6a1131c
commit 8b032e5e46
3 changed files with 28 additions and 0 deletions

View File

@@ -5236,6 +5236,12 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
{CACHE_STATE_ENABLED, "cache_state_enabled"},
};
static const struct drm_prop_enum_list e_vm_req_state[] = {
{VM_REQ_NONE, "vm_req_none"},
{VM_REQ_RELEASE, "vm_req_release"},
{VM_REQ_ACQUIRE, "vm_req_acquire"},
};
SDE_DEBUG("\n");
if (!crtc || !catalog) {
@@ -5274,6 +5280,15 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
"idle_time", 0, 0, U64_MAX, 0,
CRTC_PROP_IDLE_TIMEOUT);
if (catalog->has_trusted_vm_support) {
int init_idx = sde_in_trusted_vm(sde_kms) ? 1 : 0;
msm_property_install_enum(&sde_crtc->property_info,
"vm_request_state", 0x0, 0, e_vm_req_state,
ARRAY_SIZE(e_vm_req_state), init_idx,
CRTC_PROP_VM_REQ_STATE);
}
if (catalog->has_idle_pc)
msm_property_install_enum(&sde_crtc->property_info,
"idle_pc_state", 0x0, 0, e_idle_pc_state,