Commit Graph

327 Commits

Author SHA1 Message Date
qctecmdr
00b9a53e95 Merge "msm: eva: Revert to 80us before XO de-assert" 2023-11-08 09:41:23 -08:00
qctecmdr
b4e745ba01 Merge "msm: eva: Prevent defects found from static analysis tool" 2023-11-08 00:34:54 -08:00
George Shen
dc5c927020 msm: eva: Add QDENY and QACTIVE checks
During CPU NoC LPI sequence. Print more debugging registers
in case LPI QACCEPT is not set after 20ms. It indicates a pending
transaction lingering around. Adding dump for NOC registers.

Change-Id: Ied58e52e30572074be77b4d51a03fb4194d78caa
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-11-07 00:31:21 +05:30
George Shen
3454357c09 msm: eva: Revert to 80us before XO de-assert
Revert back 200us sleep to 80us before XO de-assert.

Change-Id: I8446aa2eb5cfac32fdc5fc971ddd37b999623bf8
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-11-07 00:15:49 +05:30
Palak Joshi
65910f2681 msm: eva: Added QOS registers settings
Changes made to accommodate difference in QOS & NOC
base registers offsets between pineapple and cliffs.

Change-Id: If8c631480d1f09bac21de52d0f27f0c29cdf594e
Signed-off-by: Palak Joshi <quic_palakash@quicinc.com>
2023-11-02 21:01:30 -07:00
Gopireddy Arunteja Reddy
d7dfd9368d msm: eva: Prevent defects found from static analysis tool
Added fixes for out-of-bounds read, uninitialized
variable use, resource leak issues.

Change-Id: I6c59ff53d9f1d9cf5362bea0a3f1fe5d9a8008aa
Signed-off-by: Gopireddy Arunteja Reddy <quic_garuntej@quicinc.com>
2023-10-23 15:02:10 +05:30
qctecmdr
2a02ab9c2e Merge "msm: eva: Handling mutex lock in case of failure" 2023-10-22 22:41:58 -07:00
qctecmdr
89beb9d44a Merge "msm: eva: fixes for integer over-flow" 2023-10-21 03:48:50 -07:00
VIVEK VARDHAN JOSHI
636d3499d6 msm: eva: Handling mutex lock in case of failure
Retrying the mutex lock, if it is not successful
in cvp_fence-wait function instead returning false.

Change-Id: I8dfb24b92eef50218d4d9a73f76c5533352a31fc
Signed-off-by: VIVEK VARDHAN JOSHI <quic_vivekvar@quicinc.com>
2023-10-17 03:46:04 -07:00
qctecmdr
8805a5c1ce Merge "msm: eva: Add delay after resetting xo clk" 2023-10-16 15:28:43 -07:00
Aditya Shubham
e4d6b997a0 msm: eva: fixes for integer over-flow
Adding checks for offset and buf_num.

Change-Id: Icb75ec99947712c8fa636ade58234be78af8d458
Signed-off-by: Aditya Shubham <quic_shubh@quicinc.com>
2023-10-11 23:00:27 -07:00
Vivek Vardhan Joshi
59387891a2 Revert "msm: eva: Handling mutex lock in case of failure"
This reverts commit e1502aacbd.

Reason for revert: Causing CVP session close failure

Change-Id: I79f22e6ee694f46d9a9de51d1b51f42d67bad828
Signed-off-by: VIVEK VARDHAN JOSHI <quic_vivekvar@quicinc.com>
2023-10-11 13:02:36 +05:30
George Shen
d2c57a156b msm: eva: Add delay after resetting xo clk
Wait 200us to 300us.

Change-Id: Ia3d83b18a8b1c8fe351ab9fcd7a0ec3ed1b9822a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-10-06 09:43:17 -07:00
qctecmdr
348de74e5a Merge "msm: eva: Handling mutex lock in case of failure" 2023-09-27 00:26:31 -07:00
VIVEK VARDHAN JOSHI
e1502aacbd msm: eva: Handling mutex lock in case of failure
Returning false if mutex lock is not successful
in cvp_fence-wait function instead of sleep.

Change-Id: Ieddfb6e16c72d571646a39a63c073a1b9912b3bc
Signed-off-by: VIVEK VARDHAN JOSHI <quic_vivekvar@quicinc.com>
2023-09-26 03:27:55 -07:00
Gopireddy Arunteja Reddy
4b2e159565 msm: eva: Reading FW ELF naming from device tree
This change helps to read firmware elf name from device tree.

