aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/arm/midgard/mali_kbase_cpuprops.h
blob: 0f669b706dd73dc85c2f0887b74d419dff4e1100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 *
 * (C) COPYRIGHT 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 licence.
 *
 * A copy of the licence is included with the program, and can also be obtained
 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 *
 */





/**
 * @file mali_kbase_cpuprops.h
 * Base kernel property query APIs
 */

#ifndef _KBASE_CPUPROPS_H_
#define _KBASE_CPUPROPS_H_

#include <malisw/mali_malisw.h>

/* Forward declarations */
struct kbase_uk_cpuprops;

/**
 * @brief Default implementation of @ref KBASE_CONFIG_ATTR_CPU_SPEED_FUNC.
 *
 * This function sets clock_speed to 100, so will be an underestimate for
 * any real system.
 *
 * See @ref kbase_cpuprops_clock_speed_function for details on the parameters
 * and return value.
 */
int kbase_cpuprops_get_default_clock_speed(u32 * const clock_speed);

/**
 * @brief Provides CPU properties data.
 *
 * Fill the kbase_uk_cpuprops with values from CPU configuration.
 *
 * @param kctx         The kbase context
 * @param kbase_props  A copy of the kbase_uk_cpuprops structure from userspace
 *
 * @return MALI_ERROR_NONE on success. Any other value indicates failure.
 */
mali_error kbase_cpuprops_uk_get_props(kbase_context *kctx, struct kbase_uk_cpuprops * const kbase_props);

#endif /*_KBASE_CPUPROPS_H_*/