#
# Copyright (C) 2021. Hisilicon Technologies Co., Ltd.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
# only version 2 as published by the Free Software Foundation.
#
# 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.
#

include $(HVGR_PATH)/pm/power/Kbuild

INCLUDE_DIR += \
	-I$(HVGR_PATH)/pm \
	-I$(HVGR_PATH)/pm/dfx \
	-I$(HVGR_PATH)/pm/dvfs \
	-I$(HVGR_PATH)/pm/driver \
	-I$(HVGR_PATH)/pm/driver/$(CHIP_VER_DIR)

SRC += \
	$(HVGR_ROOT)/pm/hvgr_pm.c \
	$(HVGR_ROOT)/pm/driver/hvgr_pm_driver_base.c \
	$(HVGR_ROOT)/pm/dvfs/hvgr_pm_dvfs.c \
	$(HVGR_ROOT)/pm/dfx/hvgr_pm_dfx.c \
	$(HVGR_ROOT)/pm/driver/$(CHIP_VER_DIR)/hvgr_pm_driver_adapt.c


ifeq ($(CONFIG_GPU_VIRTUAL_DEVFREQ), y)
    INCLUDE_DIR += \
        -I$(HVGR_PATH)/pm/virtual_devfreq
    SRC += \
        $(HVGR_ROOT)/pm/virtual_devfreq/hvgr_virtual_devfreq.c
endif

DEFINES += -DHVGR_GPU_POWER_ASYNC