提交線圖

105 次程式碼提交

作者 SHA1 備註 日期
qctecmdr
51a4500d0f Merge "mm-driver: Refactor to separate modules into packages" 2023-06-16 09:07:41 -07:00
qctecmdr
5d2cc98b05 Merge "mm-drivers: Add LOCAL_MODULE_DDK_BUILD argument" 2023-06-16 09:07:41 -07:00
Yu Wu
72d7c6a3c5 mm-drivers: hw_fence: avoid dereference before NULL check
Fix hw_fence_wait_client dereferenced before NULL check.

Change-Id: Ib34c4969c9042f4f815b2eca75b553bc23d4b6cc
Signed-off-by: Yu Wu <quic_zwy@quicinc.com>
2023-06-14 13:59:22 +08:00
Varsha Suresh
508cc02147 mm-driver: Refactor to separate modules into packages
Currently, all of the modules are built from a single Bazel package.
This complicates integration with the vendor build because the
Android build system builds the modules individually.

Split the modules into their own Bazel packages to align more closely
with the Android build system's expectations and easy to hook bazel build.

Change-Id: I100e9ec9edbe96212089a5944cbba4d6677ff83a
Signed-off-by: Varsha Suresh <quic_varssure@quicinc.com>
2023-06-12 13:44:26 -07:00
qctecmdr
07a41b0f00 Merge "mm-drivers: hw_fence: add fence error support for clients without rxq" 2023-05-12 20:45:27 -07:00
qctecmdr
2d60daf2b1 Merge "mm-drivers: hw_fence: add support for out of order signaling" 2023-05-12 20:45:27 -07:00
Grace An
b48c190c8b mm-drivers: hw_fence: add support for out of order signaling
Fence error use case may require that later fence in tx queue
be signaled with error before earlier fence. HW Fence Driver
provides limited support for this scenario by providing a way
to swap the first two entries of client Tx Queue.

Change-Id: I00faada95a3c33c1dcced79bea5fef3b581152cd
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-05-10 09:26:48 -07:00
Grace An
abf0680f4c mm-drivers: hw_fence: add fence error support for clients without rxq
Add HW Fence Driver support to notify waiting clients of fence error in
HLOS. This is a requirement by clients that do not have Rx Queue. Such
clients can register a fence error callback function with data that will
be passed back with callback.

The fence error callback function is called by HW Fence Driver when:
1. Client registers for a fence already signaled with error.
2. Error is signaled for a fence that the client registered to wait on.

Change-Id: I2892333838001bed1152118b947cfe12b1a8dd04
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-05-08 17:14:54 -07:00
Varsha Suresh
8b9d1c6da8 mm-drivers: Add LOCAL_MODULE_DDK_BUILD argument
A parameter is set to enable the build to be executed with DDK framework.

Change-Id: Ib98d5a990aa1cfe836d9214111bfef317a4c4fae
Signed-off-by: Varsha Suresh <quic_varssure@quicinc.com>
2023-05-01 17:11:39 -07:00
Grace An
2a557e339b mm-drivers: hw_fence: add interface to dump debug data
Add interfaces to support dumping debug data. These interfaces should be
used by drivers in case of a hw-fence error detected.

Change-Id: Iab46c8e9dea8ffead06f192c8d01182912fffcce
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-04-26 11:28:05 -07:00
Grace An
2f76940f77 mm-drivers: hw_fence: add check for invalid client_id param in ioctl
Current implementation allows ioctl to deregister hw-fence client with
client_id that does not match hw_sync_obj. This can cause a double-free
if user-space deregisters the wrong file descriptor by mistake.
Instead, fail the ioctl early if it has these invalid parameters.

Change-Id: Ib781be18d2f71c24d6aa4fc08eeba44649da13da
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-04-11 14:27:55 -07:00
Ingrid Gallardo
6db4e6a849 mm-drivers: hw_fence: resolve compilation errors for kalama
Fix compilation errors for kalama target, where cpusys vm share
memory driver is not present.

