summaryrefslogtreecommitdiff
path: root/gxp-firmware.c
AgeCommit message (Collapse)Author
2022-06-15[Copybara Auto Merge] Merge branch 'gs201-release' into ↵android-13.0.0_r0.45android-13.0.0_r0.32android-13.0.0_r0.31android-gs-pantah-5.10-android13-d1Aurora pro automerger
'android13-gs-pixel-5.10-tm-d1' Revert "gxp: authenticate firmware after requesting it" Bug: 235447772 gxp: Add option to disable DSP FW auth Bug: 235135800 gxp: Fix hangs and OOB writes when auth fails Bug: 234947988 gxp: Adjust the per-core FW size from 16MB to 1MB Bug: 228277106 gxp: Add enable_debug_dump argument for insmod Bug: 234529356 gxp: Dynamically allocate memory for debug dump buffer Bug: 234529355 gxp: Trigger debug dump only when firmware is up and running Bug: 233660431 Bug: 233607168 gxp: remove support for unsigned firmware Bug: 220246540 gxp: authenticate firmware after requesting it Bug: 232715929 gxp: Expose additional DVFS states in power APIs Bug: 233929549 GitOrigin-RevId: 99f54518439e715bff19b7b45b9cafe635febb77 Change-Id: Iee1b3c93aad333db2d051017e3509279ceb35f38
2022-05-23[Copybara Auto Merge] Merge branch 'gs201-release' into ↵Aurora pro automerger
'android13-gs-pixel-5.10'. release info:233216473 dsp prod 5/23 RC03 gxp: remove unrequired CORE_SCRATCHPAD_BASE offset Bug: 233381187 gxp: Refactor FW boot mode into its own functions Bug: 233381187 gxp: Switch the boot mode storage from CSRs into the scratchpad space Bug: 233381187 gxp: Fix locking in gxp_telemetry_disable() Bug: 232876605 GitOrigin-RevId: da625dba4f2565974652c7b1fdfb6db90870230e Change-Id: Iaab2bef0c866741ce0d1390ad39ddd87e932dd73
2022-05-16[Copybara Auto Merge] Merge branch 'gs201-release' into ↵Aurora pro automerger
'android13-gs-pixel-5.10' gxp: Remove stale TODO comments Bug: 232447048 gxp: heuristically guess the user buffer perm Bug: 232529892 gxp: rearrange logs for BLK/VD suspend/resume Bug: 209083969 gxp: check AUR_OFF while sending power requests Bug: 231694821 gxp: rename NUM_CORES to MAX_NUM_CORES Bug: 229961485 gxp: fix one more typo of "semphore" Bug: 232447048 (repeat) gxp: fix size check for telemetry mmap Bug: 232447048 (repeat) gxp: check VD wakelock for GXP_TRIGGER_DEBUG_DUMP Bug: 231692562 gxp: Handle debug dump cases with invalid segment header Bug: 218344866 gxp: Add header file version into debug dump struct Bug: 202417979 gxp: Fix "semphore" typo Bug: 232447048 (repeat) gxp: Use DMA direction argument to determine read/write buffer map Bug: 201243473 gxp: Update mailbox command codes and remove unused ones Bug: 231328277 gxp: assert client->semaphore held without rw Bug: 231692448 gxp: Add unittests for the TPU related ioctl Bug: 227545695 gxp: refine power state transition interface Bug: 231584263 gxp: Add check that virtual device is not NULL Bug: 231271959 gxp: remove unused block wakelock functions Bug: 232447048 (repeat) gxp: Check memory-per-core arg to GXP_ALLOCATE_VIRTUAL_DEVICE Bug: 231272386 gxp: Log changes to thermal limit on BLK frequency Bug: 177217526 gxp: don't warn if all power votes are revoked Bug: 232447048 (repeat) gxp: Do not request firmware until first open() Bug: 228377252 gxp: Add the ability to re-request firmware images Bug: 228377252 (repeat) gxp: Prepare fw images and buffers on probe Bug: 228377252 (repeat) gxp: Add IOCTL for triggering debug dump Bug: 185262089 gxp: Update coredump debugfs node Bug: 185262089 (repeat) gxp: check valid dma direction Bug: 232447048 (repeat) gxp: fix probe cleanup sequences Bug: 228920163 gxp: Check DMA direction before create mapping Bug: 229578163 gxp: Use kvmalloc to allocate pages for mapping Bug: 230312441 gxp: add uaccess.h header for access_ok Bug: 201243473 (repeat) gxp: Refactor mappings to be owned by VDs Bug: 184572070 Bug: 220225771 Bug: 230291950 gxp: Add access_ok check to buffer map operation Bug: 201243473 (repeat) gxp: Add lock assertion for cmd_queue and resp_queue manipulation Bug: 229919339 gxp: use realtime kthread for response handling Bug: 229687028 gxp: Register IRQ handler after initializing the mailbox Bug: 229912601 gxp: Update comment when scheduling power requests Bug: 232447048 (repeat) gxp: remove config GXP_CLOUDRIPPER Bug: 229696441 gxp: add timeout to response ioctl Bug: 229443637 gxp: fix broken Makefile for out-of-tree build Bug: 232447048 (repeat) gxp: fix GXP_NUM_CORES setting Bug: 232447048 (repeat) gxp: add NOWARN flag when pinning user pages Bug: 229578166 gxp: create amalthea configurations Bug: 227528380 gxp: add Kconfig for future gen Bug: 227528380 (repeat) gxp: check fw_app by IS_ERR_OR_NULL Bug: 229433210 gxp: Add log for out of memory when pinning pages Bug: 232447048 (repeat) gxp: validate virtual core list on buffer map Bug: 229172687 gxp: initialize specs ioctl output buf Bug: 229470814 gxp: Update flow for kernel-initiated debug dumps Bug: 185262089 (repeat) gxp: Always return an error on gxp_vd_allocate failure Bug: 229329108 gxp: refuse vd wakelock acquriing if not allocated Bug: 229249566 gxp: add -Idrivers/gxp/include to ccflags Bug: 205970684 gxp: check null pointer in eventfd unregistration Bug: 229198626 gxp: Add support for dynamic callstack reconstruction in debug dump Bug: 203441187 gxp: Add ability to map/unmap user buffers to kernel space Bug: 203441187 (repeat) gxp: move acpm_dvfs to include/ Bug: 228938583 gxp: not set doorbell mask twice if it's not GEM5 Bug: 232447048 (repeat) gxp: add iommu domain pool Bug: 209083969 (repeat) gxp: Add flush_workqueue when pm destroy Bug: 232447048 (repeat) gxp: add include/ to inclusion path Bug: 205970684 (repeat) GitOrigin-RevId: ef68c0f9b9145e7ffbee141fa192335bf877e82d Change-Id: Ide21a9ab84d480c018ae065868d8ee619df83bf0
2022-05-12[Copybara Auto Merge] Merge branch 'gs201-release' into ↵Aurora pro automerger
'android13-gs-pixel-5.10' Cherry-pick of Suspend/Resume support gxp: reset CMU regs on blk_off Bug: 231759324 gxp: detach all aux domains when we fail to resume Bug: 231707796 gxp: Hold cores failing to suspend in reset Bug: 231663916 gxp: fix multicore resume if blk is restarted Bug: 231681021 gxp: Release pm_lock before flushing pm workers Bug: 231266703 gxp: update minor version for suspend/resume Bug: 209083969 gxp: handle suspend/resume failure gxp: implement core suspend/resume gxp: reset CMU on PM init Bug: 231291191 gxp: protect mailbox registers from corruption Bug: 231265938 gxp: only set curr_state on non-OFF req Bug: 231291187 gxp: Log clients holding wakelocks on suspend Bug: 230931995 gxp: set boot mode to cold boot on firmware run Bug: 230818196 gxp: change default off LPM state from PS2 to PS3 Bug: 229801235 GitOrigin-RevId: 2520913f6599abeefee27275b056d73f15e2178d Change-Id: I1c15420e06771dff507f29053bc5bba010e46314
2022-05-02[Copybara Auto Merge] Merge branch 'gs201-release' into ↵Aurora pro automerger
'android13-gs-pixel-5.10' gxp: check BLK is on during power state transition gxp: prepare more worker structures for async jobs gxp: Cleanup virt<->phys core translation APIs gxp: switch mux to make sure LPM works gxp: init has_vd_lock field of gxp_client gxp: Clean up variable names and update variable type gxp: remove gxp-tmp.h gxp: move scratchpad macros from tmp to firmware.h gxp: remove no-iommu support gxp: remove SYNC_ macros from tmp.h gxp: remove DOORBELL macros gxp: move PSM macros to lpm.h gxp: Check for valid VD in mb_eventfd IOCTLs gxp: Firmware startup and Core-On optimizations gxp: Move ownership of user response queues gxp: move macros from tmp.h to bpm.c gxp: remove legacy software mailbox support gxp: Add gxp-eventfd interface gxp: remove unused macros from gxp-tmp.h gxp: bind page tables per virtual device Bug: 176979630 Bug: 207037425 Bug: 207038856 Bug: 209083969 Bug: 225059930 Bug: 226211187 Bug: 227145352 Bug: 227693917 Bug: 227694164 Bug: 228233514 Bug: 228921329 Bug: 229095276 Bug: 229584236 GitOrigin-RevId: d2c00e3ee2d71e551d41adfa5bcc6bec79379db3 Signed-off-by: Todd Poynor <toddpoynor@google.com> Change-Id: Ia92e12a2ab46eadc2876bcdb7ed3c04e223b3901
2022-04-04Merge branch 'gs201-release' to android13-gs-pixel-5.10Ilamparithi Mahendran
* gs201-release: gxp: remove redundant aurora_base global var Bug: 176984045 gxp: remove obsolete TODO of wakelock Bug: 201600514 gxp: correct frequency values for the memory rail Bug: 227334108 gxp: Enforce required wakelocks on OOD IOCTLs gxp: Cleanup and rearrange the IOCTLs ordering gxp: Split version info into its own IOCTL gxp: Fix a race condition in response processing Bug: 226982987 gxp: Fix non-aggressor flag behavior bugs Bug: 226682644 gxp: Require BLOCK wakelock to read global counter Bug: 225402208 gxp: Clean-up pending commands on mailbox close Bug: 194060459, 184572070 gxp: Add missing break in gxp_ioctl() Bug: 226501806 gxp: fix the READY state support in mailbox ioctl Bug: b/226281679 gxp: set non-aggressor bit with non-aggressor vote Bug: 221320387 gxp: support NON_AGGRESSOR flag in power IOCTLs Bug: 221320387 Signed-off-by: Ilamparithi Mahendran <ilamparithim@google.com> Change-Id: I397bf1e41305d2c3b10ad4073d4ba2d81da99de9
2022-03-07Merge branch 'gs201-release' to android13-gs-pixel-5.10Neela Chithirala
* gs201-release: gxp: create own queue for power state transition Bug: 221187219 gxp: Fix checkpatch errors gxp: lower the default power state Bug: 201600514 gxp: support memory power state operation Bug: 201600514 gxp: change power state asynchronously Bug: 221187219 gxp: Support for mapping and unmapping dma-bufs Bug: 177224744 gxp: Remove extra call to gxp_pm_init() on probe gxp: support power state voting by wakelock IOCTL Bug: 201600514 gxp: add firmware authentication support Bug: 218949590 GitOrigin-RevId: ae2f794c392b0357bbad0f6b84c71896b9e61185 Change-Id: I42bf2d5a834700059b4e8f145b8a78a27aa7b668 Signed-off-by: Neela Chithirala <chithiralan@google.com> Change-Id: Id2ea88150f661804c06455924b799640c38b0480
2022-02-03Merge branch 'gs201-release' to android13-gs-pixel-5.10Neela Chithirala
* gs201-release: gxp: Fix multicore VDs not shutting down clean Bug: 215303765 gxp: Rework VD locking and remove mailbox locking Bug: 189018271 gxp: initial commit for thermal driver Bug: 177217526 gxp: Add wakelock interface and make debugfs wakelock aware Bug: 215192870 gxp: Hook-up pm ops for driver suspend/resume Bug: 204924965 gxp: Dynamically power BLK_AUR on and off Bug: 204924965 gxp: support GXP_PLATFORM=GEM5 Bug: 204942713 gxp: Remove delay waiting for FW mailbox init Bug: 207037428 gxp: Fix infrequent crash during mailbox release gxp: Release FW file on firmware loading errors gxp: return GXP_RESP_CANCELLED if timeout occurs Bug: 207432733 gxp: Remove initial 10ms delay when disabling telemetry gxp: Cast telemetry buffer IOVAs to u32s before use gxp: check sscoredump by CONFIG_SUBSYSTEM_COREDUMP gxp: Fix double-lock hang in gxp_telemetry_vma_close gxp: Log driver git commit hash on probe Bug: 206744969 gxp: Add ioctl for reading the TOP global counter gxp: Implement eventfd signalling for telemetry gxp: Notify running cores of telemetry state changes gxp: Add notification interface Signed-off-by: Neela Chithirala <chithiralan@google.com> Change-Id: Ic7cd7b81ee643371c600ac208ae33d6344ed7f1b
2021-11-19Merge branch 'gs201-release' to android13-gs-pixel-5.10Neela Chithirala
* gs201-release: gxp: Initial commit for PM interface gxp: map and unmap TPU mailbox queues buffer gxp: unittests: add a gxp-debugfs-test.c gxp: unittests: add a gxp-platform-test.c gxp: unittests: add a gxp-vd-test.c gxp: unittests: add a gxp-firmware-test.c gxp: Update the logging/tracing device/host shared structures. gxp: Add ability to mmap telemetry buffers gxp: Move ETM trace_data off the stack gxp: Add IOCTL for configuring ETM registers gxp: Update copyright to "Google LLC" gxp: Remove NEED_SG_DMA_LENGTH from Kconfig gxp: unittests: fix kunit path in kokoro gxp: unittests: let LPM be always active gxp: unittests: add a fake firmware loader gxp: unittests: support device tree in unit tests gxp: unittests: use kokoro to execute tests Signed-off-by: Neela Chithirala <chithiralan@google.com> Change-Id: I8fa8dfaaa70d2a40503ff3bffe636380b69e443c
2021-10-28gxp: First import from development branchJohn Scheible
Squash at commit 48fe5786f1779890538d14f709b26063698c3711 Signed-off-by: John Scheible <johnscheible@google.com> Change-Id: I208434dddde40c08b9fc4d5da072ba10541992a2