hc
2023-11-22 9ca5fbcb63a8dcaee0527f96afb91dc4b4bd8fa9
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
/*
 * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
 * Author: Yakir Yang <ykk@rock-chips.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * 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 __ROCKCHIP_DRM_PSR___
#define __ROCKCHIP_DRM_PSR___
 
#ifdef CONFIG_ROCKCHIP_PSR
void rockchip_drm_psr_flush_all(struct drm_device *dev);
 
int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder);
int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder);
 
int rockchip_drm_psr_register(struct drm_encoder *encoder,
           int (*psr_set)(struct drm_encoder *, bool enable));
void rockchip_drm_psr_unregister(struct drm_encoder *encoder);
#else
static inline void rockchip_drm_psr_flush_all(struct drm_device *dev)
{
}
 
static inline int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder)
{
   return 0;
}
 
static inline int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder)
{
   return 0;
}
 
static inline int rockchip_drm_psr_register(struct drm_encoder *encoder,
           int (*psr_set)(struct drm_encoder *, bool enable))
{
   return 0;
}
 
static inline void rockchip_drm_psr_unregister(struct drm_encoder *encoder)
{
}
#endif
 
#endif /* __ROCKCHIP_DRM_PSR__ */