NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
nvrm_surface_fusa.h File Reference

Detailed Description

NVIDIA Driver Development Kit: Resource Manager Surface Management Interface

Description: This file declares the functional safety interface for RM Surface Management Services.

Definition in file nvrm_surface_fusa.h.

Go to the source code of this file.

Data Structures

struct  NvRmSurfaceRec
 An exposed (not opaque) structure representing a surface. More...
 
struct  NvRmSurfaceContainerRec
 Common container struct to represent all surface types. More...
 

Macros

#define NvYuvChromaLocation_BT601   NvYuvChromaLocation_0_0
 Aliases for typical usage. More...
 
#define NvYuvChromaLocation_MPEG2   NvYuvChromaLocation_0_1
 
#define NvYuvChromaLocation_MPEG1   NvYuvChromaLocation_1_1
 
#define NvYuvChromaLocation_JPEG   NvYuvChromaLocation_1_1
 
#define NVRM_MAX_SURFACES   3
 Maximum number of NvRmSurfaces that GLES textureinfo/NvWsiPixmap contain. More...
 
#define NVRM_SURFACE_FLAG_VPR   (1ULL << 0U)
 The access to the surface is restricted (Video Protected Region). More...
 
#define NVRM_SURFACE_FLAG_COMPRESSIBLE   (1ULL << 1U)
 The memory backing the surface uses compression. More...
 
#define NVRM_SURFACE_FLAG_FORCE_TEGRA_RAW_SWIZZLING   (1ULL << 2U)
 The memory backing the surface uses TEGRA_RAW swizzling, even if that's not the default block linear layout for the current chip. More...
 
#define NVRM_SURFACE_FLAG_SIZE_VALIDATED   (1ULL << 63U)
 The surface's Size member is reliable to read from. More...
 
#define NVRM_SURFACE_FLAG_NO_FORCE_PAGE_ALIGNMENT   (1ULL << 3U)
 The surface's size should be page aligned. More...
 
#define NvRmSurfaceUnitSupport
 
#define NVRM_SURFACE_FORCE_BLOCK_HEIGHT_LOG2_DONT_FORCE   0xFFFFFFFFU
 Use for NvRmSurfaceAttribute_ForceBlockHeightLog2 to indicate no enforced block height. More...
 
#define NVRM_SURFACECONTAINER_MAX_SURFACES   3U
 Maximum number of surfaces which can be stored in the NvRmSurfaceContainer. More...
 

Typedefs

typedef struct NvRmSurfaceRec NvRmSurface
 An exposed (not opaque) structure representing a surface. More...
 
typedef struct NvRmSurfaceContainerRec NvRmSurfaceContainer
 Common container struct to represent all surface types. More...
 

Enumerations

enum  NvYuvColorFormat {
  NvYuvColorFormat_Unspecified = 0,
  NvYuvColorFormat_YUV420,
  NvYuvColorFormat_YUV422,
  NvYuvColorFormat_YUV422R,
  NvYuvColorFormat_YUV444,
  NvYuvColorFormat_Force32 = 0x7FFFFFFFU
}
 Defines the different color formats in the YUV color space. More...
 
enum  NvYuvChromaLocation {
  NvYuvChromaLocation_Unspecified,
  NvYuvChromaLocation_0_0,
  NvYuvChromaLocation_0_1,
  NvYuvChromaLocation_1_1,
  NvYuvChromaLocation_0_2,
  NvYuvChromaLocation_1_0,
  NvYuvChromaLocation_1_2,
  NvYuvChromaLocation_2_0,
  NvYuvChromaLocation_2_1,
  NvYuvChromaLocation_2_2
}
 Defines the chroma subsampling location. More...
 
enum  NvDisplayScanFormat {
  NvDisplayScanFormat_Progressive = 0,
  NvDisplayScanFormat_Interlaced,
  NvDisplayScanFormat_Force32 = 0x7FFFFFFFU
}
 Defines the different display scan formats in the video planes. More...
 
enum  NvRmSurfaceLayout {
  NvRmSurfaceLayout_Pitch = 1,
  NvRmSurfaceLayout_Tiled,
  NvRmSurfaceLayout_Blocklinear,
  NvRmSurfaceLayout_Num,
  NvRmSurfaceLayout_Force32 = 0x7FFFFFFFU
}
 The possible layouts that a surface can presently have. More...
 
enum  NvRmSurfaceUnitSupport {
  NvRmSurfaceUnitSupport_3D = 1 << 0,
  NvRmSurfaceUnitSupport_2D = 1 << 1,
  NvRmSurfaceUnitSupport_Display = 1 << 2,
  NvRmSurfaceUnitSupport_PVA = 1 << 3,
  NvRmSurfaceUnitSupport_NVENC = 1 << 4,
  NvRmSurfaceUnitSupport_VI = 1 << 5,
  NvRmSurfaceUnitSupport_CSI = 1 << 6,
  NvRmSurfaceUnitSupport_ISP = 1 << 7,
  NvRmSurfaceUnitSupport_Camera,
  NvRmSurfaceUnitSupport_All
}
 Defines engine/unit support. More...
 
