]>
Commit | Line | Data |
---|---|---|
c056b55d RC |
1 | /* |
2 | * Copyright (C) 2016 Red Hat | |
3 | * Author: Rob Clark <robdclark@gmail.com> | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU General Public License version 2 as published by | |
7 | * the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along with | |
15 | * this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | */ | |
17 | ||
18 | #ifndef __MDP5_PIPE_H__ | |
19 | #define __MDP5_PIPE_H__ | |
20 | ||
87878d26 AT |
21 | /* TODO: Add SSPP_MAX in mdp5.xml.h */ |
22 | #define SSPP_MAX (SSPP_CURSOR1 + 1) | |
c056b55d RC |
23 | |
24 | /* represents a hw pipe, which is dynamically assigned to a plane */ | |
25 | struct mdp5_hw_pipe { | |
26 | int idx; | |
27 | ||
28 | const char *name; | |
29 | enum mdp5_pipe pipe; | |
30 | ||
c056b55d RC |
31 | uint32_t reg_offset; |
32 | uint32_t caps; | |
33 | ||
34 | uint32_t flush_mask; /* used to commit pipe registers */ | |
49ec5b2e RC |
35 | |
36 | /* number of smp blocks per plane, ie: | |
37 | * nblks_y | (nblks_u << 8) | (nblks_v << 16) | |
38 | */ | |
39 | uint32_t blkcfg; | |
c056b55d RC |
40 | }; |
41 | ||
4a0f012d RC |
42 | /* global atomic state of assignment between pipes and planes: */ |
43 | struct mdp5_hw_pipe_state { | |
44 | struct drm_plane *hwpipe_to_plane[SSPP_MAX]; | |
45 | }; | |
46 | ||
47 | struct mdp5_hw_pipe *__must_check | |
48 | mdp5_pipe_assign(struct drm_atomic_state *s, struct drm_plane *plane, | |
49ec5b2e | 49 | uint32_t caps, uint32_t blkcfg); |
4a0f012d RC |
50 | void mdp5_pipe_release(struct drm_atomic_state *s, struct mdp5_hw_pipe *hwpipe); |
51 | ||
c056b55d RC |
52 | struct mdp5_hw_pipe *mdp5_pipe_init(enum mdp5_pipe pipe, |
53 | uint32_t reg_offset, uint32_t caps); | |
54 | void mdp5_pipe_destroy(struct mdp5_hw_pipe *hwpipe); | |
55 | ||
56 | #endif /* __MDP5_PIPE_H__ */ |