4501af74f1c1ddf38c16c2a740b021647bef92ea
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / t6xx / kbase / src / common / mali_kbase_hw.h
1 /*
2  *
3  * (C) COPYRIGHT ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA  02110-1301, USA.
13  *
14  */
15
16
17
18
19
20 /**
21  * @file
22  * Run-time work-arounds helpers
23  */
24
25 #ifndef _KBASE_HW_H_
26 #define _KBASE_HW_H_
27
28 #include "mali_kbase_defs.h"
29
30 /**
31  * @brief Tell whether a work-around should be enabled
32  */
33 #define kbase_hw_has_issue(kbdev, issue)\
34         test_bit(issue, &(kbdev)->hw_issues_mask[0])
35
36 /**
37  * @brief Tell whether a feature is supported
38  */
39 #define kbase_hw_has_feature(kbdev, feature)\
40         test_bit(feature, &(kbdev)->hw_features_mask[0])
41
42 /**
43  * @brief Set the HW issues mask depending on the GPU ID
44  */
45 mali_error kbase_hw_set_issues_mask(kbase_device *kbdev);
46
47 /**
48  * @brief Set the features mask depending on the GPU ID
49  */
50 void kbase_hw_set_features_mask(kbase_device *kbdev);
51
52 #endif                          /* _KBASE_HW_H_ */