Change-Id: I4f7762ad747490ba166f8e9ae27dd0191de3f021
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2023-04-10 16:47:20 -07:00
Varsha Suresh
6624a5c453 mm-drivers: disp: Add support for Bazel build system
- add support to build mm-drivers module using DDK framework for pineapple
- add macro that makes it easy to register new modules

Change-Id: I704bbe946f4d1053a85bfb122408c201b0f155b2
Signed-off-by: Varsha Suresh <quic_varssure@quicinc.com>
2023-04-05 12:07:01 -07:00
Linux Build Service Account
f47b39d527 Merge "mm-drivers: hw_fence: avoid mem share from rm callback" into display-kernel.lnx.1.0 2023-04-04 22:11:41 -07:00
Grace An
cda6ac87d1 mm-drivers: hw_fence: add support to read hw fence ctl events
Add support to read hw fence ctl events through debugfs node from the
carved out memory region shared with Fence Controller.

Change-Id: I508695efcb8c7aa8fab9db2086af1ec1ff0ddd84
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-30 13:51:18 -07:00
qctecmdr
b3a67764bc Merge "mm-drivers: hw_fence: Rename RM APIs" 2023-03-28 11:19:51 -07:00
qctecmdr
d903a83c43 Merge "mm-drivers: hw_fence: allow synx create and import with more flags" 2023-03-28 11:19:51 -07:00
Grace An
fc0379a578 mm-drivers: hw_fence: Rename RM APIs
As we are merging upstream patches, resolve conflicts of namespaces in
downstream modules.

Change-Id: I2aa4b0f2cea859cddd2fb537fce7a6908999e7d4
Signed-off-by: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-27 10:03:17 -07:00
Grace An
00044be1d4 mm-drivers: hw_fence: allow synx create and import with more flags
Synx clients may specify additional flags (e.g. flags to specify a
global fence) when creating or importing hwfence-backed synx objects.
Ensure HW Fence Driver support of these flags.

Change-Id: I38d94875be09da3506d3939077099c05fa9235f6
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-27 09:26:16 -07:00
Grace An
26eb7e4268 mm-drivers: hw_fence: remove destroy fence and fence array ioctls
Remove ioctls to destroy fence and fence array. Existing implementation
fails to close file descriptors properly, and closing fds must be done
by caller, not by HW Fence driver.

Change-Id: I7a84c87475144f3e8a90acf44b7cf8678b6cc2dd
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-24 13:51:51 -07:00
Grace An
d39f91c9bd mm-drivers: hw_fence: remove deprecated workarounds for no dpu-ipc signals
Remove HW Fence driver deprecated support of platforms without dpu-ipc
signaling, e.g. targets prior to kalama.

Change-Id: I8491a96040b4c3857a32a9bf6092e53479284a64
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-22 16:07:15 -07:00
Ingrid Gallardo
b39fb22f2d mm-drivers: hw_fence: avoid mem share from rm callback
Avoid from hw-fence driver call to share carved-out memory between
hlos and cpusys vm if the memory has been already shared by the
gh_cpusys_vm_mem_access kernel driver.

Change-Id: I0df0216a6153a8982936885f53bebf7fe83db7e9
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2023-03-20 11:59:29 -07:00
qctecmdr
e93f7e55ff Merge "mm-drivers: hw_fence: add support for client queue alternate indexing" 2023-03-16 19:58:44 -07:00
Grace An
414d3b480d mm-drivers: hw_fence: add support for client queue alternate indexing
Some clients require that write_index starts from nonzero value and
index by payload instead of by dwords. Add support for device-tree
configurable properties to control nonzero index start_index and
indexing by payload for client tx queue read and write indices.

Change-Id: I8942dc2d25a7d1cb0421cabd36c73a404ecd0134
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-15 14:22:49 -07:00
Grace An
2348b03273 mm-drivers: hw_fence: add device-tree configurable queue padding
Add device-tree configurable padding in bytes before and after queue
header(s). This enables support for 32-byte aligned queue write_idx,
which is a requirement to satisfy hardware constraints by some clients.

