1 /*
2 * Copyright (c) Texas Instruments Incorporated 2018
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
34 /**
35 * \defgroup DRV_DSS_MODULE DSS Driver
36 *
37 * @{
38 *
39 * The Display Subsystem (DSS) provides the logic to interface display
40 * peripherals. This is DSS FVID2 driver documentation.
41 */
42 /* @} */
44 /**
45 * \ingroup DRV_DSS_MODULE
46 * \defgroup DSS_TOP_LEVEL DSS Driver Header
47 * This is DSS's top level include for applications
48 *
49 * @{
50 */
52 /**
53 * \file dss.h
54 *
55 * \brief DSS Driver API/interface file.
56 */
58 #ifndef DSS_H_
59 #define DSS_H_
61 /* ========================================================================== */
62 /* Include Files */
63 /* ========================================================================== */
65 #include <stdint.h>
66 #include <ti/csl/soc.h>
67 #include <ti/csl/csl_dss.h>
68 #include <ti/drv/fvid2/fvid2.h>
69 #include <ti/drv/dss/include/dss_cfg.h>
70 #include <ti/drv/dss/soc/dss_soc.h>
71 #include <ti/drv/dss/include/dss_disp.h>
72 #include <ti/drv/dss/include/dss_dctrl.h>
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
78 /* ========================================================================== */
79 /* Macros & Typedefs */
80 /* ========================================================================== */
82 /** \brief Display driver ID used at the time of FVID2 create. */
83 #define DSS_DISP_DRV_ID (FVID2_DSS_DRV_BASE + 0x00U)
85 /** \brief Display controller driver ID used at the time of FVID2 create. */
86 #define DSS_DCTRL_DRV_ID (FVID2_DSS_DRV_BASE + 0x01U)
88 /*
89 * IOCTLs Base address.
90 */
91 /** \brief IOCTL base address for the display driver IOCTLs. */
92 #define DSS_DISP_IOCTL_BASE (FVID2_DSS_DRV_IOCTL_BASE + 0x000U)
93 /** \brief IOCTL base address for the display controller driver IOCTLs. */
94 #define DSS_DCTRL_IOCTL_BASE (FVID2_DSS_DRV_IOCTL_BASE + 0x100U)
95 /** \brief IOCTL base address for the SOC specific display driver IOCTLs. */
96 #define DSS_DISP_SOC_IOCTL_BASE (DSS_DISP_IOCTL_BASE + 0x40U)
97 /** \brief IOCTL base address for the SOC specific display controller driver
98 * IOCTLs. */
99 #define DSS_DCTRL_SOC_IOCTL_BASE (DSS_DCTRL_IOCTL_BASE + 0x40U)
101 /* ========================================================================== */
102 /* Structure Declarations */
103 /* ========================================================================== */
105 /**
106 * \brief DSS initialization parameters.
107 */
108 typedef struct
109 {
110 Dss_SocParams socParams;
111 /**< SoC parameters. Refer #Dss_SocParams for details */
112 } Dss_InitParams;
114 /* ========================================================================== */
115 /* Internal/Private Function Declarations */
116 /* ========================================================================== */
118 /* None */
120 /* ========================================================================== */
121 /* Function Declarations */
122 /* ========================================================================== */
124 /**
125 * \brief Dss_InitParams structure init function.
126 *
127 * \param dssParams Pointer to #Dss_InitParams structure.
128 *
129 * \return None
130 */
131 void Dss_initParamsInit(Dss_InitParams *dssParams);
133 /**
134 * \brief DSS initialization function.
135 * This function initializes the DSS hardware and drivers.
136 * This function should be called before calling any driver APIs and
137 * only once.
138 *
139 * \param initParams Pointer to a #Dss_InitParams structure
140 * containing the DSS configuration
141 *
142 * \return FVID2_SOK if successful, else suitable error code
143 */
144 int32_t Dss_init(const Dss_InitParams *initParams);
146 /**
147 * \brief DSS de-initialization function.
148 * This function un-initializes the DSS hardware and drivers.
149 * This function should be called during system shutdown if Dss_init()
150 * was called by the application.
151 *
152 * \return FVID2_SOK if successful, else suitable error code
153 */
154 int32_t Dss_deInit(void);
156 /* ========================================================================== */
157 /* Static Function Definitions */
158 /* ========================================================================== */
160 /* None */
162 #ifdef __cplusplus
163 }
164 #endif
166 #endif /* #ifndef DSS_H_ */
168 /* @} */