aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/sgx_omaplfb.h
blob: 66d59b2d7a5aed3c46e843b5d9ecb534b6170e8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * SGX display class driver platform resources
 *
 * Copyright (C) 2012 Texas Instruments
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H
#define _ARCH_ARM_PLAT_OMAP_SGX_OMAPLFB_H

enum sgx_omaplfb_flags {
	/*
	 * This flag should be set when we do not want the primary display
	 * swap chain buffers to be used with an external display.
	 *
	 * The number of tiler2d and vram buffers need to be set appropriately
	 */
	SGX_OMAPLFB_FLAGS_SDMA_TO_TILER2D_EXTERNAL = 0x00000001,
};

/*
 * The settings this platform data entry will determine the type and number of
 * buffers to use by omaplfb.
 */
struct sgx_omaplfb_config {
	/*
	 * Number of tiler2d buffers required for display rendering,
	 * the number of buffers indicated by swap_chain_length will be used
	 * for the swap chain unless flags indicate otherwise
	 */
	u32 tiler2d_buffers;
	/*
	 * Number of vram buffers required for display rendering, if no tiler
	 * buffers are required or flags indicate then the number of buffers
	 * indicated by swap_chain_length will be used for the swap chain.
	 */
	u32 vram_buffers;
	/*
	 * Indicate any additional vram that needs to be reserved
	 */
	u32 vram_reserve;
	/*
	 * Tells omaplfb the number of buffers in the primary swapchain,
	 * if not set it defaults to 2.
	 */
	u32 swap_chain_length;
	enum sgx_omaplfb_flags flags;
};

struct sgx_omaplfb_platform_data {
	u32 num_configs;
	struct sgx_omaplfb_config *configs;
};

int sgx_omaplfb_set(unsigned int fbix, struct sgx_omaplfb_config *data);
struct sgx_omaplfb_config *sgx_omaplfb_get(unsigned int fbix);

#endif