| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 
 | /* | 
 |  * | 
 |  * (C) COPYRIGHT 2017-2023 ARM Limited. All rights reserved. | 
 |  * | 
 |  * This program is free software and is provided to you under the terms of the | 
 |  * GNU General Public License version 2 as published by the Free Software | 
 |  * Foundation, and any use by you of this program is subject to the terms | 
 |  * of such GNU license. | 
 |  * | 
 |  * This program is distributed in the hope that it will be useful, | 
 |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
 |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
 |  * GNU General Public License for more details. | 
 |  * | 
 |  * You should have received a copy of the GNU General Public License | 
 |  * along with this program; if not, you can access it online at | 
 |  * http://www.gnu.org/licenses/gpl-2.0.html. | 
 |  * | 
 |  */ | 
 |  | 
 | /* Kernel-side tests may include mali_kbase's headers. Therefore any config | 
 |  * options which affect the sizes of any structs (e.g. adding extra members) | 
 |  * must be included in these defaults, so that the structs are consistent in | 
 |  * both mali_kbase and the test modules. */ | 
 | bob_defaults { | 
 |     name: "mali_kbase_shared_config_defaults", | 
 |     defaults: [ | 
 |         "kernel_defaults", | 
 |     ], | 
 |     mali_no_mali: { | 
 |         kbuild_options: [ | 
 |             "CONFIG_MALI_NO_MALI=y", | 
 |             "CONFIG_MALI_NO_MALI_DEFAULT_GPU={{.gpu}}", | 
 |             "CONFIG_GPU_HWVER={{.hwver}}", | 
 |         ], | 
 |     }, | 
 |     mali_platform_dt_pin_rst: { | 
 |         kbuild_options: ["CONFIG_MALI_PLATFORM_DT_PIN_RST=y"], | 
 |     }, | 
 |     gpu_has_csf: { | 
 |         kbuild_options: ["CONFIG_MALI_CSF_SUPPORT=y"], | 
 |     }, | 
 |     mali_devfreq: { | 
 |         kbuild_options: ["CONFIG_MALI_DEVFREQ=y"], | 
 |     }, | 
 |     mali_midgard_dvfs: { | 
 |         kbuild_options: ["CONFIG_MALI_MIDGARD_DVFS=y"], | 
 |     }, | 
 |     mali_gator_support: { | 
 |         kbuild_options: ["CONFIG_MALI_GATOR_SUPPORT=y"], | 
 |     }, | 
 |     mali_midgard_enable_trace: { | 
 |         kbuild_options: ["CONFIG_MALI_MIDGARD_ENABLE_TRACE=y"], | 
 |     }, | 
 |     mali_arbiter_support: { | 
 |         kbuild_options: ["CONFIG_MALI_ARBITER_SUPPORT=y"], | 
 |     }, | 
 |     mali_dma_buf_map_on_demand: { | 
 |         kbuild_options: ["CONFIG_MALI_DMA_BUF_MAP_ON_DEMAND=y"], | 
 |     }, | 
 |     mali_dma_buf_legacy_compat: { | 
 |         kbuild_options: ["CONFIG_MALI_DMA_BUF_LEGACY_COMPAT=y"], | 
 |     }, | 
 |     large_page_alloc_override: { | 
 |         kbuild_options: ["CONFIG_LARGE_PAGE_ALLOC_OVERRIDE=y"], | 
 |     }, | 
 |     large_page_alloc: { | 
 |         kbuild_options: ["CONFIG_LARGE_PAGE_ALLOC=y"], | 
 |     }, | 
 |     page_migration_support: { | 
 |         kbuild_options: ["CONFIG_PAGE_MIGRATION_SUPPORT=y"], | 
 |     }, | 
 |     mali_memory_fully_backed: { | 
 |         kbuild_options: ["CONFIG_MALI_MEMORY_FULLY_BACKED=y"], | 
 |     }, | 
 |     mali_corestack: { | 
 |         kbuild_options: ["CONFIG_MALI_CORESTACK=y"], | 
 |     }, | 
 |     mali_real_hw: { | 
 |         kbuild_options: ["CONFIG_MALI_REAL_HW=y"], | 
 |     }, | 
 |     mali_error_inject_none: { | 
 |         kbuild_options: ["CONFIG_MALI_ERROR_INJECT_NONE=y"], | 
 |     }, | 
 |     mali_error_inject_track_list: { | 
 |         kbuild_options: ["CONFIG_MALI_ERROR_INJECT_TRACK_LIST=y"], | 
 |     }, | 
 |     mali_error_inject_random: { | 
 |         kbuild_options: ["CONFIG_MALI_ERROR_INJECT_RANDOM=y"], | 
 |     }, | 
 |     mali_error_inject: { | 
 |         kbuild_options: ["CONFIG_MALI_ERROR_INJECT=y"], | 
 |     }, | 
 |     mali_debug: { | 
 |         kbuild_options: [ | 
 |             "CONFIG_MALI_DEBUG=y", | 
 |             "MALI_KERNEL_TEST_API={{.debug}}", | 
 |         ], | 
 |     }, | 
 |     mali_fence_debug: { | 
 |         kbuild_options: ["CONFIG_MALI_FENCE_DEBUG=y"], | 
 |     }, | 
 |     mali_system_trace: { | 
 |         kbuild_options: ["CONFIG_MALI_SYSTEM_TRACE=y"], | 
 |     }, | 
 |     buslog: { | 
 |         kbuild_options: ["CONFIG_MALI_BUSLOG=y"], | 
 |     }, | 
 |     cinstr_vector_dump: { | 
 |         kbuild_options: ["CONFIG_MALI_VECTOR_DUMP=y"], | 
 |     }, | 
 |     cinstr_gwt: { | 
 |         kbuild_options: ["CONFIG_MALI_CINSTR_GWT=y"], | 
 |     }, | 
 |     cinstr_primary_hwc: { | 
 |         kbuild_options: ["CONFIG_MALI_PRFCNT_SET_PRIMARY=y"], | 
 |     }, | 
 |     cinstr_secondary_hwc: { | 
 |         kbuild_options: ["CONFIG_MALI_PRFCNT_SET_SECONDARY=y"], | 
 |     }, | 
 |     cinstr_tertiary_hwc: { | 
 |         kbuild_options: ["CONFIG_MALI_PRFCNT_SET_TERTIARY=y"], | 
 |     }, | 
 |     cinstr_hwc_set_select_via_debug_fs: { | 
 |         kbuild_options: ["CONFIG_MALI_PRFCNT_SET_SELECT_VIA_DEBUG_FS=y"], | 
 |     }, | 
 |     mali_job_dump: { | 
 |         kbuild_options: ["CONFIG_MALI_JOB_DUMP"], | 
 |     }, | 
 |     mali_pwrsoft_765: { | 
 |         kbuild_options: ["CONFIG_MALI_PWRSOFT_765=y"], | 
 |     }, | 
 |     mali_hw_errata_1485982_not_affected: { | 
 |         kbuild_options: ["CONFIG_MALI_HW_ERRATA_1485982_NOT_AFFECTED=y"], | 
 |     }, | 
 |     mali_hw_errata_1485982_use_clock_alternative: { | 
 |         kbuild_options: ["CONFIG_MALI_HW_ERRATA_1485982_USE_CLOCK_ALTERNATIVE=y"], | 
 |     }, | 
 |     platform_is_fpga: { | 
 |         kbuild_options: ["CONFIG_MALI_IS_FPGA=y"], | 
 |     }, | 
 |     mali_coresight: { | 
 |         kbuild_options: ["CONFIG_MALI_CORESIGHT=y"], | 
 |     }, | 
 |     mali_fw_trace_mode_manual: { | 
 |         kbuild_options: ["CONFIG_MALI_FW_TRACE_MODE_MANUAL=y"], | 
 |     }, | 
 |     mali_fw_trace_mode_auto_print: { | 
 |         kbuild_options: ["CONFIG_MALI_FW_TRACE_MODE_AUTO_PRINT=y"], | 
 |     }, | 
 |     mali_fw_trace_mode_auto_discard: { | 
 |         kbuild_options: ["CONFIG_MALI_FW_TRACE_MODE_AUTO_DISCARD=y"], | 
 |     }, | 
 |     kbuild_options: [ | 
 |         "CONFIG_MALI_PLATFORM_NAME={{.mali_platform_name}}", | 
 |         "MALI_CUSTOMER_RELEASE={{.release}}", | 
 |         "MALI_UNIT_TEST={{.unit_test_code}}", | 
 |         "MALI_USE_CSF={{.gpu_has_csf}}", | 
 |         "MALI_JIT_PRESSURE_LIMIT_BASE={{.jit_pressure_limit_base}}", | 
 |  | 
 |         // Start of CS experimental features definitions. | 
 |         // If there is nothing below, definition should be added as follows: | 
 |         // "MALI_EXPERIMENTAL_FEATURE={{.experimental_feature}}" | 
 |         // experimental_feature above comes from Mconfig in | 
 |         // <ddk_root>/product/base/ | 
 |         // However, in Mconfig, experimental_feature should be looked up (for | 
 |         // similar explanation to this one) as ALLCAPS, i.e. | 
 |         // EXPERIMENTAL_FEATURE. | 
 |         // | 
 |         // IMPORTANT: MALI_CS_EXPERIMENTAL should NEVER be defined below as it | 
 |         // is an umbrella feature that would be open for inappropriate use | 
 |         // (catch-all for experimental CS code without separating it into | 
 |         // different features). | 
 |         "MALI_INCREMENTAL_RENDERING_JM={{.incremental_rendering_jm}}", | 
 |         "MALI_BASE_CSF_PERFORMANCE_TESTS={{.base_csf_performance_tests}}", | 
 |     ], | 
 | } | 
 |  | 
 | bob_kernel_module { | 
 |     name: "mali_kbase", | 
 |     defaults: [ | 
 |         "mali_kbase_shared_config_defaults", | 
 |     ], | 
 |     srcs: [ | 
 |         "*.c", | 
 |         "*.h", | 
 |         "Kbuild", | 
 |         "backend/gpu/*.c", | 
 |         "backend/gpu/*.h", | 
 |         "backend/gpu/Kbuild", | 
 |         "context/*.c", | 
 |         "context/*.h", | 
 |         "context/Kbuild", | 
 |         "hwcnt/*.c", | 
 |         "hwcnt/*.h", | 
 |         "hwcnt/backend/*.h", | 
 |         "hwcnt/Kbuild", | 
 |         "ipa/*.c", | 
 |         "ipa/*.h", | 
 |         "ipa/Kbuild", | 
 |         "platform/*.h", | 
 |         "platform/*/*.c", | 
 |         "platform/*/*.h", | 
 |         "platform/*/Kbuild", | 
 |         "platform/*/*/*.c", | 
 |         "platform/*/*/*.h", | 
 |         "platform/*/*/Kbuild", | 
 |         "platform/*/*/*.c", | 
 |         "platform/*/*/*.h", | 
 |         "platform/*/*/Kbuild", | 
 |         "platform/*/*/*/*.c", | 
 |         "platform/*/*/*/*.h", | 
 |         "platform/*/*/*/Kbuild", | 
 |         "thirdparty/*.c", | 
 |         "thirdparty/Kbuild", | 
 |         "debug/*.c", | 
 |         "debug/*.h", | 
 |         "debug/Kbuild", | 
 |         "device/*.c", | 
 |         "device/*.h", | 
 |         "device/Kbuild", | 
 |         "gpu/*.c", | 
 |         "gpu/*.h", | 
 |         "gpu/Kbuild", | 
 |         "tl/*.c", | 
 |         "tl/*.h", | 
 |         "tl/Kbuild", | 
 |         "mmu/*.c", | 
 |         "mmu/*.h", | 
 |         "mmu/Kbuild", | 
 |     ], | 
 |     gpu_has_job_manager: { | 
 |         srcs: [ | 
 |             "context/backend/*_jm.c", | 
 |             "debug/backend/*_jm.c", | 
 |             "debug/backend/*_jm.h", | 
 |             "device/backend/*_jm.c", | 
 |             "gpu/backend/*_jm.c", | 
 |             "gpu/backend/*_jm.h", | 
 |             "hwcnt/backend/*_jm.c", | 
 |             "hwcnt/backend/*_jm.h", | 
 |             "hwcnt/backend/*_jm_*.c", | 
 |             "hwcnt/backend/*_jm_*.h", | 
 |             "jm/*.h", | 
 |             "tl/backend/*_jm.c", | 
 |             "mmu/backend/*_jm.c", | 
 |             "ipa/backend/*_jm.c", | 
 |             "ipa/backend/*_jm.h", | 
 |         ], | 
 |     }, | 
 |     gpu_has_csf: { | 
 |         srcs: [ | 
 |             "context/backend/*_csf.c", | 
 |             "csf/*.c", | 
 |             "csf/*.h", | 
 |             "csf/Kbuild", | 
 |             "csf/ipa_control/*.c", | 
 |             "csf/ipa_control/*.h", | 
 |             "csf/ipa_control/Kbuild", | 
 |             "debug/backend/*_csf.c", | 
 |             "debug/backend/*_csf.h", | 
 |             "device/backend/*_csf.c", | 
 |             "gpu/backend/*_csf.c", | 
 |             "gpu/backend/*_csf.h", | 
 |             "hwcnt/backend/*_csf.c", | 
 |             "hwcnt/backend/*_csf.h", | 
 |             "hwcnt/backend/*_csf_*.c", | 
 |             "hwcnt/backend/*_csf_*.h", | 
 |             "tl/backend/*_csf.c", | 
 |             "mmu/backend/*_csf.c", | 
 |             "ipa/backend/*_csf.c", | 
 |             "ipa/backend/*_csf.h", | 
 |         ], | 
 |     }, | 
 |     mali_arbiter_support: { | 
 |         srcs: [ | 
 |             "arbiter/*.c", | 
 |             "arbiter/*.h", | 
 |             "arbiter/Kbuild", | 
 |         ], | 
 |     }, | 
 |     kbuild_options: [ | 
 |         "CONFIG_MALI_MIDGARD=m", | 
 |         "CONFIG_MALI_KUTF=n", | 
 |     ], | 
 |     buslog: { | 
 |         extra_symbols: [ | 
 |             "bus_logger", | 
 |         ], | 
 |     }, | 
 | } |