Files
android_kernel_fxtec_sm6115/include/linux/msm_adreno_devfreq.h
Urvashi Agrawal 0a88312f6b msm: kgsl: Add Qualcomm GPU driver for kona
Add snapshot of GPU driver as of commit 9ac69cf (clk: qcom: gcc:
Support code for clock controller for sdxprairie).

Fixed compile errors,checkpatch issues, header refs and API changes:
	* Fix setup_timer API to use the new API
	* Add a missing argument to of_dma_configure
	* Rename cmd_db_get_aux_data
	* Change member name of tcs_cmd from complete to wait
	* Support new IDR_INIT API
	* Support new usage of llcc_slice_getd API
	* Remove the custom KGSL logging macros
	* Add utility functions for CP P4 identifiers
	  and CP protected mode
	* Add functions for GMU core operations
	* Add helper functions to request interrupts
	* Replace adreno_getproperty with an array
	* Remove module params
	* Fix Coccinelle warnings

Change-Id: Ifa57a94f2247fe90c713f1943882d75a60a554a5
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
2018-11-28 14:38:14 -08:00

91 lines
2.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
*/
#ifndef MSM_ADRENO_DEVFREQ_H
#define MSM_ADRENO_DEVFREQ_H
#include <linux/devfreq.h>
#include <linux/notifier.h>
#define ADRENO_DEVFREQ_NOTIFY_SUBMIT 1
#define ADRENO_DEVFREQ_NOTIFY_RETIRE 2
#define ADRENO_DEVFREQ_NOTIFY_IDLE 3
#define DEVFREQ_FLAG_WAKEUP_MAXFREQ 0x2
#define DEVFREQ_FLAG_FAST_HINT 0x4
#define DEVFREQ_FLAG_SLOW_HINT 0x8
struct device;
int kgsl_devfreq_add_notifier(struct device *device,
struct notifier_block *block);
int kgsl_devfreq_del_notifier(struct device *device,
struct notifier_block *block);
/* same as KGSL_MAX_PWRLEVELS */
#define MSM_ADRENO_MAX_PWRLEVELS 10
struct xstats {
u64 ram_time;
u64 ram_wait;
int mod;
};
struct devfreq_msm_adreno_tz_data {
struct notifier_block nb;
struct {
s64 total_time;
s64 busy_time;
u32 ctxt_aware_target_pwrlevel;
u32 ctxt_aware_busy_penalty;
} bin;
struct {
u64 total_time;
u64 ram_time;
u64 ram_wait;
u64 gpu_time;
u32 num;
u32 max;
u32 width;
u32 *up;
u32 *down;
u32 *p_up;
u32 *p_down;
unsigned int *index;
uint64_t *ib;
} bus;
unsigned int device_id;
bool is_64;
bool disable_busy_time_burst;
bool ctxt_aware_enable;
};
struct msm_adreno_extended_profile {
struct devfreq_msm_adreno_tz_data *private_data;
struct devfreq *bus_devfreq;
struct workqueue_struct *partner_wq;
struct work_struct partner_start_event_ws;
struct work_struct partner_stop_event_ws;
struct work_struct partner_suspend_event_ws;
struct work_struct partner_resume_event_ws;
struct devfreq_dev_profile profile;
};
struct msm_busmon_extended_profile {
u32 flag;
unsigned long percent_ab;
unsigned long ab_mbytes;
struct devfreq_msm_adreno_tz_data *private_data;
struct devfreq_dev_profile profile;
};
#ifdef CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON
int devfreq_vbif_update_bw(unsigned long ib, unsigned long ab);
int devfreq_vbif_register_callback(void *callback);
#endif
#endif