disp: msm: sde: add msgq support for sde vm layer
Linux message queues(msgq) are used to communicate between VM's This change creates a display specific msgq and a set of framework api's for the VM layer to invoke communication between the VMs'. Display msgq is bidirectional. Tx end is created by default for both the VM's. Rx is kept optional to avoid unnecessary creation of listener threads. Change-Id: If4e6410045293d6b21087a76ec018d4784dd5238 Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This commit is contained in:

committed by
Amine Najahi

vanhempi
2fb129f394
commit
d076f02017
@@ -9,6 +9,7 @@
|
||||
#include "sde_kms.h"
|
||||
#include "sde_vm.h"
|
||||
#include "sde_vm_common.h"
|
||||
#include "sde_vm_msgq.h"
|
||||
|
||||
#define to_vm_primary(vm) ((struct sde_vm_primary *)vm)
|
||||
|
||||
@@ -266,6 +267,8 @@ static void _sde_vm_deinit(struct sde_kms *sde_kms, struct sde_vm_ops *ops)
|
||||
|
||||
sde_vm = to_vm_primary(sde_kms->vm);
|
||||
|
||||
sde_vm_msgq_deinit(sde_kms->vm);
|
||||
|
||||
if (sde_vm->base.mem_notification_cookie)
|
||||
hh_mem_notifier_unregister(
|
||||
sde_vm->base.mem_notification_cookie);
|
||||
@@ -289,6 +292,7 @@ static void _sde_vm_set_ops(struct sde_vm_ops *ops)
|
||||
ops->vm_prepare_commit = sde_kms_vm_primary_prepare_commit;
|
||||
ops->vm_post_commit = sde_kms_vm_primary_post_commit;
|
||||
ops->vm_request_valid = sde_vm_request_valid;
|
||||
ops->vm_msg_send = sde_vm_msg_send;
|
||||
}
|
||||
|
||||
int sde_vm_primary_init(struct sde_kms *kms)
|
||||
@@ -318,6 +322,12 @@ int sde_vm_primary_init(struct sde_kms *kms)
|
||||
|
||||
mutex_init(&sde_vm->base.vm_res_lock);
|
||||
|
||||
rc = sde_vm_msgq_init(kms->vm);
|
||||
if (rc) {
|
||||
SDE_ERROR("failed to initialize the msgq, rc=%d\n", rc);
|
||||
goto init_fail;
|
||||
}
|
||||
|
||||
return 0;
|
||||
init_fail:
|
||||
_sde_vm_deinit(kms, &sde_vm->base.vm_ops);
|
||||
|
Viittaa uudesa ongelmassa
Block a user