NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
wfdext.h
Go to the documentation of this file.
1 /* Copyright (c) 2009 The Khronos Group Inc.
2  * Copyright (c) 2020-2026, 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 
100 WFD_API_CALL void WFD_APIENTRY
101  wfdBindSourceToPipelineWithTimestampNV(const WFDDevice device,
102  const WFDPipeline pipeline,
103  const WFDSource source,
104  const WFDTransition transition,
105  const WFDRect *const region,
106  const WFDuint64 timestamp);
107 #endif /* WFD_WFDEXT_PROTOTYPES */
108 
109 typedef void (WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV) (const WFDDevice device,
110  const WFDPipeline pipeline,
112  const WFDTransition transition,
113  const WFDRect *const region,
114  const WFDuint64 timestamp);
115 
125 struct NvSciBufObjRefRec;
126 typedef struct NvSciBufObjRefRec* NvSciBufObj;
127 
137 struct NvSciBufAttrListRec;
138 typedef struct NvSciBufAttrListRec* NvSciBufAttrList;
139 #ifdef WFD_WFDEXT_PROTOTYPES
140 
188 WFD_API_CALL WFDSource WFD_APIENTRY
189  wfdCreateSourceFromNvSciBufNVX(const WFDDevice device, const WFDPipeline pipeline,
190  NvSciBufObj *const bufObj);
232 WFD_API_CALL WFDErrorCode WFD_APIENTRY
233  wfdNvSciBufSetDisplayAttributesNVX(NvSciBufAttrList *const attrList);
234 #endif /* WFD_WFDEXT_PROTOTYPES */
235 typedef WFDSource (WFD_APIENTRY PFNWFDCREATESOURCEFROMNVSCIBUFNVX) (const WFDDevice device,
236  const WFDPipeline pipeline, NvSciBufObj *const bufObj);
237 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCIBUFSETDISPLAYATTRIBUTESNVX) (NvSciBufAttrList *const attrList);
238 
248 struct NvSciSyncObjRec;
249 typedef struct NvSciSyncObjRec* NvSciSyncObj;
250 
260 struct NvSciSyncAttrListRec;
261 typedef struct NvSciSyncAttrListRec* NvSciSyncAttrList;
262 
272 #ifdef WFD_WFDEXT_PROTOTYPES
273 
311 WFD_API_CALL WFDErrorCode WFD_APIENTRY
312  wfdNvSciSyncSetWaiterAttributesNVX(const NvSciSyncAttrList *const attrList);
313 
353 WFD_API_CALL WFDErrorCode WFD_APIENTRY
354  wfdNvSciSyncSetSignalerAttributesNVX(const NvSciSyncAttrList *const attrList);
355 
400 WFD_API_CALL WFDErrorCode WFD_APIENTRY
401  wfdBindNvSciSyncFenceToSourceNVX(const WFDDevice device, const WFDSource source,
402  const NvSciSyncFence *const fence);
403 
455 WFD_API_CALL WFDErrorCode WFD_APIENTRY
456  wfdRegisterPostFlipNvSciSyncObjNVX(const WFDDevice device, const NvSciSyncObj *const obj);
457 
512 WFD_API_CALL void WFD_APIENTRY
513  wfdDeviceCommitWithNvSciSyncFenceNVX(const WFDDevice device,
514  const WFDCommitType type,
515  const WFDHandle handle,
516  NvSciSyncFence *const fence);
517 #endif /* WFD_WFDEXT_PROTOTYPES */
518 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCISYNCSETSIGNALERATTRIBUTESNVX)
519  (NvSciSyncAttrList *const attrList);
520 
521 typedef WFDErrorCode (WFD_APIENTRY PFNWFDNVSCISYNCSETWAITERATTRIBUTESNVX)
522  (NvSciSyncAttrList *const attrList);
523 
524 typedef WFDErrorCode (WFD_APIENTRY PFNWFDBINDNVSCISYNCFENCETOSOURCENVX)
525  (const WFDDevice device, const WFDSource source, const NvSciSyncFence *const fence);
526 
527 typedef WFDErrorCode (WFD_APIENTRY PFNWFDREGISTERPOSTFLIPNVSCISYNCOBJNVX)
528  (const WFDDevice device, const NvSciSyncObj *const obj);
529 
530 typedef void (WFD_APIENTRY PFNWFDDEVICECOMMITWITHNVSCISYNCFENCENVX)
531  (const WFDDevice device, const WFDCommitType type,
532  const WFDHandle handle, NvSciSyncFence *const fence);
533 
534 #define WFD_PIPELINE_COMMIT_NON_BLOCKING_NVX 0x7730
535 
536 #define WFD_PORT_MODE_H_TOTAL_NVX 0x7608
537 #define WFD_PORT_MODE_V_TOTAL_NVX 0x7609
538 
539 #define WFD_PORT_DETECT_FROZEN_FRAME_NV 0x7636
540 
566 typedef WFDuint32 WFDFrozenFrameROIHandleNV;
567 
576 #define WFD_INVALID_FROZEN_FRAME_ROI_HANDLE_NV ((WFDFrozenFrameROIHandleNV)0u)
577 
578 #ifdef WFD_WFDEXT_PROTOTYPES
579 
642 WFD_API_CALL WFDFrozenFrameROIHandleNV WFD_APIENTRY
643  wfdRegisterFrozenFrameROINV(const WFDDevice device,
644  const WFDPort port,
645  const WFDRect *const region);
646 
698 WFD_API_CALL WFDErrorCode WFD_APIENTRY
699  wfdUnregisterFrozenFrameROINV(const WFDDevice device,
700  const WFDPort port,
702 #endif /* WFD_WFDEXT_PROTOTYPES */
703 
704 typedef WFDFrozenFrameROIHandleNV (WFD_APIENTRY PFNWFDREGISTERFROZENFRAMEROINV)
705  (const WFDDevice device, const WFDPort port,
706  const WFDRect *const region);
707 typedef WFDErrorCode (WFD_APIENTRY PFNWFDUNREGISTERFROZENFRAMEROINV)
708  (const WFDDevice device, const WFDPort port,
710 
711 #ifdef NV_STANDARD_BUILD
712 
722 struct NvRmSurfaceRec;
723 typedef struct NvRmSurfaceRec NvRmSurface;
724 
725 #ifdef WFD_WFDEXT_PROTOTYPES
726 
772 WFD_API_CALL WFDSource WFD_APIENTRY
773  wfdCreateSourceFromNvRmSurfaceNVX(const WFDDevice device, const WFDPipeline pipeline,
774  const WFDint numSurfaces, const NvRmSurface *const surfaces);
775 #endif /* WFD_WFDEXT_PROTOTYPES */
776 
777 typedef WFDSource (WFD_APIENTRY PFNWFDCREATESOURCEFROMNVRMSURFACENVX) (const WFDDevice device,
778  const WFDPipeline pipeline, const WFDint numSurfaces, const NvRmSurface *const surfaces);
779 
789 struct NvRmFenceRec;
790 typedef struct NvRmFenceRec NvRmFence;
791 
792 #ifdef WFD_WFDEXT_PROTOTYPES
793 
836 WFD_API_CALL WFDErrorCode WFD_APIENTRY
837  wfdBindNvRmFenceToSourceNVX(const WFDDevice device, const WFDSource source,
838  const NvRmFence *const fence);
839 
893 WFD_API_CALL void WFD_APIENTRY
894  wfdDeviceCommitWithNvRmFenceNVX(const WFDDevice device,
895  const WFDCommitType type,
896  const WFDHandle handle,
897  NvRmFence *const fence);
898 #endif /* WFD_WFDEXT_PROTOTYPES */
899 
900 typedef WFDErrorCode (WFD_APIENTRY PFNWFDBINDNVRMFENCETOSOURCENVX) (const WFDDevice device,
901  const WFDSource source, const NvRmFence *const fence);
902 typedef void (WFD_APIENTRY PFNWFDDEVICECOMMITWITHNVRMFENCENVX) (const WFDDevice device,
903  const WFDCommitType type, const WFDHandle handle, NvRmFence *const fence);
904 
905 #if defined(__QNX__)
906 #define WFD_PORT_CBABC_MODE_QNX 0x7670
907 
914 typedef enum
915 { WFD_PORT_CBABC_MODE_NONE_QNX = 0x7671,
916  WFD_PORT_CBABC_MODE_VIDEO_QNX = 0x7672,
917  WFD_PORT_CBABC_MODE_UI_QNX = 0x7673,
918  WFD_PORT_CBABC_MODE_PHOTO_QNX = 0x7674,
919  WFD_PORT_CBABC_MODE_32BIT_QNX = 0x7FFFFFFF
920 } WFDPortCBABCModeQNX;
921 
922 #define WFD_PIPELINE_BRIGHTNESS_QNX 0x7750
923 #define WFD_PIPELINE_CONTRAST_QNX 0x7751
924 #define WFD_PIPELINE_HUE_QNX 0x7752
925 #define WFD_PIPELINE_SATURATION_QNX 0x7753
926 
927 #define WFD_PORT_MODE_ASPECT_RATIO_QNX 0x7606
928 #define WFD_PORT_MODE_PREFERRED_QNX 0x7607
929 
930 #define WFD_USAGE_DISPLAY_QNX (1 << 0)
931 #define WFD_USAGE_READ_QNX (1 << 1)
932 #define WFD_USAGE_WRITE_QNX (1 << 2)
933 #define WFD_USAGE_NATIVE_QNX (1 << 3)
934 #define WFD_USAGE_OPENGL_ES1_QNX (1 << 4)
935 #define WFD_USAGE_OPENGL_ES2_QNX (1 << 5)
936 #define WFD_USAGE_OPENGL_ES3_QNX (1 << 11)
937 #define WFD_USAGE_OPENVG_QNX (1 << 6)
938 #define WFD_USAGE_VIDEO_QNX (1 << 7)
939 #define WFD_USAGE_CAPTURE_QNX (1 << 8)
940 #define WFD_USAGE_ROTATION_QNX (1 << 9)
941 #define WFD_USAGE_OVERLAY_QNX (1 << 10)
942 #define WFD_USAGE_WRITEBACK_QNX (1 << 31)
943 #define WFD_FORMAT_BYTE_QNX 1
944 #define WFD_FORMAT_RGBA4444_QNX 2
945 #define WFD_FORMAT_RGBX4444_QNX 3
946 #define WFD_FORMAT_RGBA5551_QNX 4
947 #define WFD_FORMAT_RGBX5551_QNX 5
948 #define WFD_FORMAT_RGB565_QNX 6
949 #define WFD_FORMAT_RGB888_QNX 7
950 #define WFD_FORMAT_RGBA8888_QNX 8
951 #define WFD_FORMAT_RGBX8888_QNX 9
952 #define WFD_FORMAT_YVU9_QNX 10
953 #define WFD_FORMAT_YUV420_QNX 11
954 #define WFD_FORMAT_NV12_QNX 12
955 #define WFD_FORMAT_YV12_QNX 13
956 #define WFD_FORMAT_UYVY_QNX 14
957 #define WFD_FORMAT_YUY2_QNX 15
958 #define WFD_FORMAT_YVYU_QNX 16
959 #define WFD_FORMAT_V422_QNX 17
960 #define WFD_FORMAT_AYUV_QNX 18
961 #define WFD_FORMAT_NV12_QC_SUPERTILE ((1 << 16) | WFD_FORMAT_NV12_QNX)
962 #define WFD_FORMAT_NV12_QC_32M4KA ((2 << 16) | WFD_FORMAT_NV12_QNX)
963 #ifdef WFD_WFDEXT_PROTOTYPES
964 
1016 WFD_API_CALL WFDErrorCode WFD_APIENTRY
1017  wfdCreateWFDEGLImagesQNX(WFDDevice device, WFDint width, WFDint height, WFDint format, WFDint usage, WFDint count, WFDEGLImage *images);
1059 WFD_API_CALL WFDErrorCode WFD_APIENTRY
1060  wfdDestroyWFDEGLImagesQNX(WFDDevice device, WFDint count, WFDEGLImage *images);
1061 #endif /* WFD_WFDEXT_PROTOTYPES */
1062 typedef WFDErrorCode (WFD_APIENTRY PFNWFDCREATEWFDEGLIMAGESQNX) (WFDDevice device, WFDint width, WFDint height, WFDint usage, WFDint count, WFDEGLImage *images);
1063 typedef WFDErrorCode (WFD_APIENTRY PFNWFDDESTROYWFDEGLIMAGESQNX) (WFDDevice device, WFDint count, WFDEGLImage *images);
1064 
1065 #endif // defined(__QNX__)
1066 #endif /* !NV_STANDARAD_BUILD */
1067 
1068 #ifdef __cplusplus
1069 }
1070 #endif
1071 
1072 
1073 #endif /* WFDEXT_H_ */
WFDSource
typedef WFDSource(WFD_APIENTRY PFNWFDCREATESOURCEFROMNVSCIBUFNVX)(const WFDDevice device
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
Definition: wfdext.h:249
region
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const region
Definition: wfdext.h:113
bufObj
const WFDPipeline NvSciBufObj *const bufObj
Definition: wfdext.h:236
WFDFrozenFrameROIHandleNV
WFDuint32 WFDFrozenFrameROIHandleNV
Frozen Frame Region of Interest (ROI) extension.
Definition: wfdext.h:566
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:327
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:114
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
Definition: nvscibuf.h:3896
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
Definition: wfdext.h:126
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
Definition: wfdext.h:138
WFDErrorCode
typedef WFDErrorCode(WFD_APIENTRY PFNWFDNVSCIBUFSETDISPLAYATTRIBUTESNVX)(NvSciBufAttrList *const attrList)
NvRmFenceRec
@IgnoreForDoc
Definition: nvrm_host1x_safe_compat.h:54
fence
const WFDSource const NvSciSyncFence *const fence
Definition: wfdext.h:525
source
const WFDPipeline const WFDSource source
Definition: wfdext.h:111
port
const WFDPort port
Definition: wfdext.h:705
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:528
transition
const WFDPipeline const WFDSource const WFDTransition transition
Definition: wfdext.h:112
void
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
A container constituting an attribute list which contains.
Definition: nvscibuf.h:3914
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:253
handle
const WFDCommitType const WFDHandle handle
Definition: wfdext.h:532
NvRmSurfaceRec
An exposed (not opaque) structure representing a surface.
Definition: nvrm_surface_fusa.h:553
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
Definition: wfdext.h:261
pipeline
const WFDPipeline pipeline
Definition: wfdext.h:110
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:308
type
const WFDCommitType type
Definition: wfdext.h:531