1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2016 Red Hat
4 * Author: Rob Clark <robdclark@gmail.com>
7 #ifndef __MDP5_PIPE_H__
8 #define __MDP5_PIPE_H__
10 /* TODO: Add SSPP_MAX in mdp5.xml.h */
11 #define SSPP_MAX (SSPP_CURSOR1 + 1)
13 /* represents a hw pipe, which is dynamically assigned to a plane */
23 uint32_t flush_mask
; /* used to commit pipe registers */
25 /* number of smp blocks per plane, ie:
26 * nblks_y | (nblks_u << 8) | (nblks_v << 16)
31 /* global atomic state of assignment between pipes and planes: */
32 struct mdp5_hw_pipe_state
{
33 struct drm_plane
*hwpipe_to_plane
[SSPP_MAX
];
36 int mdp5_pipe_assign(struct drm_atomic_state
*s
, struct drm_plane
*plane
,
37 uint32_t caps
, uint32_t blkcfg
,
38 struct mdp5_hw_pipe
**hwpipe
,
39 struct mdp5_hw_pipe
**r_hwpipe
);
40 void mdp5_pipe_release(struct drm_atomic_state
*s
, struct mdp5_hw_pipe
*hwpipe
);
42 struct mdp5_hw_pipe
*mdp5_pipe_init(enum mdp5_pipe pipe
,
43 uint32_t reg_offset
, uint32_t caps
);
44 void mdp5_pipe_destroy(struct mdp5_hw_pipe
*hwpipe
);
46 #endif /* __MDP5_PIPE_H__ */