NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
wfdext.h
Go to the documentation of this file.
1 /* Copyright (c) 2009 The Khronos Group Inc.
2  * Copyright (c) 2020-2024, NVIDIA CORPORATION.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and/or associated documentation files (the
6  * "Materials"), to deal in the Materials without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Materials, and to
9  * permit persons to whom the Materials are furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Materials.
14  *
15  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22  */
23 
32 #ifndef WFDEXT_H_
33 #define WFDEXT_H_
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 
40 #define WFD_VENDOR_INDEX (0)
41 #define WFD_RENDERER_INDEX (1)
42 #define WFD_VERSION_INDEX (2)
43 
44 #define WFD_PORT_PERMISSIBLE_LATENCY_MS_NV 0x7635
45 
46 #ifdef WFD_WFDEXT_PROTOTYPES
47 WFD_API_CALL void WFD_APIENTRY
48  wfdBindSourceToPipelineWithTimestampNV(const WFDDevice device,
49  const WFDPipeline pipeline,
50  const WFDSource source,
52  const WFDRect *const region,
53  const WFDuint64 timestamp);
54 #endif /* WFD_WFDEXT_PROTOTYPES */
55 
56 typedef void (WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV) (const WFDDevice device,
60  const WFDRect *const region,
61  const WFDuint64 timestamp);
62 
63 #ifdef WFD_WFDEXT_PROTOTYPES
64 WFD_API_CALL WFDErrorCode WFD_APIENTRY
65  wfdDeviceSetSafeStateNV(const WFDDevice device);
66 #endif /* WFD_WFDEXT_PROTOTYPES */
67 
68 typedef void (WFD_APIENTRY PFNWFDDEVICESETSAFESTATENV) (const WFDDevice device);
69 
70 struct NvSciBufObjRefRec;
71 typedef struct NvSciBufObjRefRec* NvSciBufObj;
72 struct NvSciBufAttrListRec;
73 typedef struct NvSciBufAttrListRec* NvSciBufAttrList;
74 #ifdef WFD_WFDEXT_PROTOTYPES
75 WFD_API_CALL WFDSource WFD_APIENTRY
76  wfdCreateSourceFromNvSciBufNVX(const WFDDevice device, const WFDPipeline pipeline,
77  NvSciBufObj *const bufObj);
78 WFD_API_CALL WFDErrorCode WFD_APIENTRY
79  wfdNvSciBufSetDisplayAttributesNVX(NvSciBufAttrList *const attrList);
80 #endif /* WFD_WFDEXT_PROTOTYPES */
81 typedef WFDSource (WFD_APIENTRY PFNWFDCREATESOURCEFROMNVSCIBUFNVX) (const WFDDevice device,
83 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCIBUFSETDISPLAYATTRIBUTESNVX) (NvSciBufAttrList *const attrList);
84 
85 struct NvSciSyncObjRec;
86 typedef struct NvSciSyncObjRec* NvSciSyncObj;
87 struct NvSciSyncAttrListRec;
88 typedef struct NvSciSyncAttrListRec* NvSciSyncAttrList;
90 #ifdef WFD_WFDEXT_PROTOTYPES
91 WFD_API_CALL WFDErrorCode WFD_APIENTRY
92  wfdNvSciSyncSetWaiterAttributesNVX(const NvSciSyncAttrList *const attrList);
93 
94 WFD_API_CALL WFDErrorCode WFD_APIENTRY
95  wfdNvSciSyncSetSignalerAttributesNVX(const NvSciSyncAttrList *const attrList);
96 
97 WFD_API_CALL WFDErrorCode WFD_APIENTRY
98  wfdBindNvSciSyncFenceToSourceNVX(const WFDDevice device, const WFDSource source,
99  const NvSciSyncFence *const fence);
100 
101 WFD_API_CALL WFDErrorCode WFD_APIENTRY
102  wfdRegisterPostFlipNvSciSyncObjNVX(const WFDDevice device, const NvSciSyncObj *const obj);
103 
104 WFD_API_CALL void WFD_APIENTRY
105  wfdDeviceCommitWithNvSciSyncFenceNVX(const WFDDevice device,
106  const WFDCommitType type,
107  const WFDHandle handle,
108  NvSciSyncFence *const fence);
109 #endif /* WFD_WFDEXT_PROTOTYPES */
110 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCISYNCSETSIGNALERATTRIBUTESNVX)
111  (NvSciSyncAttrList *const attrList);
112 
113 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCISYNCSETWAITERATTRIBUTESNVX)
114  (NvSciSyncAttrList *const attrList);
115 
116 typedef WFDErrorCode (WFD_APIENTRY PFNWFDBINDNVSCISYNCFENCETOSOURCENVX)
117  (const WFDDevice device, const WFDSource source, const NvSciSyncFence *const fence);
118 
119 typedef WFDErrorCode (WFD_APIENTRY PFNWFDREGISTERPOSTFLIPNVSCISYNCOBJNVX)
120  (const WFDDevice device, const NvSciSyncObj *const obj);
121 
122 typedef void (WFD_APIENTRY PFNWFDDEVICECOMMITWITHNVSCISYNCFENCENVX)
123  (const WFDDevice device, const WFDCommitType type,
124  const WFDHandle handle, NvSciSyncFence *const fence);
125 
126 #define WFD_PIPELINE_COMMIT_NON_BLOCKING_NVX 0x7730
127 
128 #define WFD_PORT_MODE_H_TOTAL_NVX 0x7608
129 #define WFD_PORT_MODE_V_TOTAL_NVX 0x7609
130 
131 #define WFD_PORT_DETECT_FROZEN_FRAME_NV 0x7636
132 
133 #ifdef NV_STANDARD_BUILD
134 
135 struct NvRmSurfaceRec;
136 typedef struct NvRmSurfaceRec NvRmSurface;
137 
138 #ifdef WFD_WFDEXT_PROTOTYPES
139 WFD_API_CALL WFDSource WFD_APIENTRY
140  wfdCreateSourceFromNvRmSurfaceNVX(const WFDDevice device, const WFDPipeline pipeline,
141  const WFDint numSurfaces, const NvRmSurface *const surfaces);
142 #endif /* WFD_WFDEXT_PROTOTYPES */
143 
144 typedef WFDSource (WFD_APIENTRY PFNWFDCREATESOURCEFROMNVRMSURFACENVX) (const WFDDevice device,
145  const WFDPipeline pipeline, const WFDint numSurfaces, const NvRmSurface *const surfaces);
146 
147 struct NvRmFenceRec;
148 typedef struct NvRmFenceRec NvRmFence;
149 
150 #ifdef WFD_WFDEXT_PROTOTYPES
151 WFD_API_CALL WFDErrorCode WFD_APIENTRY
152  wfdBindNvRmFenceToSourceNVX(const WFDDevice device, const WFDSource source,
153  const NvRmFence *const fence);
154 
155 WFD_API_CALL void WFD_APIENTRY
156  wfdDeviceCommitWithNvRmFenceNVX(const WFDDevice device,
157  const WFDCommitType type,
158  const WFDHandle handle,
159  NvRmFence *const fence);
160 #endif /* WFD_WFDEXT_PROTOTYPES */
161 
162 typedef WFDErrorCode (WFD_APIENTRY PFNWFDBINDNVRMFENCETOSOURCENVX) (const WFDDevice device,
163  const WFDSource source, const NvRmFence *const fence);
164 typedef void (WFD_APIENTRY PFNWFDDEVICECOMMITWITHNVRMFENCENVX) (const WFDDevice device,
165  const WFDCommitType type, const WFDHandle handle, NvRmFence *const fence);
166 
167 #if defined(__QNX__)
168 #define WFD_PORT_CBABC_MODE_QNX 0x7670
169 typedef enum
170 { WFD_PORT_CBABC_MODE_NONE_QNX = 0x7671,
171  WFD_PORT_CBABC_MODE_VIDEO_QNX = 0x7672,
172  WFD_PORT_CBABC_MODE_UI_QNX = 0x7673,
173  WFD_PORT_CBABC_MODE_PHOTO_QNX = 0x7674,
174  WFD_PORT_CBABC_MODE_32BIT_QNX = 0x7FFFFFFF
175 } WFDPortCBABCModeQNX;
176 
177 #define WFD_PIPELINE_BRIGHTNESS_QNX 0x7750
178 #define WFD_PIPELINE_CONTRAST_QNX 0x7751
179 #define WFD_PIPELINE_HUE_QNX 0x7752
180 #define WFD_PIPELINE_SATURATION_QNX 0x7753
181 
182 #define WFD_PORT_MODE_ASPECT_RATIO_QNX 0x7606
183 #define WFD_PORT_MODE_PREFERRED_QNX 0x7607
184 
185 #ifdef WFD_WFDEXT_PROTOTYPES
186 WFD_API_CALL WFDErrorCode WFD_APIENTRY
187  wfdReadPixelsFromSourceQNX(WFDDevice device, WFDSource source, WFDint x, WFDint y,
188  WFDint width, WFDint height, WFDint format, void *data);
189 #endif /* WFD_WFDEXT_PROTOTYPES */
190 typedef WFDErrorCode (WFD_APIENTRY PFNWFDREADPIXELSFROMSOURCEQNX) (WFDDevice device, WFDSource source,
191  WFDint x, WFDint y, WFDint width,
192  WFDint height, WFDint format, void *data);
193 
194 #define WFD_USAGE_DISPLAY_QNX (1 << 0)
195 #define WFD_USAGE_READ_QNX (1 << 1)
196 #define WFD_USAGE_WRITE_QNX (1 << 2)
197 #define WFD_USAGE_NATIVE_QNX (1 << 3)
198 #define WFD_USAGE_OPENGL_ES1_QNX (1 << 4)
199 #define WFD_USAGE_OPENGL_ES2_QNX (1 << 5)
200 #define WFD_USAGE_OPENGL_ES3_QNX (1 << 11)
201 #define WFD_USAGE_OPENVG_QNX (1 << 6)
202 #define WFD_USAGE_VIDEO_QNX (1 << 7)
203 #define WFD_USAGE_CAPTURE_QNX (1 << 8)
204 #define WFD_USAGE_ROTATION_QNX (1 << 9)
205 #define WFD_USAGE_OVERLAY_QNX (1 << 10)
206 #define WFD_USAGE_WRITEBACK_QNX (1 << 31)
207 #define WFD_FORMAT_BYTE_QNX 1
208 #define WFD_FORMAT_RGBA4444_QNX 2
209 #define WFD_FORMAT_RGBX4444_QNX 3
210 #define WFD_FORMAT_RGBA5551_QNX 4
211 #define WFD_FORMAT_RGBX5551_QNX 5
212 #define WFD_FORMAT_RGB565_QNX 6
213 #define WFD_FORMAT_RGB888_QNX 7
214 #define WFD_FORMAT_RGBA8888_QNX 8
215 #define WFD_FORMAT_RGBX8888_QNX 9
216 #define WFD_FORMAT_YVU9_QNX 10
217 #define WFD_FORMAT_YUV420_QNX 11
218 #define WFD_FORMAT_NV12_QNX 12
219 #define WFD_FORMAT_YV12_QNX 13
220 #define WFD_FORMAT_UYVY_QNX 14
221 #define WFD_FORMAT_YUY2_QNX 15
222 #define WFD_FORMAT_YVYU_QNX 16
223 #define WFD_FORMAT_V422_QNX 17
224 #define WFD_FORMAT_AYUV_QNX 18
225 #define WFD_FORMAT_NV12_QC_SUPERTILE ((1 << 16) | WFD_FORMAT_NV12_QNX)
226 #define WFD_FORMAT_NV12_QC_32M4KA ((2 << 16) | WFD_FORMAT_NV12_QNX)
227 #ifdef WFD_WFDEXT_PROTOTYPES
228 WFD_API_CALL WFDErrorCode WFD_APIENTRY
229  wfdCreateWFDEGLImagesQNX(WFDDevice device, WFDint width, WFDint height, WFDint format, WFDint usage, WFDint count, WFDEGLImage *images);
230 WFD_API_CALL WFDErrorCode WFD_APIENTRY
231  wfdDestroyWFDEGLImagesQNX(WFDDevice device, WFDint count, WFDEGLImage *images);
232 #endif /* WFD_WFDEXT_PROTOTYPES */
233 typedef WFDErrorCode (WFD_APIENTRY PFNWFDCREATEWFDEGLIMAGESQNX) (WFDDevice device, WFDint width, WFDint height, WFDint usage, WFDint count, WFDEGLImage *images);
234 typedef WFDErrorCode (WFD_APIENTRY PFNWFDDESTROYWFDEGLIMAGESQNX) (WFDDevice device, WFDint count, WFDEGLImage *images);
235 
236 #endif // defined(__QNX__)
237 #endif /* !NV_STANDARAD_BUILD */
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 
244 #endif /* WFDEXT_H_ */
WFDSource
typedef WFDSource(WFD_APIENTRY PFNWFDCREATESOURCEFROMNVSCIBUFNVX)(const WFDDevice device
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
Definition: wfdext.h:86
region
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const region
Definition: wfdext.h:60
WFDSource
WFDHandle WFDSource
Definition: wfd.h:78
WFDTransition
WFDTransition
Definition: wfd.h:295
bufObj
const WFDPipeline NvSciBufObj *const bufObj
Definition: wfdext.h:82
WFDPipeline
WFDHandle WFDPipeline
Definition: wfd.h:77
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:61
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
Definition: wfdext.h:71
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
Definition: wfdext.h:73
handle
const WFDCommitType const WFDHandle handle
Definition: wfdext.h:124
WFDErrorCode
typedef WFDErrorCode(WFD_APIENTRY PFNWFDNVSCIBUFSETDISPLAYATTRIBUTESNVX)(NvSciBufAttrList *const attrList)
fence
const WFDSource const NvSciSyncFence *const fence
Definition: wfdext.h:117
source
const WFDPipeline const WFDSource source
Definition: wfdext.h:58
WFDDevice
WFDHandle WFDDevice
Definition: wfd.h:74
WFDErrorCode
WFDErrorCode
Definition: wfd.h:93
transition
const WFDPipeline const WFDSource const WFDTransition transition
Definition: wfdext.h:59
WFDCommitType
WFDCommitType
Definition: wfd.h:112
void
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
WFDRect
Definition: wfd.h:302
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:256
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
Definition: wfdext.h:88
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
pipeline
const WFDPipeline pipeline
Definition: wfdext.h:57
type
const WFDCommitType type
Definition: wfdext.h:123