Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
98 lines
2.7 KiB
C
98 lines
2.7 KiB
C
/*
|
|
* Copyright (C) 2015 MediaTek Inc.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License 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.
|
|
*/
|
|
|
|
#ifndef _MTK_DRM_HELPER_H_
|
|
#define _MTK_DRM_HELPER_H_
|
|
|
|
enum MTK_DRM_HELPER_OPT {
|
|
MTK_DRM_OPT_STAGE = 0,
|
|
MTK_DRM_OPT_USE_CMDQ,
|
|
MTK_DRM_OPT_USE_M4U,
|
|
/* Begin: lowpower option*/
|
|
MTK_DRM_OPT_SODI_SUPPORT,
|
|
MTK_DRM_OPT_IDLE_MGR,
|
|
MTK_DRM_OPT_IDLEMGR_SWTCH_DECOUPLE,
|
|
MTK_DRM_OPT_IDLEMGR_BY_REPAINT,
|
|
MTK_DRM_OPT_IDLEMGR_ENTER_ULPS,
|
|
MTK_DRM_OPT_IDLEMGR_KEEP_LP11,
|
|
MTK_DRM_OPT_DYNAMIC_RDMA_GOLDEN_SETTING,
|
|
MTK_DRM_OPT_IDLEMGR_DISABLE_ROUTINE_IRQ,
|
|
MTK_DRM_OPT_MET_LOG, /* for met */
|
|
/* End: lowpower option */
|
|
MTK_DRM_OPT_USE_PQ,
|
|
M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RM_HELPER_STAGE_BRING_UP,
|
|
MTK_DRM_HELPER_STAGE_NORMAL
|
|
};
|
|
|
|
int mtk_drm_helper_get_opt(struct mtk_drm_helper *helper_opt,
|
|
enum MTK_DRM_HELPER_OPT option);
|
|
int mtk_drm_helper_set_opt(struct mtk_drm_helper *helper_opt,
|
|
enum MTK_DRM_HELPER_OPT option, int value);
|
|
int mtk_drm_helper_set_opt_by_name(struct mtk_drm_helper *helper_opt,
|
|
const char *name, int value);
|
|
int mtk_drm_helper_get_opt_list(struct mtk_drm_helper *helper_opt,
|
|
char *stringbuf, int buf_len);
|
|
void mtk_drm_helper_init(struct device *dev,
|
|
struct mtk_drm_helper **helper_opt);
|
|
|
|
enum DISP_HELPER_STAGE disp_helper_get_stage(void);
|
|
const char *disp_helper_stage_spy(void);
|
|
enum MTK_DRM_HELPER_OPT
|
|
mtk_drm_helper_name_to_opt(struct mtk_drm_helper *helper_opt, const char *name);
|
|
|
|
#endif /* _MTK_DRM_HELPER_H_ */
|