blob: e04564347bdfe16c450c138bf6dfe8be2f118d2d [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* drivers/video/msm/mdp_ppp.h
2 *
3 * Copyright (C) 2009 Google Incorporated
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef _VIDEO_MSM_MDP_PPP_H_
16#define _VIDEO_MSM_MDP_PPP_H_
17
18#include <linux/types.h>
19
20struct ppp_regs {
21 uint32_t src0;
22 uint32_t src1;
23 uint32_t dst0;
24 uint32_t dst1;
25 uint32_t src_cfg;
26 uint32_t dst_cfg;
27 uint32_t src_pack;
28 uint32_t dst_pack;
29 uint32_t src_rect;
30 uint32_t dst_rect;
31 uint32_t src_ystride;
32 uint32_t dst_ystride;
33 uint32_t op;
34 uint32_t src_bpp;
35 uint32_t dst_bpp;
36 uint32_t edge;
37 uint32_t phasex_init;
38 uint32_t phasey_init;
39 uint32_t phasex_step;
40 uint32_t phasey_step;
41
42 uint32_t bg0;
43 uint32_t bg1;
44 uint32_t bg_cfg;
45 uint32_t bg_bpp;
46 uint32_t bg_pack;
47 uint32_t bg_ystride;
48
49#ifdef CONFIG_MSM_MDP31
50 uint32_t src_xy;
51 uint32_t src_img_sz;
52 uint32_t dst_xy;
53 uint32_t bg_xy;
54 uint32_t bg_img_sz;
55 uint32_t bg_alpha_sel;
56
57 uint32_t scale_cfg;
58 uint32_t csc_cfg;
59#endif
60};
61
62struct mdp_info;
63struct mdp_rect;
64struct mdp_blit_req;
65
66void mdp_ppp_init_scale(const struct mdp_info *mdp);
67int mdp_ppp_cfg_scale(const struct mdp_info *mdp, struct ppp_regs *regs,
68 struct mdp_rect *src_rect, struct mdp_rect *dst_rect,
69 uint32_t src_format, uint32_t dst_format);
70int mdp_ppp_load_blur(const struct mdp_info *mdp);
71
72#ifndef CONFIG_MSM_MDP31
73int mdp_ppp_cfg_edge_cond(struct mdp_blit_req *req, struct ppp_regs *regs);
74#else
75static inline int mdp_ppp_cfg_edge_cond(struct mdp_blit_req *req,
76 struct ppp_regs *regs)
77{
78 return 0;
79}
80#endif
81
82#endif /* _VIDEO_MSM_MDP_PPP_H_ */