1 /*
2 * SGX display class driver platform resources
3 *
4 * Copyright (C) 2012 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
21 #ifndef _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H
22 #define _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H
24 enum sgx_omaplfb_flags {
25 /*
26 * This flag should be set when we do not want the primary display
27 * swap chain buffers to be used with an external display.
28 *
29 * The number of tiler2d and vram buffers need to be set appropriately
30 */
31 SGX_OMAPLFB_FLAGS_SDMA_TO_TILER2D_EXTERNAL = 0x00000001,
32 };
34 /*
35 * The settings this platform data entry will determine the type and number of
36 * buffers to use by omaplfb.
37 */
38 struct sgx_omaplfb_config {
39 /*
40 * Number of tiler2d buffers required for display rendering,
41 * the number of buffers indicated by swap_chain_length will be used
42 * for the swap chain unless flags indicate otherwise
43 */
44 u32 tiler2d_buffers;
45 /*
46 * Number of vram buffers required for display rendering, if no tiler
47 * buffers are required or flags indicate then the number of buffers
48 * indicated by swap_chain_length will be used for the swap chain.
49 */
50 u32 vram_buffers;
51 /*
52 * Indicate any additional vram that needs to be reserved
53 */
54 u32 vram_reserve;
55 /*
56 * Tells omaplfb the number of buffers in the primary swapchain,
57 * if not set it defaults to 2.
58 */
59 u32 swap_chain_length;
60 enum sgx_omaplfb_flags flags;
61 };
63 struct sgx_omaplfb_platform_data {
64 u32 num_configs;
65 struct sgx_omaplfb_config *configs;
66 };
68 int sgx_omaplfb_set(unsigned int fbix, struct sgx_omaplfb_config *data);
69 struct sgx_omaplfb_config *sgx_omaplfb_get(unsigned int fbix);
71 #endif