/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 *
 * (C) COPYRIGHT 2014-2024 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.
 *
 */

#ifndef _KBASE_HWCONFIG_FEATURES_H_
#define _KBASE_HWCONFIG_FEATURES_H_

#include <linux/version_compat_defs.h>

enum base_hw_feature {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_TLS_HASHING,
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT,
	KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,
	KBASE_HW_FEATURE_L2_CONFIG,
	KBASE_HW_FEATURE_L2_SLICE_HASH,
	KBASE_HW_FEATURE_GPU_SLEEP,
	KBASE_HW_FEATURE_FLUSH_INV_SHADER_OTHER,
	KBASE_HW_FEATURE_CORE_FEATURES,
	KBASE_HW_FEATURE_PBHA_HWU,
	KBASE_HW_FEATURE_LARGE_PAGE_ALLOC,
	KBASE_HW_FEATURE_THREAD_TLS_ALLOC,
	KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_generic[] = {
	KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tMIx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT, KBASE_HW_FEATURE_FLUSH_REDUCTION, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tHEx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT, KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tSIx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT, KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tDVx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT, KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tNOx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT,   KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE, KBASE_HW_FEATURE_TLS_HASHING,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,      KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tGOx[] = {
	KBASE_HW_FEATURE_THREAD_GROUP_SPLIT,   KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE, KBASE_HW_FEATURE_TLS_HASHING,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,      KBASE_HW_FEATURE_CORE_FEATURES,
	KBASE_HW_FEATURE_THREAD_TLS_ALLOC,     KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tTRx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,	 KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,	 KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_FLUSH_INV_SHADER_OTHER, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tNAx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,	 KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,	 KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_FLUSH_INV_SHADER_OTHER, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tBEx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,
	KBASE_HW_FEATURE_L2_CONFIG,
	KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_FLUSH_INV_SHADER_OTHER,
	KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tBAx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_IDVS_GROUP_SIZE,
	KBASE_HW_FEATURE_L2_CONFIG,
	KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_FLUSH_INV_SHADER_OTHER,
	KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tODx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION, KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG, KBASE_HW_FEATURE_CLEAN_ONLY_SAFE, KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tGRx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION, KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG,	  KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_CORE_FEATURES,	  KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tVAx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION, KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG,	  KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_CORE_FEATURES,	  KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tTUx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION, KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG,	  KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_L2_SLICE_HASH,	  KBASE_HW_FEATURE_GPU_SLEEP,
	KBASE_HW_FEATURE_CORE_FEATURES,	  KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tTIx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,
	KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG,
	KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_L2_SLICE_HASH,
	KBASE_HW_FEATURE_GPU_SLEEP,
	KBASE_HW_FEATURE_CORE_FEATURES,
	KBASE_HW_FEATURE_PBHA_HWU,
	KBASE_HW_FEATURE_END
};

__maybe_unused static const enum base_hw_feature base_hw_features_tKRx[] = {
	KBASE_HW_FEATURE_FLUSH_REDUCTION,  KBASE_HW_FEATURE_PROTECTED_DEBUG_MODE,
	KBASE_HW_FEATURE_L2_CONFIG,	   KBASE_HW_FEATURE_CLEAN_ONLY_SAFE,
	KBASE_HW_FEATURE_L2_SLICE_HASH,	   KBASE_HW_FEATURE_GPU_SLEEP,
	KBASE_HW_FEATURE_CORE_FEATURES,	   KBASE_HW_FEATURE_PBHA_HWU,
	KBASE_HW_FEATURE_LARGE_PAGE_ALLOC, KBASE_HW_FEATURE_END
};


#endif /* _KBASE_HWCONFIG_FEATURES_H_ */
