# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
#
# (C) COPYRIGHT 2018-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.
#
#


#MTK_DTV patch : add support for OnePackage dynamic ko
mali_kbase_$(MTK_DTV_PLATFORM_NAME)-y += \
    ../midgard/csf/mali_kbase_csf_firmware_cfg.o \
    ../midgard/csf/mali_kbase_csf_trace_buffer.o \
    ../midgard/csf/mali_kbase_csf.o \
    ../midgard/csf/mali_kbase_csf_scheduler.o \
    ../midgard/csf/mali_kbase_csf_kcpu.o \
    ../midgard/csf/mali_kbase_csf_tiler_heap.o \
    ../midgard/csf/mali_kbase_csf_timeout.o \
    ../midgard/csf/mali_kbase_csf_tl_reader.o \
    ../midgard/csf/mali_kbase_csf_heap_context_alloc.o \
    ../midgard/csf/mali_kbase_csf_reset_gpu.o \
    ../midgard/csf/mali_kbase_csf_csg_debugfs.o \
    ../midgard/csf/mali_kbase_csf_kcpu_debugfs.o \
    ../midgard/csf/mali_kbase_csf_sync_debugfs.o \
    ../midgard/csf/mali_kbase_csf_kcpu_fence_debugfs.o \
    ../midgard/csf/mali_kbase_csf_protected_memory.o \
    ../midgard/csf/mali_kbase_csf_tiler_heap_debugfs.o \
    ../midgard/csf/mali_kbase_csf_cpu_queue_debugfs.o \
    ../midgard/csf/mali_kbase_csf_event.o \
    ../midgard/csf/mali_kbase_csf_firmware_log.o \
    ../midgard/csf/mali_kbase_csf_firmware_core_dump.o \
    ../midgard/csf/mali_kbase_csf_tiler_heap_reclaim.o \
    ../midgard/csf/mali_kbase_csf_mcu_shared_reg.o

ifeq ($(CONFIG_MALI_NO_MALI),y)
mali_kbase_$(MTK_DTV_PLATFORM_NAME)-y += ../midgard/csf/mali_kbase_csf_firmware_no_mali.o
else
mali_kbase_$(MTK_DTV_PLATFORM_NAME)-y += ../midgard/csf/mali_kbase_csf_firmware.o
endif

mali_kbase_$(MTK_DTV_PLATFORM_NAME)-$(CONFIG_DEBUG_FS) += ../midgard/csf/mali_kbase_debug_csf_fault.o

#MTK_DTV patch : add support for OnePackage dynamic ko
ifeq ($(KBUILD_EXTMOD),)
# in-tree
    -include $(src)/../midgard/csf/ipa_control/Kbuild
else
# out-of-tree
    include $(src)/../midgard/csf/ipa_control/Kbuild
endif
