/* SPDX-License-Identifier: MIT */1/* Copyright (c) 2012-2020 NVIDIA Corporation */23#ifndef _UAPI_TEGRA_DRM_H_4#define _UAPI_TEGRA_DRM_H_56#include "drm.h"78#if defined(__cplusplus)9extern "C" {10#endif1112/* Tegra DRM legacy UAPI. Only enabled with STAGING */1314#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)15#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)1617/**18* struct drm_tegra_gem_create - parameters for the GEM object creation IOCTL19*/20struct drm_tegra_gem_create {21/**22* @size:23*24* The size, in bytes, of the buffer object to be created.25*/26__u64 size;2728/**29* @flags:30*31* A bitmask of flags that influence the creation of GEM objects:32*33* DRM_TEGRA_GEM_CREATE_TILED34* Use the 16x16 tiling format for this buffer.35*36* DRM_TEGRA_GEM_CREATE_BOTTOM_UP37* The buffer has a bottom-up layout.38*/39__u32 flags;4041/**42* @handle:43*44* The handle of the created GEM object. Set by the kernel upon45* successful completion of the IOCTL.46*/47__u32 handle;48};4950/**51* struct drm_tegra_gem_mmap - parameters for the GEM mmap IOCTL52*/53struct drm_tegra_gem_mmap {54/**55* @handle:56*57* Handle of the GEM object to obtain an mmap offset for.58*/59__u32 handle;6061/**62* @pad:63*64* Structure padding that may be used in the future. Must be 0.65*/66__u32 pad;6768/**69* @offset:70*71* The mmap offset for the given GEM object. Set by the kernel upon72* successful completion of the IOCTL.73*/74__u64 offset;75};7677/**78* struct drm_tegra_syncpt_read - parameters for the read syncpoint IOCTL79*/80struct drm_tegra_syncpt_read {81/**82* @id:83*84* ID of the syncpoint to read the current value from.85*/86__u32 id;8788/**89* @value:90*91* The current syncpoint value. Set by the kernel upon successful92* completion of the IOCTL.93*/94__u32 value;95};9697/**98* struct drm_tegra_syncpt_incr - parameters for the increment syncpoint IOCTL99*/100struct drm_tegra_syncpt_incr {101/**102* @id:103*104* ID of the syncpoint to increment.105*/106__u32 id;107108/**109* @pad:110*111* Structure padding that may be used in the future. Must be 0.112*/113__u32 pad;114};115116/**117* struct drm_tegra_syncpt_wait - parameters for the wait syncpoint IOCTL118*/119struct drm_tegra_syncpt_wait {120/**121* @id:122*123* ID of the syncpoint to wait on.124*/125__u32 id;126127/**128* @thresh:129*130* Threshold value for which to wait.131*/132__u32 thresh;133134/**135* @timeout:136*137* Timeout, in milliseconds, to wait.138*/139__u32 timeout;140141/**142* @value:143*144* The new syncpoint value after the wait. Set by the kernel upon145* successful completion of the IOCTL.146*/147__u32 value;148};149150#define DRM_TEGRA_NO_TIMEOUT (0xffffffff)151152/**153* struct drm_tegra_open_channel - parameters for the open channel IOCTL154*/155struct drm_tegra_open_channel {156/**157* @client:158*159* The client ID for this channel.160*/161__u32 client;162163/**164* @pad:165*166* Structure padding that may be used in the future. Must be 0.167*/168__u32 pad;169170/**171* @context:172*173* The application context of this channel. Set by the kernel upon174* successful completion of the IOCTL. This context needs to be passed175* to the DRM_TEGRA_CHANNEL_CLOSE or the DRM_TEGRA_SUBMIT IOCTLs.176*/177__u64 context;178};179180/**181* struct drm_tegra_close_channel - parameters for the close channel IOCTL182*/183struct drm_tegra_close_channel {184/**185* @context:186*187* The application context of this channel. This is obtained from the188* DRM_TEGRA_OPEN_CHANNEL IOCTL.189*/190__u64 context;191};192193/**194* struct drm_tegra_get_syncpt - parameters for the get syncpoint IOCTL195*/196struct drm_tegra_get_syncpt {197/**198* @context:199*200* The application context identifying the channel for which to obtain201* the syncpoint ID.202*/203__u64 context;204205/**206* @index:207*208* Index of the client syncpoint for which to obtain the ID.209*/210__u32 index;211212/**213* @id:214*215* The ID of the given syncpoint. Set by the kernel upon successful216* completion of the IOCTL.217*/218__u32 id;219};220221/**222* struct drm_tegra_get_syncpt_base - parameters for the get wait base IOCTL223*/224struct drm_tegra_get_syncpt_base {225/**226* @context:227*228* The application context identifying for which channel to obtain the229* wait base.230*/231__u64 context;232233/**234* @syncpt:235*236* ID of the syncpoint for which to obtain the wait base.237*/238__u32 syncpt;239240/**241* @id:242*243* The ID of the wait base corresponding to the client syncpoint. Set244* by the kernel upon successful completion of the IOCTL.245*/246__u32 id;247};248249/**250* struct drm_tegra_syncpt - syncpoint increment operation251*/252struct drm_tegra_syncpt {253/**254* @id:255*256* ID of the syncpoint to operate on.257*/258__u32 id;259260/**261* @incrs:262*263* Number of increments to perform for the syncpoint.264*/265__u32 incrs;266};267268/**269* struct drm_tegra_cmdbuf - structure describing a command buffer270*/271struct drm_tegra_cmdbuf {272/**273* @handle:274*275* Handle to a GEM object containing the command buffer.276*/277__u32 handle;278279/**280* @offset:281*282* Offset, in bytes, into the GEM object identified by @handle at283* which the command buffer starts.284*/285__u32 offset;286287/**288* @words:289*290* Number of 32-bit words in this command buffer.291*/292__u32 words;293294/**295* @pad:296*297* Structure padding that may be used in the future. Must be 0.298*/299__u32 pad;300};301302/**303* struct drm_tegra_reloc - GEM object relocation structure304*/305struct drm_tegra_reloc {306struct {307/**308* @cmdbuf.handle:309*310* Handle to the GEM object containing the command buffer for311* which to perform this GEM object relocation.312*/313__u32 handle;314315/**316* @cmdbuf.offset:317*318* Offset, in bytes, into the command buffer at which to319* insert the relocated address.320*/321__u32 offset;322} cmdbuf;323struct {324/**325* @target.handle:326*327* Handle to the GEM object to be relocated.328*/329__u32 handle;330331/**332* @target.offset:333*334* Offset, in bytes, into the target GEM object at which the335* relocated data starts.336*/337__u32 offset;338} target;339340/**341* @shift:342*343* The number of bits by which to shift relocated addresses.344*/345__u32 shift;346347/**348* @pad:349*350* Structure padding that may be used in the future. Must be 0.351*/352__u32 pad;353};354355/**356* struct drm_tegra_waitchk - wait check structure357*/358struct drm_tegra_waitchk {359/**360* @handle:361*362* Handle to the GEM object containing a command stream on which to363* perform the wait check.364*/365__u32 handle;366367/**368* @offset:369*370* Offset, in bytes, of the location in the command stream to perform371* the wait check on.372*/373__u32 offset;374375/**376* @syncpt:377*378* ID of the syncpoint to wait check.379*/380__u32 syncpt;381382/**383* @thresh:384*385* Threshold value for which to check.386*/387__u32 thresh;388};389390/**391* struct drm_tegra_submit - job submission structure392*/393struct drm_tegra_submit {394/**395* @context:396*397* The application context identifying the channel to use for the398* execution of this job.399*/400__u64 context;401402/**403* @num_syncpts:404*405* The number of syncpoints operated on by this job. This defines the406* length of the array pointed to by @syncpts.407*/408__u32 num_syncpts;409410/**411* @num_cmdbufs:412*413* The number of command buffers to execute as part of this job. This414* defines the length of the array pointed to by @cmdbufs.415*/416__u32 num_cmdbufs;417418/**419* @num_relocs:420*421* The number of relocations to perform before executing this job.422* This defines the length of the array pointed to by @relocs.423*/424__u32 num_relocs;425426/**427* @num_waitchks:428*429* The number of wait checks to perform as part of this job. This430* defines the length of the array pointed to by @waitchks.431*/432__u32 num_waitchks;433434/**435* @waitchk_mask:436*437* Bitmask of valid wait checks.438*/439__u32 waitchk_mask;440441/**442* @timeout:443*444* Timeout, in milliseconds, before this job is cancelled.445*/446__u32 timeout;447448/**449* @syncpts:450*451* A pointer to an array of &struct drm_tegra_syncpt structures that452* specify the syncpoint operations performed as part of this job.453* The number of elements in the array must be equal to the value454* given by @num_syncpts.455*/456__u64 syncpts;457458/**459* @cmdbufs:460*461* A pointer to an array of &struct drm_tegra_cmdbuf structures that462* define the command buffers to execute as part of this job. The463* number of elements in the array must be equal to the value given464* by @num_syncpts.465*/466__u64 cmdbufs;467468/**469* @relocs:470*471* A pointer to an array of &struct drm_tegra_reloc structures that472* specify the relocations that need to be performed before executing473* this job. The number of elements in the array must be equal to the474* value given by @num_relocs.475*/476__u64 relocs;477478/**479* @waitchks:480*481* A pointer to an array of &struct drm_tegra_waitchk structures that482* specify the wait checks to be performed while executing this job.483* The number of elements in the array must be equal to the value484* given by @num_waitchks.485*/486__u64 waitchks;487488/**489* @fence:490*491* The threshold of the syncpoint associated with this job after it492* has been completed. Set by the kernel upon successful completion of493* the IOCTL. This can be used with the DRM_TEGRA_SYNCPT_WAIT IOCTL to494* wait for this job to be finished.495*/496__u32 fence;497498/**499* @reserved:500*501* This field is reserved for future use. Must be 0.502*/503__u32 reserved[5];504};505506#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0507#define DRM_TEGRA_GEM_TILING_MODE_TILED 1508#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2509510/**511* struct drm_tegra_gem_set_tiling - parameters for the set tiling IOCTL512*/513struct drm_tegra_gem_set_tiling {514/**515* @handle:516*517* Handle to the GEM object for which to set the tiling parameters.518*/519__u32 handle;520521/**522* @mode:523*524* The tiling mode to set. Must be one of:525*526* DRM_TEGRA_GEM_TILING_MODE_PITCH527* pitch linear format528*529* DRM_TEGRA_GEM_TILING_MODE_TILED530* 16x16 tiling format531*532* DRM_TEGRA_GEM_TILING_MODE_BLOCK533* 16Bx2 tiling format534*/535__u32 mode;536537/**538* @value:539*540* The value to set for the tiling mode parameter.541*/542__u32 value;543544/**545* @pad:546*547* Structure padding that may be used in the future. Must be 0.548*/549__u32 pad;550};551552/**553* struct drm_tegra_gem_get_tiling - parameters for the get tiling IOCTL554*/555struct drm_tegra_gem_get_tiling {556/**557* @handle:558*559* Handle to the GEM object for which to query the tiling parameters.560*/561__u32 handle;562563/**564* @mode:565*566* The tiling mode currently associated with the GEM object. Set by567* the kernel upon successful completion of the IOCTL.568*/569__u32 mode;570571/**572* @value:573*574* The tiling mode parameter currently associated with the GEM object.575* Set by the kernel upon successful completion of the IOCTL.576*/577__u32 value;578579/**580* @pad:581*582* Structure padding that may be used in the future. Must be 0.583*/584__u32 pad;585};586587#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)588#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)589590/**591* struct drm_tegra_gem_set_flags - parameters for the set flags IOCTL592*/593struct drm_tegra_gem_set_flags {594/**595* @handle:596*597* Handle to the GEM object for which to set the flags.598*/599__u32 handle;600601/**602* @flags:603*604* The flags to set for the GEM object.605*/606__u32 flags;607};608609/**610* struct drm_tegra_gem_get_flags - parameters for the get flags IOCTL611*/612struct drm_tegra_gem_get_flags {613/**614* @handle:615*616* Handle to the GEM object for which to query the flags.617*/618__u32 handle;619620/**621* @flags:622*623* The flags currently associated with the GEM object. Set by the624* kernel upon successful completion of the IOCTL.625*/626__u32 flags;627};628629#define DRM_TEGRA_GEM_CREATE 0x00630#define DRM_TEGRA_GEM_MMAP 0x01631#define DRM_TEGRA_SYNCPT_READ 0x02632#define DRM_TEGRA_SYNCPT_INCR 0x03633#define DRM_TEGRA_SYNCPT_WAIT 0x04634#define DRM_TEGRA_OPEN_CHANNEL 0x05635#define DRM_TEGRA_CLOSE_CHANNEL 0x06636#define DRM_TEGRA_GET_SYNCPT 0x07637#define DRM_TEGRA_SUBMIT 0x08638#define DRM_TEGRA_GET_SYNCPT_BASE 0x09639#define DRM_TEGRA_GEM_SET_TILING 0x0a640#define DRM_TEGRA_GEM_GET_TILING 0x0b641#define DRM_TEGRA_GEM_SET_FLAGS 0x0c642#define DRM_TEGRA_GEM_GET_FLAGS 0x0d643644#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)645#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)646#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read)647#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr)648#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait)649#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel)650#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel)651#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)652#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)653#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)654#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)655#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)656#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)657#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)658659/* New Tegra DRM UAPI */660661/*662* Reported by the driver in the `capabilities` field.663*664* DRM_TEGRA_CHANNEL_CAP_CACHE_COHERENT: If set, the engine is cache coherent665* with regard to the system memory.666*/667#define DRM_TEGRA_CHANNEL_CAP_CACHE_COHERENT (1 << 0)668669struct drm_tegra_channel_open {670/**671* @host1x_class: [in]672*673* Host1x class of the engine that will be programmed using this674* channel.675*/676__u32 host1x_class;677678/**679* @flags: [in]680*681* Flags.682*/683__u32 flags;684685/**686* @context: [out]687*688* Opaque identifier corresponding to the opened channel.689*/690__u32 context;691692/**693* @version: [out]694*695* Version of the engine hardware. This can be used by userspace696* to determine how the engine needs to be programmed.697*/698__u32 version;699700/**701* @capabilities: [out]702*703* Flags describing the hardware capabilities.704*/705__u32 capabilities;706__u32 padding;707};708709struct drm_tegra_channel_close {710/**711* @context: [in]712*713* Identifier of the channel to close.714*/715__u32 context;716__u32 padding;717};718719/*720* Mapping flags that can be used to influence how the mapping is created.721*722* DRM_TEGRA_CHANNEL_MAP_READ: create mapping that allows HW read access723* DRM_TEGRA_CHANNEL_MAP_WRITE: create mapping that allows HW write access724*/725#define DRM_TEGRA_CHANNEL_MAP_READ (1 << 0)726#define DRM_TEGRA_CHANNEL_MAP_WRITE (1 << 1)727#define DRM_TEGRA_CHANNEL_MAP_READ_WRITE (DRM_TEGRA_CHANNEL_MAP_READ | \728DRM_TEGRA_CHANNEL_MAP_WRITE)729730struct drm_tegra_channel_map {731/**732* @context: [in]733*734* Identifier of the channel to which make memory available for.735*/736__u32 context;737738/**739* @handle: [in]740*741* GEM handle of the memory to map.742*/743__u32 handle;744745/**746* @flags: [in]747*748* Flags.749*/750__u32 flags;751752/**753* @mapping: [out]754*755* Identifier corresponding to the mapping, to be used for756* relocations or unmapping later.757*/758__u32 mapping;759};760761struct drm_tegra_channel_unmap {762/**763* @context: [in]764*765* Channel identifier of the channel to unmap memory from.766*/767__u32 context;768769/**770* @mapping: [in]771*772* Mapping identifier of the memory mapping to unmap.773*/774__u32 mapping;775};776777/* Submission */778779/**780* Specify that bit 39 of the patched-in address should be set to switch781* swizzling between Tegra and non-Tegra sector layout on systems that store782* surfaces in system memory in non-Tegra sector layout.783*/784#define DRM_TEGRA_SUBMIT_RELOC_SECTOR_LAYOUT (1 << 0)785786struct drm_tegra_submit_buf {787/**788* @mapping: [in]789*790* Identifier of the mapping to use in the submission.791*/792__u32 mapping;793794/**795* @flags: [in]796*797* Flags.798*/799__u32 flags;800801/**802* Information for relocation patching.803*/804struct {805/**806* @target_offset: [in]807*808* Offset from the start of the mapping of the data whose809* address is to be patched into the gather.810*/811__u64 target_offset;812813/**814* @gather_offset_words: [in]815*816* Offset in words from the start of the gather data to817* where the address should be patched into.818*/819__u32 gather_offset_words;820821/**822* @shift: [in]823*824* Number of bits the address should be shifted right before825* patching in.826*/827__u32 shift;828} reloc;829};830831/**832* Execute `words` words of Host1x opcodes specified in the `gather_data_ptr`833* buffer. Each GATHER_UPTR command uses successive words from the buffer.834*/835#define DRM_TEGRA_SUBMIT_CMD_GATHER_UPTR 0836/**837* Wait for a syncpoint to reach a value before continuing with further838* commands.839*/840#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT 1841/**842* Wait for a syncpoint to reach a value before continuing with further843* commands. The threshold is calculated relative to the start of the job.844*/845#define DRM_TEGRA_SUBMIT_CMD_WAIT_SYNCPT_RELATIVE 2846847struct drm_tegra_submit_cmd_gather_uptr {848__u32 words;849__u32 reserved[3];850};851852struct drm_tegra_submit_cmd_wait_syncpt {853__u32 id;854__u32 value;855__u32 reserved[2];856};857858struct drm_tegra_submit_cmd {859/**860* @type: [in]861*862* Command type to execute. One of the DRM_TEGRA_SUBMIT_CMD*863* defines.864*/865__u32 type;866867/**868* @flags: [in]869*870* Flags.871*/872__u32 flags;873874union {875struct drm_tegra_submit_cmd_gather_uptr gather_uptr;876struct drm_tegra_submit_cmd_wait_syncpt wait_syncpt;877__u32 reserved[4];878};879};880881struct drm_tegra_submit_syncpt {882/**883* @id: [in]884*885* ID of the syncpoint that the job will increment.886*/887__u32 id;888889/**890* @flags: [in]891*892* Flags.893*/894__u32 flags;895896/**897* @increments: [in]898*899* Number of times the job will increment this syncpoint.900*/901__u32 increments;902903/**904* @value: [out]905*906* Value the syncpoint will have once the job has completed all907* its specified syncpoint increments.908*909* Note that the kernel may increment the syncpoint before or after910* the job. These increments are not reflected in this field.911*912* If the job hangs or times out, not all of the increments may913* get executed.914*/915__u32 value;916};917918struct drm_tegra_channel_submit {919/**920* @context: [in]921*922* Identifier of the channel to submit this job to.923*/924__u32 context;925926/**927* @num_bufs: [in]928*929* Number of elements in the `bufs_ptr` array.930*/931__u32 num_bufs;932933/**934* @num_cmds: [in]935*936* Number of elements in the `cmds_ptr` array.937*/938__u32 num_cmds;939940/**941* @gather_data_words: [in]942*943* Number of 32-bit words in the `gather_data_ptr` array.944*/945__u32 gather_data_words;946947/**948* @bufs_ptr: [in]949*950* Pointer to an array of drm_tegra_submit_buf structures.951*/952__u64 bufs_ptr;953954/**955* @cmds_ptr: [in]956*957* Pointer to an array of drm_tegra_submit_cmd structures.958*/959__u64 cmds_ptr;960961/**962* @gather_data_ptr: [in]963*964* Pointer to an array of Host1x opcodes to be used by GATHER_UPTR965* commands.966*/967__u64 gather_data_ptr;968969/**970* @syncobj_in: [in]971*972* Handle for DRM syncobj that will be waited before submission.973* Ignored if zero.974*/975__u32 syncobj_in;976977/**978* @syncobj_out: [in]979*980* Handle for DRM syncobj that will have its fence replaced with981* the job's completion fence. Ignored if zero.982*/983__u32 syncobj_out;984985/**986* @syncpt_incr: [in,out]987*988* Information about the syncpoint the job will increment.989*/990struct drm_tegra_submit_syncpt syncpt;991};992993struct drm_tegra_syncpoint_allocate {994/**995* @id: [out]996*997* ID of allocated syncpoint.998*/999__u32 id;1000__u32 padding;1001};10021003struct drm_tegra_syncpoint_free {1004/**1005* @id: [in]1006*1007* ID of syncpoint to free.1008*/1009__u32 id;1010__u32 padding;1011};10121013struct drm_tegra_syncpoint_wait {1014/**1015* @timeout: [in]1016*1017* Absolute timestamp at which the wait will time out.1018*/1019__s64 timeout_ns;10201021/**1022* @id: [in]1023*1024* ID of syncpoint to wait on.1025*/1026__u32 id;10271028/**1029* @threshold: [in]1030*1031* Threshold to wait for.1032*/1033__u32 threshold;10341035/**1036* @value: [out]1037*1038* Value of the syncpoint upon wait completion.1039*/1040__u32 value;10411042__u32 padding;1043};10441045#define DRM_IOCTL_TEGRA_CHANNEL_OPEN DRM_IOWR(DRM_COMMAND_BASE + 0x10, struct drm_tegra_channel_open)1046#define DRM_IOCTL_TEGRA_CHANNEL_CLOSE DRM_IOWR(DRM_COMMAND_BASE + 0x11, struct drm_tegra_channel_close)1047#define DRM_IOCTL_TEGRA_CHANNEL_MAP DRM_IOWR(DRM_COMMAND_BASE + 0x12, struct drm_tegra_channel_map)1048#define DRM_IOCTL_TEGRA_CHANNEL_UNMAP DRM_IOWR(DRM_COMMAND_BASE + 0x13, struct drm_tegra_channel_unmap)1049#define DRM_IOCTL_TEGRA_CHANNEL_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + 0x14, struct drm_tegra_channel_submit)10501051#define DRM_IOCTL_TEGRA_SYNCPOINT_ALLOCATE DRM_IOWR(DRM_COMMAND_BASE + 0x20, struct drm_tegra_syncpoint_allocate)1052#define DRM_IOCTL_TEGRA_SYNCPOINT_FREE DRM_IOWR(DRM_COMMAND_BASE + 0x21, struct drm_tegra_syncpoint_free)1053#define DRM_IOCTL_TEGRA_SYNCPOINT_WAIT DRM_IOWR(DRM_COMMAND_BASE + 0x22, struct drm_tegra_syncpoint_wait)10541055#if defined(__cplusplus)1056}1057#endif10581059#endif106010611062