Change-Id: Idc5779063d386ceb0ed8435090a4a70c9651f19d
Signed-off-by: Gopireddy Arunteja Reddy <quic_garuntej@quicinc.com>
2023-09-25 16:33:34 +05:30
qctecmdr
409bd86e7c Merge "msm: eva: To resolve race condition in EVA state while DSP probing" 2023-09-19 09:18:11 -07:00
Gopireddy Arunteja Reddy
ed194e2329 msm: eva: To resolve race condition in EVA state while DSP probing
The change helps in proper DSP initialization.

Change-Id: I5a9b65b4617ed364186ee79872b0f5596d926131
Signed-off-by: Gopireddy Arunteja Reddy <quic_garuntej@quicinc.com>
2023-09-19 12:16:35 +05:30
Jingyu Su
c82996e90f msm: eva: Extract DSP buffer info from debug queue
Extracts DSP buffer information for log printing upon SMMU faults

Change-Id: I36b1900ea84a85cdfdb2dec8ad62b67a5ff57119
Signed-off-by: Jingyu Su <quic_jingyus@quicinc.com>
2023-09-15 16:16:59 -07:00
George Shen
4db4b2a5fa msm: eva: Add missing QOS setting
Fix wrong QoS setting for RGE and GCE.

Change-Id: Ibd156b4133c9027ec7ab7c383c86f81ef9d744e3
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-09-14 08:39:23 -07:00
Palak Joshi
536a3ed754 msm: eva: Clean up in case of SSR
Instead of returning from validate session failure with SSR,
doing other required clean up.

Change-Id: I5a2baa7039bc4e23758c541af31648d58a58823c
Signed-off-by: Palak Joshi <quic_palakash@quicinc.com>
2023-09-06 11:40:17 +05:30
Gopireddy Arunteja Reddy
f2cbbfd051 msm: eva: Added platform data for cliffs
Cliffs common and platform data structures are added.

Change-Id: I16156da7f1a801fca74fc5e2daff3d317031aaaa
Signed-off-by: Gopireddy Arunteja Reddy <quic_garuntej@quicinc.com>
2023-09-01 14:41:43 +05:30
George Shen
f448885aa1 msm: eva: restore 2s HW comm timeout
Increase dsp timeout from 0.6s to 1s.

Change-Id: If5b556fa52fed897945bf62611c01e9abce1cbec
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-08-25 11:23:28 -07:00
George Shen
8adf2c6b69 msm: eva: Map dsp hfi queue using dma alloc api
Use dma_alloc_coherent to allocate 4MB dsp hfi queues and map
them in non-io-coherent way.

Change-Id: I6d8adb58ebcddae569259862a83e3aeffa3d2304
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-08-21 23:18:59 -07:00
qctecmdr
766fbd3ac2 Merge "msm: eva: Enable FW cachelog" 2023-08-18 18:29:39 -07:00
George Shen
c0cf3ec7db msm: eva: Enable FW cachelog
By default.

Change-Id: I4d7eaaf3dda5cd19db5f11922d740a94577152cb
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-08-18 14:16:36 -07:00
George Shen
f79b5db5ae msm: eva: Reduce session creation delay
by one milisecond at least.

Change-Id: Ia32840d2a47533aa81ff3b31af5404b1636b546b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-08-16 11:36:49 -07:00
George Shen
1028da124c msm: eva: Reduce HFI processing timeout to 1s
From original 2s. It enables CPU and DSP communication timeout
to 1.5s.

Change-Id: I33cba756e95cd2cc535927960610c1dab26d4242
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-08-02 11:25:32 -07:00
Jingjing Guo
acc49d12ac msm: eva: Fix print error
The order of MPU and OD is wrong, which will cause confusion
when logcat to debug.

Change-Id: Iff298350bde322a03dda28e78a3737996d5a2965
Signed-off-by: Jingjing Guo <quic_jig@quicinc.com>
2023-07-31 00:01:07 -07:00
George Shen
b293b5b713 msm: eva: Rename hfi related devices
To avoid confusion in code reading and prepare for
future compatibility changes.

Change-Id: I43d61e18d2e2d75d1fd46ceb2e763511329ee32d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-29 16:34:22 -07:00
George Shen
936925471d msm: eva: Enhanced check to avoid kernel panic
Avoid delete non-existing session and power on check before
register write.

Change-Id: I0b7d5045d68fd18e5a9a041d3ad3e37f4dac16ad
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-29 12:09:46 -07:00
George Shen
2c6f9ca542 msm: eva: Validate DSP buffer size
In case clients passing larger size than the actual dma-buf size.
It may avoid DSP caused SMMU fault.