enum  NvRmSurfaceCompression {
  NvRmSurfaceCompression_Disabled = 0,
  NvRmSurfaceCompression_Enabled = 1,
  NvRmSurfaceCompression_GpuOnly = 2,
  NvRmSurfaceCompression_Default = 3
}
 Defines general surface compression support. More...
 
enum  NvRmSurfaceContainerAllocType {
  NvRmSurfaceContainerAllocType_Contiguous,
  NvRmSurfaceContainerAllocType_NonContiguous
}
 Defines an allocation type for semiplanar and planar formats inside the container. More...
 
enum  NvRmSurfaceAttribute {
  NvRmSurfaceAttribute_None = 0,
  NvRmSurfaceAttribute_Layout,
  NvRmSurfaceAttribute_UnitSupport,
  NvRmSurfaceAttribute_DisplayScanFormat,
  NvRmSurfaceAttribute_OptimizeForDisplay,
  NvRmSurfaceAttribute_ForceBlockHeightLog2,
  NvRmSurfaceAttribute_Pitch,
  NvRmSurfaceAttribute_Size,
  NvRmSurfaceAttribute_Compression,
  NvRmSurfaceAttribute_Vpr,
  NvRmSurfaceAttribute_ForceTegraRawSwizzling,
  NvRmSurfaceAttribute_AllocType,
  NvRmSurfaceAttribute_ChromaLocType,
  NvRmSurfaceAttribute_NoForcePageAlignment,
  NvRmSurfaceAttribute_Last
}
 Define attribute types that can be passed into the attribute list accepted by NvRmSurfaceSetup. More...
 
enum  NvRmSurfaceContainerType {
  NvRmSurfaceContainerType_Single,
  NvRmSurfaceContainerType_SemiPlanar,
  NvRmSurfaceContainerType_Planar,
  NvRmSurfaceContainerType_Stereo
}
 Defines a container type for NvRmSurfaceContainer Depending of the format or how different color components are stored in the surfaces array, the container type can be single plane, semiplanar, planar or stereo. More...
 

Functions

NvError NvRmSurfaceSetup (NvRmSurface *const pSurf, NvU32 const width, NvU32 const height, NvColorFormat const colorFormat, NvU32 const *const attributes)
 Sets up an NvRmSurface. More...
 
NvError NvRmMultiplanarSurfaceSetup (NvRmSurface *Surfaces, NvU32 NumSurfaces, NvU32 Width, NvU32 Height, NvYuvColorFormat YuvFormat, const NvColorFormat *ColorFormats, const NvU32 *Attributes)
 Sets up a set of NvRmSurfaces describing a multiplanar surface. More...
 
NvYuvColorFormat NvRmSurfaceGetYuvColorFormat (NvRmSurface const *const *pSurf, NvU32 numSurfaces)
 Returns the YUV color format from an array of the N surfaces used to represent the YUV planes. More...
 
NvError NvRmSurfaceSetDeviceMemory (NvRmSurface *const pSurf, NvRmMemHandle const hMem, NvU32 const offset, void *const mappedPtr)
 Binds a surface to a region of device memory. More...
 
NvRmSurfaceLayout NvRmSurfaceGetDefaultLayout (void)
 Returns the system-wide default surface layout on the current platform. More...
 
NvError NvRmSurfaceGetPitchAlignment (NvRmSurfaceLayout const layout, NvU32 const unitSupport, NvU32 *const pitchAlign)
 Returns the pitch alignment requirement in bytes. More...
 
NvError NvRmSurfaceGetAlignment (NvRmSurface const *const pSurf, NvU32 *const pAlignment)
 Returns the alignment in bytes that the surface's memory will need to be allocated with. More...
 
NvError NvRmSurfaceGetCoordOffset (NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 *const pOffset)
 Returns the byte offset of a given pixel coordinate relative to the start of the surface. More...
 
NvError NvRmSurfaceWrite (NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 const width, NvU32 const height, void const *const pSrcPixels)
 Writes a subregion of a surface. More...
 
NvError NvRmSurfaceRead (NvRmSurface const *const pSurf, NvU32 const x, NvU32 const y, NvU32 const width, NvU32 const height, void *const pDstPixels)
 Reads a subregion of a surface. More...
 
static NvU32 NvRmSurfaceLayoutToRelocType (NvRmSurfaceLayout const layout)
 Convert surface layout into NvHost reloc type. More...