Rob Clark | 10a02eb | 2013-11-30 14:58:23 -0500 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2013 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 __MDP_KMS_H__ |
| 19 | #define __MDP_KMS_H__ |
| 20 | |
| 21 | #include <linux/clk.h> |
| 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/regulator/consumer.h> |
| 24 | |
| 25 | #include "msm_drv.h" |
| 26 | #include "mdp_common.xml.h" |
| 27 | |
| 28 | struct mdp_format { |
| 29 | struct msm_format base; |
| 30 | enum mdp_bpc bpc_r, bpc_g, bpc_b; |
| 31 | enum mdp_bpc_alpha bpc_a; |
| 32 | uint8_t unpack[4]; |
| 33 | bool alpha_enable, unpack_tight; |
| 34 | uint8_t cpp, unpack_count; |
| 35 | }; |
| 36 | #define to_mdp_format(x) container_of(x, struct mdp_format, base) |
| 37 | |
| 38 | |
| 39 | uint32_t mdp_get_formats(uint32_t *formats, uint32_t max_formats); |
| 40 | const struct msm_format *mdp_get_format(struct msm_kms *kms, uint32_t format); |
| 41 | |
| 42 | #endif /* __MDP_KMS_H__ */ |