diff options
author | Jörg Wagner <jorwag@google.com> | 2022-12-15 16:21:51 +0000 |
---|---|---|
committer | Jörg Wagner <jorwag@google.com> | 2022-12-15 16:28:12 +0000 |
commit | 25e383ffa36a9916065804029fbe3552c71329fe (patch) | |
tree | 1fd24ee61cf42115c75121f9de544814c76cb5a7 /mali_kbase/mali_kbase_defs.h | |
parent | 9ff5b6f2510d94765def3cf7c1fda01e387cabab (diff) | |
download | gpu-25e383ffa36a9916065804029fbe3552c71329fe.tar.gz |
Mali Valhall Android DDK r41p0-01eac0 KMD
Provenance 7bb206ede984968bd1014b29529e94763b043202 (ipdelivery/EAC/v_r41p0)
VX504X08X-BU-00000-r41p0-01eac0 - Valhall Android DDK
VX504X08X-BU-60000-r41p0-01eac0 - Valhall Android
Document Bundle
VX504X08X-DC-11001-r41p0-01eac0 - Valhall Android
DDK Software Errata
VX504X08X-SW-99006-r41p0-01eac0 - Valhall
Android Renderscript AOSP parts
Change-Id: I95f741ffe0ec4ee4c8f2c0338778294f1a2a2836
Diffstat (limited to 'mali_kbase/mali_kbase_defs.h')
-rw-r--r-- | mali_kbase/mali_kbase_defs.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/mali_kbase/mali_kbase_defs.h b/mali_kbase/mali_kbase_defs.h index 48f8795..722ffc7 100644 --- a/mali_kbase/mali_kbase_defs.h +++ b/mali_kbase/mali_kbase_defs.h @@ -643,7 +643,6 @@ struct kbase_process { * struct kbase_mem_migrate - Object representing an instance for managing * page migration. * - * @mapping: Pointer to address space struct used for page migration. * @free_pages_list: List of deferred pages to free. Mostly used when page migration * is enabled. Pages in memory pool that require migrating * will be freed instead. However page cannot be freed @@ -654,13 +653,17 @@ struct kbase_process { * @free_pages_workq: Work queue to process the work items queued to free * pages in @free_pages_list. * @free_pages_work: Work item to free pages in @free_pages_list. + * @inode: Pointer to inode whose address space operations are used + * for page migration purposes. */ struct kbase_mem_migrate { - struct address_space *mapping; struct list_head free_pages_list; spinlock_t free_pages_lock; struct workqueue_struct *free_pages_workq; struct work_struct free_pages_work; +#if (KERNEL_VERSION(6, 0, 0) > LINUX_VERSION_CODE) + struct inode *inode; +#endif }; /** @@ -701,6 +704,10 @@ struct kbase_mem_migrate { * @opp_table: Pointer to the device OPP structure maintaining the * link to OPPs attached to a device. This is obtained * after setting regulator names for the device. + * @token: Integer replacement for opp_table in kernel versions + * 6 and greater. Value is a token id number when 0 or greater, + * and a linux errno when negative. Must be initialised + * to an non-zero value as 0 is valid token id. * @devname: string containing the name used for GPU device instance, * miscellaneous device is registered using the same name. * @id: Unique identifier for the device, indicates the number of @@ -898,6 +905,10 @@ struct kbase_mem_migrate { * GPU2019-3878. PM state machine is invoked after * clearing this flag and @hwaccess_lock is used to * serialize the access. + * @mmu_page_migrate_in_progress: Set before starting a MMU page migration transaction + * and cleared after the transaction completes. PM L2 state is + * prevented from entering powering up/down transitions when the + * flag is set, @hwaccess_lock is used to serialize the access. * @poweroff_pending: Set when power off operation for GPU is started, reset when * power on for GPU is started. * @infinite_cache_active_default: Set to enable using infinite cache for all the @@ -978,6 +989,10 @@ struct kbase_mem_migrate { * @oom_notifier_block: notifier_block containing kernel-registered out-of- * memory handler. * @mem_migrate: Per device object for managing page migration. + * @live_fence_metadata: Count of live fence metadata structures created by + * KCPU queue. These structures may outlive kbase module + * itself. Therefore, in such a case, a warning should be + * be produced. */ struct kbase_device { u32 hw_quirks_sc; @@ -1002,9 +1017,11 @@ struct kbase_device { #if IS_ENABLED(CONFIG_REGULATOR) struct regulator *regulators[BASE_MAX_NR_CLOCKS_REGULATORS]; unsigned int nr_regulators; -#if (KERNEL_VERSION(4, 10, 0) <= LINUX_VERSION_CODE) +#if (KERNEL_VERSION(6, 0, 0) <= LINUX_VERSION_CODE) + int token; +#elif (KERNEL_VERSION(4, 10, 0) <= LINUX_VERSION_CODE) struct opp_table *opp_table; -#endif /* (KERNEL_VERSION(4, 10, 0) <= LINUX_VERSION_CODE */ +#endif /* (KERNEL_VERSION(6, 0, 0) <= LINUX_VERSION_CODE) */ #endif /* CONFIG_REGULATOR */ char devname[DEVNAME_SIZE]; u32 id; @@ -1173,6 +1190,7 @@ struct kbase_device { #if MALI_USE_CSF bool mmu_hw_operation_in_progress; #endif + bool mmu_page_migrate_in_progress; bool poweroff_pending; bool infinite_cache_active_default; @@ -1261,6 +1279,10 @@ struct kbase_device { struct kbase_mem_migrate mem_migrate; + +#if MALI_USE_CSF && IS_ENABLED(CONFIG_SYNC_FILE) + atomic_t live_fence_metadata; +#endif }; /** |