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)
50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
/*
|
|
* Copyright (c) 2019 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_LOWPOWER_H_
|
|
#define _MTK_DRM_LOWPOWER_H_
|
|
|
|
#include <drm/drm_crtc.h>
|
|
|
|
struct mtk_drm_idlemgr_context {
|
|
unsigned long long idle_check_interval;
|
|
unsigned long long idle_vblank_check_internal;
|
|
unsigned long long idlemgr_last_kick_time;
|
|
unsigned int enterulps;
|
|
int session_mode_before_enter_idle;
|
|
int is_idle;
|
|
int cur_lp_cust_mode;
|
|
};
|
|
|
|
struct mtk_drm_idlemgr {
|
|
struct task_struct *idlemgr_task;
|
|
wait_queue_head_t idlemgr_wq;
|
|
atomic_t idlemgr_task_active;
|
|
struct mtk_drm_idlemgr_context *idlemgr_ctx;
|
|
};
|
|
|
|
void mtk_drm_idlemgr_kick(const char *source, struct drm_crtc *crtc,
|
|
int need_lock);
|
|
bool mtk_drm_is_idle(struct drm_crtc *crtc);
|
|
|
|
int mtk_drm_idlemgr_init(struct drm_crtc *crtc, int index);
|
|
unsigned int mtk_drm_set_idlemgr(struct drm_crtc *crtc, unsigned int flag,
|
|
bool need_lock);
|
|
unsigned long long
|
|
mtk_drm_set_idle_check_interval(struct drm_crtc *crtc,
|
|
unsigned long long new_interval);
|
|
unsigned long long
|
|
mtk_drm_get_idle_check_interval(struct drm_crtc *crtc);
|
|
|
|
#endif
|