XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
drm
drm_util.h
Go to the documentation of this file.
1
/*
2
* Internal Header for the Direct Rendering Manager
3
*
4
* Copyright 2018 Intel Corporation
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the "Software"),
8
* to deal in the Software without restriction, including without limitation
9
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
* and/or sell copies of the Software, and to permit persons to whom the
11
* Software is furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice (including the next
14
* paragraph) shall be included in all copies or substantial portions of the
15
* Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
* OTHER DEALINGS IN THE SOFTWARE.
24
*/
25
26
#ifndef _DRM_UTIL_H_
27
#define _DRM_UTIL_H_
28
35
#include <
linux/interrupt.h
>
36
#include <
linux/kgdb.h
>
37
#include <
linux/preempt.h
>
38
#include <
linux/smp.h
>
39
#include <
linux/util_macros.h
>
40
41
/*
42
* Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall
43
* only be visible for drmselftests.
44
*/
45
#if defined(CONFIG_DRM_EXPORT_FOR_TESTS)
46
#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x)
47
#else
48
#define EXPORT_SYMBOL_FOR_TESTS_ONLY(x)
49
#endif
50
62
static
inline
bool
drm_can_sleep(
void
)
63
{
64
if
(
in_atomic
() || in_dbg_master() || irqs_disabled())
65
return
false
;
66
return
true
;
67
}
68
69
#endif
interrupt.h
kgdb.h
preempt.h
in_atomic
#define in_atomic()
Definition
preempt.h:184
smp.h
util_macros.h
Generated by
1.9.8