Repository navigation
Expand file tree
/
Copy pathdisplay_support.h
More file actions
110 lines (82 loc) · 2.88 KB
/
Copy pathdisplay_support.h
File metadata and controls
110 lines (82 loc) · 2.88 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
* Copyright 2019-2021, 2023 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _DISPLAY_SUPPORT_H_
#define _DISPLAY_SUPPORT_H_
#include "fsl_dc_fb.h"
/*******************************************************************************
* Definitions
******************************************************************************/
/* @TEST_ANCHOR */
#define DEMO_PANEL_RK055AHD091 0 /* 720 * 1280, RK055AHD091-CTG(RK055HDMIPI4M) */
#define DEMO_PANEL_RK055IQH091 1 /* 540 * 960, RK055IQH091-CTG */
#define DEMO_PANEL_RK055MHD091 2 /* 720 * 1280, RK055MHD091A0-CTG(RK055HDMIPI4MA0) */
#define DEMO_DISPLAY_CONTROLLER_ELCDIF 0
#define DEMO_DISPLAY_CONTROLLER_LCDIFV2 1
#ifndef DEMO_PANEL
#define DEMO_PANEL DEMO_PANEL_RK055AHD091
#endif
#ifndef DEMO_DISPLAY_CONTROLLER
/* Use LCDIFV2 by default, could use ELCDIF by changing this macro. */
#define DEMO_DISPLAY_CONTROLLER DEMO_DISPLAY_CONTROLLER_LCDIFV2
#endif
#define DEMO_BUFFER_FIXED_ADDRESS 0
#if DEMO_BUFFER_FIXED_ADDRESS
#define DEMO_BUFFER0_ADDR 0x80000000
#define DEMO_BUFFER1_ADDR 0x80200000
#endif
/*
* Use the MIPI dumb panel
*/
/* Definitions for the frame buffer. */
#define DEMO_BUFFER_COUNT 2 /* 2 is enough for DPI interface display. */
#ifndef DEMO_USE_XRGB8888
#define DEMO_USE_XRGB8888 0
#endif
/* Use LCDIF LUT (or named color palette) which is 8-bit per-pixel */
#ifndef DEMO_USE_LUT8
#define DEMO_USE_LUT8 0
#endif
#if DEMO_USE_XRGB8888
#define DEMO_BUFFER_PIXEL_FORMAT kVIDEO_PixelFormatXRGB8888
#define DEMO_BUFFER_BYTE_PER_PIXEL 4
#elif DEMO_USE_LUT8
#define DEMO_BUFFER_PIXEL_FORMAT kVIDEO_PixelFormatLUT8
#define DEMO_BUFFER_BYTE_PER_PIXEL 1
#else
#define DEMO_BUFFER_PIXEL_FORMAT kVIDEO_PixelFormatRGB565
#define DEMO_BUFFER_BYTE_PER_PIXEL 2
#endif
#if ((DEMO_PANEL_RK055AHD091 == DEMO_PANEL) || (DEMO_PANEL_RK055MHD091 == DEMO_PANEL))
#define DEMO_PANEL_WIDTH (720)
#define DEMO_PANEL_HEIGHT (1280)
#elif (DEMO_PANEL_RK055IQH091 == DEMO_PANEL)
#define DEMO_PANEL_WIDTH (540)
#define DEMO_PANEL_HEIGHT (960)
#endif
#define DEMO_BUFFER_WIDTH DEMO_PANEL_WIDTH
#define DEMO_BUFFER_HEIGHT DEMO_PANEL_HEIGHT
/* Where the frame buffer is shown in the screen. */
#define DEMO_BUFFER_START_X 0U
#define DEMO_BUFFER_START_Y 0U
#define DEMO_BUFFER_STRIDE_BYTE (DEMO_BUFFER_WIDTH * DEMO_BUFFER_BYTE_PER_PIXEL)
/* There is not frame buffer aligned requirement, consider the 64-bit AXI data
* bus width and 32-byte cache line size, the frame buffer alignment is set to
* 32 byte.
*/
#define FRAME_BUFFER_ALIGN 32
extern const dc_fb_t g_dc;
/*******************************************************************************
* API
******************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
status_t BOARD_PrepareDisplayController(void);
#if defined(__cplusplus)
}
#endif /* __cplusplus */
#endif /* _DISPLAY_SUPPORT_H_ */