disp: msm: add io resource collection hook to vm events

When the TUI use case starts, HLOS prepares for sharing the HW
by collecting the register io spaces and IRQ lines from all the
participating subdrivers before the switch. This change
adds necessary hook in the VM event framework, so that
subdrivers can provide their callback functions while
registering for events. It also adds necessary helpers
in the sde io util to parse and populate the IO memory
region that needs to be shared.

Change-Id: I4c0825fa76453a1c1ec421640deff36158d6ef8c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
这个提交包含在:
Jeykumar Sankaran
2020-07-02 12:30:01 -07:00
父节点 99df0d5052
当前提交 bd60dce87c
修改 3 个文件,包含 164 行新增1 行删除

查看文件

@@ -12,17 +12,53 @@
#include <linux/platform_device.h>
#include <drm/drm_device.h>
/**
* struct - msm_io_irq_entry - define irq item
* @label: hh_irq_label for the irq
* @irq_num: linux mapped irq num
* @list: list head pointer
*/
struct msm_io_irq_entry {
u32 label;
u32 irq_num;
struct list_head list;
};
/**
* struct - msm_io_mem_entry - define io memory item
* @base: reg base
* @size: size of the reg range
* @list: list head pointer
*/
struct msm_io_mem_entry {
phys_addr_t base;
phys_addr_t size;
struct list_head list;
};
/**
* struct - msm_io_res - represents the hw resources for vm sharing
* @irq: list of IRQ's of all the dislay sub-devices
* @mem: list of IO memory ranges of all the display sub-devices
*/
struct msm_io_res {
struct list_head irq;
struct list_head mem;
};
/**
* struct msm_vm_ops - hooks for communication with vm clients
* @vm_pre_hw_release: invoked before releasing the HW
* @vm_post_hw_acquire: invoked before pushing the first commit
* @vm_check: invoked to check the readiness of the vm_clients
* before releasing the HW
* @vm_get_io_resources: invoked to collect HW resources
*/
struct msm_vm_ops {
int (*vm_pre_hw_release)(void *priv_data);
int (*vm_post_hw_acquire)(void *priv_data);
int (*vm_check)(void *priv_data);
int (*vm_get_io_resources)(struct msm_io_res *io_res, void *priv_data);
};
/**