Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/display/vic.h
1476 views
1
/*
2
* VIC driver for Tegra X1
3
*
4
* Copyright (c) 2018-2019 CTCaer
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms and conditions of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef _VIC_H_
20
#define _VIC_H_
21
22
#include <utils/types.h>
23
24
#define VIC_THI_SLCG_OVERRIDE_LOW_A 0x8C
25
26
typedef enum _vic_rotation_t
27
{
28
VIC_ROTATION_0 = 0,
29
VIC_ROTATION_90 = 1,
30
VIC_ROTATION_180 = 2,
31
VIC_ROTATION_270 = 3,
32
} vic_rotation_t;
33
34
typedef enum _vic_pix_format_t
35
{
36
VIC_PIX_FORMAT_L8 = 1, // 8-bit LUT.
37
VIC_PIX_FORMAT_X1B5G5R5 = 21, // 16-bit XBGR.
38
VIC_PIX_FORMAT_B5G5R5X1 = 23, // 16-bit BGRX.
39
40
VIC_PIX_FORMAT_A8B8G8R8 = 31, // 32-bit ABGR.
41
VIC_PIX_FORMAT_A8R8G8B8 = 32, // 32-bit ARGB.
42
VIC_PIX_FORMAT_B8G8R8A8 = 33, // 32-bit BGRA.
43
VIC_PIX_FORMAT_R8G8B8A8 = 34, // 32-bit RGBA.
44
45
VIC_PIX_FORMAT_X8B8G8R8 = 35, // 32-bit XBGR.
46
VIC_PIX_FORMAT_X8R8G8B8 = 36, // 32-bit XRGB.
47
VIC_PIX_FORMAT_B8G8R8X8 = 37, // 32-bit BGRX.
48
VIC_PIX_FORMAT_R8G8B8X8 = 38, // 32-bit RGBX.
49
} vic_pix_format_t;
50
51
typedef struct _vic_surface_t
52
{
53
u32 src_buf;
54
u32 dst_buf;
55
u32 width;
56
u32 height;
57
u32 pix_fmt;
58
u32 rotation;
59
} vic_surface_t;
60
61
void vic_set_surface(const vic_surface_t *sfc);
62
int vic_compose();
63
int vic_init();
64
void vic_end();
65
66
#endif
67
68