Commit Graph

22 Commitit

Tekijä SHA1 Viesti Päivämäärä
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
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
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
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
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
368ae72991 mm-drivers: hw_fence: add support for ipe, vpu, and ife clients
Update hw fence driver to support new clients with large number
of possible sub-clients, which can be configured in device-tree.
Add client queues support for ipe, vpu, and ife clients.

Change-Id: I6e274819c1c154af3ea977d1d09e419d86f6fe8e
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-05 09:14:28 -08:00
Grace An
b2efa8bc8b mm-drivers: hw_fence: add dtsi-based allocation of client queues
Update hw fence driver to support configurable parameters for
each client type, which can be set up through device-tree. This
allows configuring number of queues (e.g. only Tx Queue or both
Rx and Tx Queues), number of entries per client queue, and number
of sub-clients for each client-type.

Change-Id: I2d8f84ff2b7eb5322f9ca661cfd8f6a291db7b38
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-12-04 17:12:02 -08:00
qctecmdr
83808f0957 Merge "mm-drivers: hw_fence: add support for 64-bit client_data" 2022-12-02 13:23:06 -08:00
Grace An
b09b4f0720 mm-drivers: hw_fence: add support for 64-bit client_data
Add support of the option to pass a 64-bit client_data value to
the hw fence driver when a client registers as a waiting client
for a hardware fence. Then during fence signaling, this client_data
is returned to the client via the RxQ.

If no client_data is passed to the driver for the hw fence, then a
default value of zero is registered as the client_data.

Change-Id: I34cf3e50413639d53cbfa8251c98b9ff1d3cbf4a
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-11-30 13:23:18 -08:00
Grace An
66c1c4f019 mm-drivers: hw_fence: update new APIs for synx compat support
Add new APIs to receive params client-id and handles of hw fences
to manage synx compat support.

Change-Id: I5dae0845f8eb2c6c05cc2605d8fc93935c780901
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-11-30 13:22:53 -08:00
Ingrid Gallardo
b87b258b9e mm-drivers: hw_fence: add debug refcount to trylock
Add debugfs to query the amount of times that
inter-vm trylock needs to wakeup the svm.

Change-Id: Ic1f88319f502e652902be0d45792768cf5c5154e
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-11-30 13:07:59 -08:00
Ingrid Gallardo
ecef24aa62 mm-drivers: hw_fence: update ipc regs config to support phys-id
Starting pineapple, each ipc client has a different physical-id and
virtual-id for registers access and configuration.
This change updates the ipc to handle this different configuration.

Change-Id: I36fa84b07ffd209ce3fb323ff796f9e7721d7dd2
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-11-30 13:04:52 -08:00
Harshdeep Dhatt
fbea8f77fa mm-drivers: hw_fence: Set MSM_HW_FENCE_FLAG_SIGNALED_BIT flag
Set this flag if a hw fence (for which a client wants to wait) has already
been signaled. Clients can check this flag and indicate to their respective
hardware (or firmware) that this fence is already signaled.

Change-Id: I9337cabb771197f2d35ac4386402a25941d73311
Signed-off-by: Harshdeep Dhatt <quic_hdhatt@quicinc.com>
2022-11-30 13:04:11 -08:00
Harshdeep Dhatt
9ff114eee8 mm-drivers: hw_fence: Add per client ipc interrupt property
Not all clients need ipc interrupt for an already signaled fence. Set the
per client property based on whether a client needs the interrupt or not.
Also, set update_rxq property for GPU client to false, as GPU doesn't need
already signaled fences to be sent to GPU Rx Queue.

Change-Id: I08a6bbd598695b112124ce6ec409db75d5e11e0f
Signed-off-by: Harshdeep Dhatt <quic_hdhatt@quicinc.com>
2022-11-30 12:14:10 -08:00
Grace An
b13dcfb79e mm-drivers: hw_fence: remove client id mask registration logic
Remove client id bitmask to track registered clients. This
allows support of more than 64 transmit clients.

Change-Id: Ia2b4667d008bfceb0b46bfd3e14302e5bec82cb3
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-10-14 02:56:53 -07:00
Grace An
99948e9714 mm-drivers: hw_fence: modify hw fence queue payload structure
Add size, type, version, and client_data fields to hw fence queue
payload and update 32-bit timestamp field to full 64-bit timestamp
field.

Change-Id: Iafb0eb80f83acd5753786fa50a31c1fb74f1a2fa
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-08-18 11:36:34 -07:00
Ingrid Gallardo
c344a18254 mm-drivers: hw_fence: add timestamp to the queue
Add qtimer timestamps to queue payloads.
This timestamp is to be updated by the client
that adds the entry to the queue.

Change-Id: I69dd4420ec18b7470f99d5cfe46129c10b3f3391
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-07-27 10:00:50 -07:00
qctecmdr
3179dca621 Merge "mm-drivers: hw-fence: add hardware fence driver validation ioctls" 2022-07-20 16:11:13 -07:00
Shirisha Kollapuram
f73a4b179a mm-drivers: hw-fence: add hardware fence driver validation ioctls
This change adds support to validate the hw_fence driver
by adding IOCTLs that expose the hw_fence interfaces so that
validation clients can register/unregister, create/destroy
and wait/signal fences. IOCTL's will be available for debug
purpose only when the debugfs config is set.

Change-Id: Idb0d04ee245718e9b19ccd12ac760829831426b0
Signed-off-by: Shirisha Kollapuram <quic_kshirish@quicinc.com>
2022-06-20 11:41:21 +05:30
Ingrid Gallardo
2ae3dcadde mm-drivers: hw_fence: avoid hw fences creation until fctl ready
This change adds a check to avoid hw-fences creation until
the fence controller is ready.

Change-Id: I613c19d9dfd8836f8ded6bcb0162bef647df7bc3
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-06-03 11:00:48 -07:00
Ingrid Gallardo
77ae3f31f0 mm-drivers: hw_fence: Add support for hw-fence driver
This change adds support for the hw-fence driver that initialize, expose
and manage the interfaces for the hw-fences, which are the synchronization
primitives to allow the hardware to hardware signalization of the fences
for the frame buffers shared between gpu and display hw-cores.

Change-Id: If2313585d5a9f3ac90e16aad3464600641a6fa04
Signed-off-by: Ingrid Gallardo <quic_ingridg@quicinc.com>
2022-04-21 13:46:12 -07:00