Change-Id: I1f87d203f65a2d18d1a35e9e0b8dec281020150b
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-21 07:38:04 -07:00
qctecmdr
7f85157ced Merge "msm: eva: Remove unused dsp code" 2023-07-18 20:23:53 -07:00
George Shen
1741a5b55c msm: cvp: Avoid racing in bw voting
when SSR is releasing core and some clients voting for bus.

Change-Id: I8575d747c17f234bbce216c346843ab07ea6b340
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-18 18:41:32 -07:00
qctecmdr
51bead7913 Merge "msm: eva: Remove unused test bus dump" 2023-07-18 16:34:55 -07:00
George Shen
73269ff609 msm: eva: Remove unused dsp code
Remove unnecesary warning.

Change-Id: I6517a4eb22a9cbbb692d7e09a5b0edde54fc888d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-18 12:14:16 -07:00
George Shen
deb4fd788e msm: eva: Remove unused test bus dump
Avoid NoC error during smmu fault handling.

Change-Id: I4b6e4314c6d95bed1c89754955f1ffc975c74d48
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-18 08:31:15 -07:00
George Shen
65165e0b23 msm: eva: Fix Sys Fault Reg refcount issue
Avoid kernel crash due to unbalance refcount operations.

Change-Id: I280682ec3352164b62ecf3469303371f2af24a7d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-17 18:19:16 -07:00
qctecmdr
0aa198cb5b Merge "msm: eva: Modify trace related code" 2023-07-14 01:14:21 -07:00
qctecmdr
99c8e198df Merge "msm: eva: Allow up to 40 buffers in a frame" 2023-07-13 10:32:19 -07:00
Sabharsh Sidhu
0deded3f88 msm: eva: Enhance WarpNCC buffer validation
Add dmabuf-based WarpNCC metadata buffer
size validation to prevent fault in case
of erroneous OOB buffer content.

Change-Id: Iaa89e6c52d2c262d2266bdc3151b5b3feee79c5a
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
2023-07-12 12:44:21 -07:00
Jingjing Guo
4cae0f824e msm: eva: Modify trace related code
The original trace related code is outdated.

Change-Id: Idfc161cdc518868300716607fc93b0bab26c0922
Signed-off-by: Jingjing Guo <quic_jig@quicinc.com>
2023-07-12 11:15:13 +08:00
George Shen
8cdf80c8ac msm: eva: Allow up to 40 buffers in a frame
MVResampling frame packet has up to 38 buffers. Without the
change, kernel will complain if MV resampling number is increased
above 13.

Change-Id: I95a97045a312163f378be157394a4ff041b57a57
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-10 12:06:09 -07:00
George Shen
23e1f8be28 msm: eva: Fix session management issue
Include prematurely reaching max number of sessions and
unreliable DSP session deletion.

Change-Id: Ic489291c9d75964106834f84e20cf32bc334d1a7
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-07-08 22:30:26 -07:00
qctecmdr
ad4ac2d769 Merge "msm eva: Add QMAA flags to guard compilation" 2023-07-06 11:13:12 -07:00
George Shen
1e4ff767c3 msm: eva: Avoid double session close
In case DSP session creation failed due to reaching max
number of EVA sessions. There is a chance DSP may resend
delete session. Blocks re-deletion attempt.

Change-Id: Idf54a9eff124c60af5867b013de641c93450960f
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-30 07:38:55 -07:00
George Shen
b029f87904 msm: eva: Avoid using wrong bus client to vote
Fix a racing between power voting and SSR shutdown.

Change-Id: I75c13353174a514ef175056dd98f827a987bff7a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-24 14:50:50 -07:00
Sabharsh Sidhu
fef6ef9ce5 msm: eva: Enhance WarpNCC OOB santization
Add WarpNCC user-space OOB pointer access
checks to improve code safety in case of
an under-allocated buffer.

Change-Id: I51e8464b37711d8ffcc1847376e2ebfb80f035b0
Signed-off-by: Sabharsh Sidhu <quic_ssidhu@quicinc.com>
2023-06-21 17:19:38 -07:00
George Shen
ea94318515 msm: eva: mmap firmware debug memory
For user mode to save into a dump file. It helps FW debugging.

Change-Id: I1c9c52d27d0dfd20e3eeb54b203416f6df095c8d
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-20 14:14:02 -07:00
George Shen
aafc38db81 msm: eva: Condition ready check for IRQ_MASK
Core shall be powered on and WRAPPER_SPARE bit 1 shall be clear.

Change-Id: Id225c44f4a245482a8b9387109211461d03042e9
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
2023-06-16 13:37:20 -07:00