Change-Id: Icfd6bb385c825a8629974c72522efdc3cbfe3303
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-15 14:22:49 -07:00
Grace An
e59a1e4464 mm-drivers: hw_fence: avoid compiling synx translation layer on kalama
Avoid compiling synx translation layer on kalama target where synx
driver is not available.

Change-Id: I0a4f8c291fc3843065e75f536b4e16a246ea69d4
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-14 14:36:48 -07:00
qctecmdr
5827c82e14 Merge "mm-drivers: hw_fence: fix edge cases for hwfence ioctls" 2023-03-13 18:27:01 -07:00
qctecmdr
ccd2f268a7 Merge "mm-drivers: hw_fence: add support for multiple ipe and vpu clients" 2023-03-13 18:27:01 -07:00
Grace An
cf8ab93a12 mm-drivers: hw_fence: fix edge cases for hwfence ioctls
Clear doorbell mask for val client loopbacks. Create up to
full number of possible fences for create_fence_array. Wait
full amount of time for fence in ioctl.

Change-Id: Ic0f2553f345932511fa9669b5383d8bfdaa23459
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-08 14:00:24 -08:00
Grace An
88f51cfe04 mm-drivers: hw_fence: add support for multiple ipe and vpu clients
Add support for signal-based reservation of hw fence client ids for
ipe and vpu clients.

Change-Id: I4e4a835424756c6e5fa8d5c2d340dfadc4d11541
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-06 09:09:56 -08:00
Grace An
41b11c1d09 mm-drivers: hw_fence: add implementation of translation to synx API
Add implementation to translate the msm_hw_fence API into synx API.

Change-Id: I5d0b7afcc297a4e3c8ec4ed9867831b5d2dfc3af
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-03 16:07:10 -08:00
Grace An
5eec9ba76c mm-drivers: hw_fence: add header file for translation to synx api
Add header file for synx translation layer in hwfence driver.

Change-Id: Ie0ec426292cda180159d8572a3ace474804d3af5
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-03-03 15:50:20 -08:00
qctecmdr
0e2a053012 Merge "mm-drivers: hw_fence: fix ioctl support for ipcc signaling" 2023-02-23 00:22:34 -08:00
qctecmdr
7d2c8417aa Merge "mm-drivers: hw_fence: trigger signal for validation signaled fences" 2023-02-23 00:22:34 -08:00
Grace An
4e5524c85f mm-drivers: hw_fence: trigger signal for validation signaled fences
When validation clients register to wait on already signaled fences,
the hw fence driver must signal the client wait and wake up waiting
validation clients.

Change-Id: I3e0f7abfbb055d8e5fbb5afd5fc8b88991c95aee
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-02-16 14:43:06 -08:00
Grace An
90268c94ab mm-driver: hw_fence: resolve compilation failure with data types
Latest update to qcom_scm_assign_mem API changed input data types.
Change data types in HW Fence Driver to ensure compatibility with
newest API.

Change-Id: Ia25bb9e129cf67ec99e18c60407ac997cf0d6e3f
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-02-15 08:57:35 -08:00
Grace An
e443a11c83 mm-drivers: hw_fence: fix ioctl support for ipcc signaling
Currently, the ioctl to trigger ipcc signals uses the client virtual id
as the tx client and the client physical id as the rx client. This
should be reversed to correctly perform ipcc signaling.

Change-Id: I61e7ec0e4bfd63f2d7e1cd1dd4e62dd4f6a82143
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-02-13 13:57:40 -08:00
qctecmdr
e0d65b7cca Merge "mm-drivers: hw_fence: reset queues during client reset" 2023-01-24 15:43:49 -08:00
qctecmdr
a63269b7e0 Merge "mm-drivers: hw_fence: switch to qcom_scm_assign_mem from hyp_assign_phys" 2023-01-24 15:43:49 -08:00
qctecmdr
121ee6c421 Merge "mm-drivers: hw_fence: silently fail registration when feature disabled" 2023-01-24 15:43:49 -08:00
Ingrid Gallardo
0219a76630 mm-drivers: hw_fence: silently fail registration when feature disabled
Current hw-fencing feature is disabled by default through kernel command line
argument, therefore it is expected that clients receive an error when trying
to register a client while feature is disabled.
This change silence any print error messages during the clients registration
when feature is disabled.

