hc
2023-02-18 84d1d1bed0120e0921c876885ca9006fb9ddf42e
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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 __SOC_ROCKCHIP_DMC_H
#define __SOC_ROCKCHIP_DMC_H
 
#include <linux/devfreq.h>
 
/* for lcdc_type */
#define SCREEN_NULL        0
#define SCREEN_RGB        1
#define SCREEN_LVDS        2
#define SCREEN_DUAL_LVDS    3
#define SCREEN_MCU        4
#define SCREEN_TVOUT        5
#define SCREEN_HDMI        6
#define SCREEN_MIPI        7
#define SCREEN_DUAL_MIPI    8
#define SCREEN_EDP        9
#define SCREEN_TVOUT_TEST    10
#define SCREEN_LVDS_10BIT    11
#define SCREEN_DUAL_LVDS_10BIT    12
#define SCREEN_DP        13
 
#ifdef CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ
void rockchip_dmcfreq_lock(void);
void rockchip_dmcfreq_lock_nested(void);
void rockchip_dmcfreq_unlock(void);
int rockchip_dmcfreq_wait_complete(void);
int rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq,
                      unsigned int bw_mbyte);
void rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq,
                      unsigned int line_bw_mbyte,
                      unsigned int frame_bw_mbyte,
                      unsigned int plane_num);
#else
static inline void rockchip_dmcfreq_lock(void)
{
}
 
static inline void rockchip_dmcfreq_lock_nested(void)
{
}
 
static inline void rockchip_dmcfreq_unlock(void)
{
}
 
static inline int rockchip_dmcfreq_wait_complete(void)
{
   return 0;
}
 
static inline int
rockchip_dmcfreq_vop_bandwidth_request(struct devfreq *devfreq,
                      unsigned int bw_mbyte)
{
   return 0;
}
 
static inline void
rockchip_dmcfreq_vop_bandwidth_update(struct devfreq *devfreq,
                     unsigned int line_bw_mbyte,
                     unsigned int frame_bw_mbyte,
                     unsigned int plane_num)
{
}
#endif
 
#endif