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
|
/* Copyright (c) 2015-2016, 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_WB_H
#define _SDE_HW_WB_H
#include "sde_hw_catalog.h"
#include "sde_hw_mdss.h"
#include "sde_hw_top.h"
#include "sde_hw_util.h"
struct sde_hw_wb;
struct sde_hw_wb_cfg {
struct sde_hw_fmt_layout dest;
enum sde_intf_mode intf_mode;
struct traffic_shaper_cfg ts_cfg;
struct sde_rect roi;
bool is_secure;
};
/**
*
* struct sde_hw_wb_ops : Interface to the wb Hw driver functions
* Assumption is these functions will be called after clocks are enabled
*/
struct sde_hw_wb_ops {
void (*setup_csc_data)(struct sde_hw_wb *ctx,
struct sde_csc_cfg *data);
void (*setup_outaddress)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_outformat)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_rotator)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_dither)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_cdwn)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_trafficshaper)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
void (*setup_roi)(struct sde_hw_wb *ctx,
struct sde_hw_wb_cfg *wb);
};
/**
* struct sde_hw_wb : WB driver object
* @struct sde_hw_blk_reg_map *hw;
* @idx
* @wb_hw_caps
* @ops
* @highest_bank_bit: GPU highest memory bank bit used
* @hw_mdp: MDP top level hardware block
*/
struct sde_hw_wb {
/* base */
struct sde_hw_blk_reg_map hw;
/* wb path */
int idx;
const struct sde_wb_cfg *caps;
/* ops */
struct sde_hw_wb_ops ops;
u32 highest_bank_bit;
struct sde_hw_mdp *hw_mdp;
};
/**
* sde_hw_wb_init(): Initializes and return writeback hw driver object.
* @idx: wb_path index for which driver object is required
* @addr: mapped register io address of MDP
* @m : pointer to mdss catalog data
* @hw_mdp: pointer to mdp top hw driver object
*/
struct sde_hw_wb *sde_hw_wb_init(enum sde_wb idx,
void __iomem *addr,
struct sde_mdss_cfg *m,
struct sde_hw_mdp *hw_mdp);
/**
* sde_hw_wb_destroy(): Destroy writeback hw driver object.
* @hw_wb: Pointer to writeback hw driver object
*/
void sde_hw_wb_destroy(struct sde_hw_wb *hw_wb);
#endif /*_SDE_HW_WB_H */
|