Change-Id: Ie57adb52a975f9541e485039a582407cf21c11cd
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2023-01-24 11:07:49 -08:00
Grace An
1db6867762 mm-drivers: hw_fence: change memory mapping of hwfence shared memory
Currently, carved-out memory region is mapped as IO. Change mapping
to normal memory.

Change-Id: I1eca1067e30e2a6e39969c003dcce9ea0f9c47fd
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-01-20 02:37:24 -08:00
Grace An
4f59f5ce02 mm-drivers: hw_fence: switch to qcom_scm_assign_mem from hyp_assign_phys
Switch to upstream friendly qcom_scm_assign_mem from hyp_assign_phys.

Change-Id: I01c6b93698fea094cf89926f3168466ba14061bc
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-01-20 02:37:17 -08:00
Ingrid Gallardo
13b4e1270c mm-drivers: hw_fence: reset queues during client reset
This change make sure that the write_idx and read_idx
of the client hfi queues are reset during the call
to msm_hw_fence_reset_client.

Change-Id: Iaf94865ddf78ed8e19de509e3ee6176d03c5301c
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2023-01-18 16:27:28 -08:00
Grace An
bb0f9e965f mm-drivers: hw_fence: share hw fence driver mem pool always
When hw fencing is disabled via kernel command line argument, allow
probing of hw fence driver and perform memory sharing during probe. This
ensures that the carved out memory region for hw fences is always shared
with hypervisor regardless of hw-fencing feature enablement.

Change-Id: I7723fd61860e0d6b8dc374a054c8519d98d700a6
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2023-01-13 09:44:02 -08:00
qctecmdr
55082654a9 Merge "mm-drivers: hw_fence: update ipc protocol to fence for pineapple" 2022-12-21 11:14:55 -08:00
Grace An
fbde79b118 mm-drivers: hw-fence: extend ioctl support to create fence_array
Current HW Fence validation framework limits the creation of a HW Fence-
array to fences from a single parent client. This change adds support to
hw_fence_create_array IOCTL so a HW fence-array can be created from fences
of different clients.

Change-Id: I6ce801f51747fcab503fc23c1ae981b107d4f315
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-21 07:36:06 -08:00
Grace An
e0bf897e1f mm-drivers: hw_fence: update ipc protocol to fence for pineapple
Starting pineapple, fence protocol is used for hw fence driver.

Change-Id: I87435128c22aeb338dfcda38f0196e04dc9eb70b
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-19 11:12:42 -08:00
Grace An
f4afac60ba mm-drivers: hw_fence: update txq to use separate software wr ptr
Some hw fence driver clients require the ability to call the
'msm_hw_fence_update_txq' API to update the queue payload without
updating the 'write_index' member within the hfi header. These clients
also need to receive the index at which the payload is written within
the queue.

This change adds support for this requirement by adding a device-tree
property to configure this behavior for each client. The 'tx_wm' member
within the hfi header is used to track in software the place where the
payloads are within the queue for clients that skip the update to the
'write_index' member.

Change-Id: I2881fa49bef4e49691eb6049830f9dc8dc8fa425
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-05 09:15:07 -08:00
Grace An
965d398c06 mm-drivers: hw_fence: update ipc for ipe, vpu, ife clients
Update ipc configurations to support IPE, VPU, and IFE clients
in hw fence driver. Add support for IPE and VPU clients on
kalama, and add support for all clients on pineaple.

Change-Id: Iee577118284a02bd5b368ca206e88ed75eaa95b3
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-05 09:14:58 -08:00