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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
/* Copyright (c) 2015-2016, 2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 _SDE_HW_DSPP_H
#define _SDE_HW_DSPP_H
struct sde_hw_dspp;
/**
* struct sde_hw_dspp_ops - interface to the dspp hardware driver functions
* Caller must call the init function to get the dspp context for each dspp
* Assumption is these functions will be called after clocks are enabled
*/
struct sde_hw_dspp_ops {
/**
* setup_histogram - setup dspp histogram
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_histogram)(struct sde_hw_dspp *ctx, void *cfg);
/**
* read_histogram - read dspp histogram
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*read_histogram)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_igc - update dspp igc
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_igc)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_pa - setup dspp pa
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_pa)(struct sde_hw_dspp *dspp, void *cfg);
/**
* setup_pcc - setup dspp pcc
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_pcc)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_sharpening - setup dspp sharpening
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_sharpening)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_pa_memcolor - setup dspp memcolor
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_pa_memcolor)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_sixzone - setup dspp six zone
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_sixzone)(struct sde_hw_dspp *dspp, void *cfg);
/**
* setup_danger_safe - setup danger safe LUTS
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_danger_safe)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_dither - setup dspp dither
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_dither)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_cont - setup dspp PA hsic
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_pa_hsic)(struct sde_hw_dspp *dspp, void *cfg);
/**
* setup_vlut - setup dspp PA VLUT
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_vlut)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_gc - update dspp gc
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_gc)(struct sde_hw_dspp *ctx, void *cfg);
/**
* setup_gamut - update dspp gamut
* @ctx: Pointer to dspp context
* @cfg: Pointer to configuration
*/
void (*setup_gamut)(struct sde_hw_dspp *ctx, void *cfg);
};
/**
* struct sde_hw_dspp - dspp description
* @base_off: MDP register mapped offset
* @blk_off: DSPP offset relative to mdss offset
* @length Length of register block offset
* @hwversion Mdss hw version number
* @idx: DSPP index
* @dspp_hw_cap: Pointer to layer_cfg
* @highest_bank_bit:
* @ops: Pointer to operations possible for this dspp
*/
struct sde_hw_dspp {
/* base */
struct sde_hw_blk_reg_map hw;
/* dspp */
enum sde_dspp idx;
const struct sde_dspp_cfg *cap;
/* Ops */
struct sde_hw_dspp_ops ops;
};
/**
* sde_hw_dspp_init - initializes the dspp hw driver object.
* should be called once before accessing every dspp.
* @idx: DSPP index for which driver object is required
* @addr: Mapped register io address of MDP
*/
struct sde_hw_dspp *sde_hw_dspp_init(enum sde_dspp idx,
void __iomem *addr,
struct sde_mdss_cfg *m);
/**
* sde_hw_dspp_destroy(): Destroys DSPP driver context
* @dspp: Pointer to DSPP driver context
*/
void sde_hw_dspp_destroy(struct sde_hw_dspp *dspp);
#endif /*_SDE_HW_DSPP_H */
|