interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / third_party / nvidia-open-580.173.02 / src / common / sdk / nvidia / inc / ctrl / ctrl30f1.h

1560 lines · 67482 bytes Raw Blame History
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2006-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: MIT
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24#pragma once
25
26#include <nvtypes.h>
27
28//
29// This file was generated with FINN, an NVIDIA coding tool.
30// Source file: ctrl/ctrl30f1.finn
31//
32
33#include "ctrl/ctrlxxxx.h"
34/* NV30_GSYNC_CTRL control commands and parameters */
35
36#define NV30F1_CTRL_CMD(cat,idx) NVXXXX_CTRL_CMD(0x30F1, NV30F1_CTRL_##cat, idx)
37
38/* Command categories (6bits) */
39#define NV30F1_CTRL_RESERVED (0x00)
40#define NV30F1_CTRL_GSYNC (0x01)
41
42/*
43 * NV30F1_CTRL_CMD_NULL
44 *
45 * This command does nothing.
46 * This command does not take any parameters.
47 *
48 * Possible status values returned are:
49 * NV_OK
50 */
51#define NV30F1_CTRL_CMD_NULL (0x30f10000) /* finn: Evaluated from "(FINN_NV30_GSYNC_RESERVED_INTERFACE_ID << 8) | 0x0" */
52
53
54
55
56
57/* NV30F1_CTRL_GSYNC
58 *
59 * Gsync board access/control functionality.
60 *
61 */
62
63/*
64 * NV30F1_CTRL_CMD_GSYNC_GET_VERSION
65 *
66 * This command will get the current gsync api version info.
67 *
68 * version
69 * The api's major version. Does not change often.
70 *
71 * revision
72 * The api's minor version.
73 * Bumped with each change, no matter how minor.
74 *
75 * Possible status values returned are:
76 * NV_OK
77 *
78 */
79#define NV30F1_CTRL_CMD_GSYNC_GET_VERSION (0x30f10101) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_VERSION_PARAMS_MESSAGE_ID" */
80
81#define NV30F1_CTRL_GSYNC_GET_VERSION_PARAMS_MESSAGE_ID (0x1U)
82
83typedef struct NV30F1_CTRL_GSYNC_GET_VERSION_PARAMS {
84 NvU32 version;
85 NvU32 revision;
86} NV30F1_CTRL_GSYNC_GET_VERSION_PARAMS;
87
88#define NV30F1_CTRL_GSYNC_API_VER 1
89#define NV30F1_CTRL_GSYNC_API_REV 0
90
91/*
92 * NV30F1_CTRL_GSYNC api
93 *
94 * The gsync interface provides access to gsync devices in the system.
95 *
96 * There are commands:
97 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SIGNALS
98 * Status on input sync signals.
99 * NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_PARAMS
100 * Get gsync parameters.
101 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_PARAMS
102 * Get gsync parameters.
103 * NV30F1_CTRL_CMD_GSYNC_GET_INFO_CAPS
104 * Get basic info about the device and its connected displays
105 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_SYNC
106 * Enable frame sync.
107 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_UNSYNC
108 * Disable frame sync.
109 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS
110 * Get status info relevant for the control panel
111 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_TESTING
112 * Test signal enabling/disabling
113 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_WATCHDOG
114 * Control the gsync watchdog
115 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_INTERLACE_MODE
116 * Set the interlace mode
117 *
118 */
119
120
121/*
122 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SIGNALS
123 *
124 * This command returns information associated with incoming signals to the
125 * gsync device.
126 *
127 * RJ45
128 * This parameter contains the signal information for each of the two RJ45
129 * ports on the gsync device. A value of ~0 indicates that a signal is
130 * detected, but no rate information is available. Anything else is a rate
131 * in units of 10e-4 Hz.
132 * house
133 * This parameter contains the signal information for the house sync signal
134 * (i.e. the bnc port). A value of 0 means that no signal is present. A value
135 * of ~0 indicates that a signal is detected, but no rate information is
136 * available. Anything else is a rate in units of 10e-4 Hz.
137 * rate
138 * A mask representing signals for which we would like rate information (if
139 * available).
140 *
141 * Possible status values returned are
142 * NV_OK
143 * NV_ERR_INVALID_ARGUMENT
144 * NV_ERR_INVALID_PARAM_STRUCT
145 *
146 */
147
148#define NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SIGNALS (0x30f10102) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_PARAMS_MESSAGE_ID" */
149
150#define NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_PARAMS_MESSAGE_ID (0x2U)
151
152typedef struct NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_PARAMS {
153 NvU32 RJ45[2];
154 NvU32 house;
155 NvU32 rate;
156} NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_PARAMS;
157
158/*
159 * rate values
160 *
161 */
162
163#define NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_RJ45_0 (0x00000001)
164#define NV30F1_CTRL_GSYNC_GET_STATUS_SIGNALS_RJ45_1 (0x00000002)
165#define NV30F1_CTRL_GSYNC_GET_SIGNALS_HOUSE (0x00000004)
166
167
168/*
169 * NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_PARAMS
170 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_PARAMS
171 *
172 * These commands respectively return and set state related to the operation
173 * of the gsync device.
174 *
175 * which
176 * This value is a mask set by the client representing which parameters are
177 * to be updated. In the case of a GET command, these parameters will
178 * be used to change the state of the hardware. For both a GET
179 * command and a SET command, the hardware state will be returned by
180 * the RM in the respective parameter. All other parameters are untouched.
181 * syncPolarity
182 * This parameter specifies which edge of the house sync signal to sync with.
183 * videoMode
184 * This parameter specifies which video mode to use to decode the house sync
185 * signal.
186 * nSync
187 * This parameter specifies the number of pulses to wait between frame lock
188 * signal generation. 0 indicates that every incomming pulse should result in
189 * a frame lock sync pulse being generated (i.e. the input and output rate
190 * matches).
191 * syncSkew
192 * This parameter specifies the time delay between the frame sync signal and
193 * the GPUs signal in units of 0.977 us. Maximum value for SyncSkew is defined
194 * in respective header files of gsync boards. e.g. For P2060 board value
195 * is defined in drivers/resman/kernel/inc/dacp2060.h
196 * syncStartDelay
197 * In master mode, the amount of time to wait before generating the first
198 * sync pulse in units of 7.81 us, max 512 ms (i.e 65535 units).
199 * useHouseSync
200 * When a house sync signal is detected, this parameter indicates that it
201 * should be used as the reference to generate the frame sync signal.
202 * syncMulDiv
203 * Enables multiply/divide of the frequency of the house sync signal by an
204 * integer. Only supported if the
205 * NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_MULTIPLY_DIVIDE_SYNC bit is set. The
206 * maximum value of multiplyDivideValue is given by
207 * NV30F1_CTRL_GSYNC_GET_CAPS_PARAMS.maxMulDivValue.
208 *
209 * Possible status values returned are:
210 * NV_OK
211 * NV_ERR_INVALID_ARGUMENT
212 * NV_ERR_GENERIC
213 */
214
215#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_PARAMS (0x30f10103) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_PARAMS_PARAMS_MESSAGE_ID" */
216
217#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_PARAMS (0x30f10104) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_PARAMS_PARAMS_MESSAGE_ID" */
218
219typedef struct NV30F1_CTRL_GSYNC_MULTIPLY_DIVIDE_SETTINGS {
220 NvU8 multiplyDivideValue;
221 NvU8 multiplyDivideMode;
222 NvU16 rsvd;
223} NV30F1_CTRL_GSYNC_MULTIPLY_DIVIDE_SETTINGS;
224
225typedef struct NV30F1_CTRL_GSYNC_CONTROL_PARAMS_PARAMS {
226 NvU32 which;
227 NvU32 syncPolarity;
228 NvU32 syncVideoMode;
229 NvU32 nSync;
230 NvU32 syncSkew;
231 NvU32 syncStartDelay;
232 NvU32 useHouseSync;
233 NV30F1_CTRL_GSYNC_MULTIPLY_DIVIDE_SETTINGS syncMulDiv;
234 NvU32 syncVRR;
235} NV30F1_CTRL_GSYNC_CONTROL_PARAMS_PARAMS;
236
237#define NV30F1_CTRL_GSYNC_GET_CONTROL_PARAMS_PARAMS_MESSAGE_ID (0x3U)
238
239typedef NV30F1_CTRL_GSYNC_CONTROL_PARAMS_PARAMS NV30F1_CTRL_GSYNC_GET_CONTROL_PARAMS_PARAMS;
240
241#define NV30F1_CTRL_GSYNC_SET_CONTROL_PARAMS_PARAMS_MESSAGE_ID (0x4U)
242
243typedef NV30F1_CTRL_GSYNC_CONTROL_PARAMS_PARAMS NV30F1_CTRL_GSYNC_SET_CONTROL_PARAMS_PARAMS;
244
245/*
246 * which values
247 *
248 */
249
250#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_POLARITY 0x0001
251#define NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE 0x0002
252#define NV30F1_CTRL_GSYNC_SET_CONTROL_NSYNC 0x0004
253#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_SKEW 0x0008
254#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_START_DELAY 0x0010
255#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_USE_HOUSE 0x0020
256#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_MULTIPLY_DIVIDE 0x0040
257#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_VRR 0x0080
258
259#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_POLARITY NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_POLARITY
260#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE
261#define NV30F1_CTRL_GSYNC_GET_CONTROL_NSYNC NV30F1_CTRL_GSYNC_SET_CONTROL_NSYNC
262#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_SKEW NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_SKEW
263#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_START_DELAY NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_START_DELAY
264#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_USE_HOUSE NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_USE_HOUSE
265#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_MULTIPLY_DIVIDE NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_MULTIPLY_DIVIDE
266#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_VRR NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_VRR
267
268/*
269 * syncPolarity values
270 *
271 */
272
273#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_POLARITY_RISING_EDGE 0
274#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_POLARITY_FALLING_EDGE 1
275#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_POLARITY_BOTH_EDGES 2
276
277/*
278 * syncVideoMode values
279 * Video_Mode_Composite is valid for P2060 only.
280 *
281 */
282
283#define NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_NONE 0
284#define NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_TTL 1
285#define NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_NTSCPALSECAM 2
286#define NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_HDTV 3
287
288#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE_NONE NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_NONE
289#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE_TTL NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_TTL
290#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE_NTSCPALSECAM NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_NTSCPALSECAM
291#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE_HDTV NV30F1_CTRL_GSYNC_SET_CONTROL_VIDEO_MODE_HDTV
292#define NV30F1_CTRL_GSYNC_GET_CONTROL_VIDEO_MODE_COMPOSITE 4
293
294/*
295 * multiplyDivide values
296 *
297 */
298#define NV30F1_CTRL_GSYNC_SET_CONTROL_MULTIPLY_DIVIDE_MODE_MULTIPLY 0
299#define NV30F1_CTRL_GSYNC_SET_CONTROL_MULTIPLY_DIVIDE_MODE_DIVIDE 1
300
301/*
302 * VRR values
303 *
304 */
305#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_MODE_FIXED_REFRESH_RATE 0
306#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_MODE_VARIABLE_REFRESH_RATE 1
307
308/*
309 * NV30F1_CTRL_CMD_GSYNC_GET_CAPS
310 *
311 * This command returns the capabilities of this gsync device.
312 *
313 * revId
314 * This parameter is set by the RM to indicate the combined
315 * FPGA revision (low 4 bits) and board ID (high 4 bits).
316 *
317 * boardId
318 * This parameter is set by the RM to indicate the board ID,
319 * allowing disambiguation of P2060 and so forth.
320 *
321 * minRevRequired
322 * This parameter is set by the RM to indicate the minimum
323 * Qsync FPGA revision required for a specific CHIP Familiy
324 *
325 * isFirmwareRevMismatch
326 * This parameter is set to TRUE by RM when the Qsync Firmware
327 * Revision is incompatibled with the connected GPU chip family.
328 *
329 * revision
330 * This parameter is set by the RM to indicate the device revision,
331 * also known as major version.
332 *
333 * extendedRevision
334 * This parameter is set by the RM to indicate the device extended
335 * revision, also known as minor version.
336 *
337 * capFlags
338 * This parameter is set by the RM to indicate capabilities of
339 * the board, preventing the client from needing to keep track
340 * of the feature lists supported by each revision of each board.
341 *
342 * maxSyncSkew
343 * This parameter returns that maximum units of sync skew the
344 * board supports. The value prgrammed into the board has to be
345 * between 0 and maxSyncSkew, inclusive. The value of each unit
346 * can be learned from the syncSkewResolution parameter.
347 *
348 * syncSkewResolution
349 * This parameter returns the number of nanoseconds that one unit
350 * of sync skew corresponds to.
351 *
352 * maxStartDelay
353 * This parameter returns that maximum units of sync start delay
354 * the board supports. The value prgrammed into the board has to be
355 * between 0 and maxStartDelay, inclusive. The value of each unit
356 * can be learned from the startDelayResolution parameter.
357 *
358 * startDelayResolution
359 * This parameter returns the number of nanoseconds that one unit
360 * of sync start delay corresponds to.
361 *
362 * maxSyncInterval
363 * This parameter returns the maximum duration of house sync interval
364 * between frame lock sync cycle that the board supports. The value
365 * programmed into the board has to be between 0 and maxSyncInterval,
366 * inclusive.
367 *
368 * maxMulDivValue
369 * This parameter returns the maximum possible value that can be
370 * programmed for multiplying / dividing house sync. Only valid if
371 * NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_MULTIPLY_DIVIDE_SYNC is set.
372 *
373 * Possible status values returned are:
374 * NV_OK
375 * NV_ERR_GENERIC
376 * NV_ERR_INVALID_ARGUMENT
377 */
378
379#define NV30F1_CTRL_CMD_GSYNC_GET_CAPS (0x30f10105) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CAPS_PARAMS_MESSAGE_ID" */
380
381#define NV30F1_CTRL_GSYNC_GET_CAPS_PARAMS_MESSAGE_ID (0x5U)
382
383typedef struct NV30F1_CTRL_GSYNC_GET_CAPS_PARAMS {
384 NvU32 revId;
385 NvU32 boardId;
386 NvU32 minRevRequired;
387 NvBool isFirmwareRevMismatch;
388 NvU32 revision;
389 NvU32 extendedRevision;
390 NvU32 capFlags;
391 NvU32 maxSyncSkew;
392 NvU32 syncSkewResolution;
393 NvU32 maxStartDelay;
394 NvU32 startDelayResolution;
395 NvU32 maxSyncInterval;
396 NvU32 maxMulDivValue;
397} NV30F1_CTRL_GSYNC_GET_CAPS_PARAMS;
398
399#define NV30F1_CTRL_GSYNC_GET_CAPS_BOARD_ID_P2060 (0x00002060)
400#define NV30F1_CTRL_GSYNC_GET_CAPS_BOARD_ID_P2061 (0x00002061)
401
402#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_FREQ_ACCURACY_2DPS (0x00000001)
403#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_FREQ_ACCURACY_3DPS (0x00000002)
404#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_FREQ_ACCURACY_4DPS (0x00000004)
405
406#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_NEED_MASTER_BARRIER_WAR (0x00000010)
407#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_MULTIPLY_DIVIDE_SYNC (0x00000020)
408
409#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_SYNC_LOCK_EVENT (0x10000000)
410#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_HOUSE_SYNC_EVENT (0x20000000)
411#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_FRAME_COUNT_EVENT (0x40000000)
412
413#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_ONLY_PRIMARY_CONNECTOR_EVENT (0x01000000)
414#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_ALL_CONNECTOR_EVENT (0x02000000)
415
416// For P2060, clients can only request for video modes at BNC connector
417// e.g. NO HS, TTL and Composite etc.
418#define NV30F1_CTRL_GSYNC_GET_CAPS_CAP_FLAGS_ONLY_GET_VIDEO_MODE (0x00100000)
419
420/*
421 * NV30F1_CTRL_CMD_GET_GSYNC_GPU_TOPOLOGY
422 *
423 * This command returns the list of GPU IDs connected with the associated
424 * gsync device.
425 *
426 * gpus
427 * This array is set by RM to contain the gpu connection information
428 * for gpus attached to the gsync device. Valid entries are contiguous,
429 * beginning with the first entry in the list. The elements of this array contain
430 * the following fields:
431 * gpuId
432 * This field contains the ID of the connected GPU. If the entry in the
433 * table is invalid, this fields contains NV30F1_CTRL_GPU_INVALID_ID.
434 * connector
435 * This field indicates which connector on the device the GPU is connected
436 * to (i.e. the primary or secondary connector), if any.
437 * proxyGpuId
438 * If the 'connector' field indicates that the GPU is not connected to
439 * a G-Sync device directly, then this field contains the ID of the
440 * GPU that acts as a proxy, i.e. the GPU to which this GPU should be
441 * a RasterLock slave.
442 * connectorCount
443 * This parameter indicates the number of GPU connectors available on
444 * the gsync device. The connector count of the gsync device may be
445 * less than NV30F1_CTRL_MAX_GPUS_PER_GSYNC.
446 *
447 * Possible status values returned are:
448 * NV_OK
449 * NV_ERR_INVALID_PARAM_STRUCT
450 */
451#define NV30F1_CTRL_CMD_GET_GSYNC_GPU_TOPOLOGY (0x30f10106) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_PARAMS_MESSAGE_ID" */
452
453#define NV30F1_CTRL_MAX_GPUS_PER_GSYNC 4
454#define NV30F1_CTRL_GPU_INVALID_ID (0xffffffff)
455
456#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_PARAMS_MESSAGE_ID (0x6U)
457
458typedef struct NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_PARAMS {
459 struct {
460 NvU32 gpuId;
461 NvU32 connector;
462 NvU32 proxyGpuId;
463 } gpus[NV30F1_CTRL_MAX_GPUS_PER_GSYNC];
464 NvU32 connectorCount;
465} NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_PARAMS;
466
467/*
468 * connector values
469 *
470 */
471#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_ONE 1
472#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_TWO 2
473#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_THREE 3
474#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_FOUR 4
475
476#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_NONE 0
477#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_PRIMARY NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_ONE
478#define NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_SECONDARY NV30F1_CTRL_GET_GSYNC_GPU_TOPOLOGY_TWO
479
480
481
482
483/*
484 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_SYNC
485 *
486 * This command enables frame sync on displays.
487 *
488 * gpuId
489 * The parameter is set by the client to indicate the gpuId on which
490 * frame lock will be enabled.
491 * master
492 * This parameter is set by the client to specify whether this/these
493 * displays should be set as the master or as slaves. If this is a GET
494 * and displays is not 0, this will be set by the RM to indicate if
495 * the display can be the master.
496 * displays
497 * This is a device mask set by the client to indicate which display(s)
498 * are to be synched. Note that only one display may be set as master.
499 * If this is a GET, this set by the client to indicate which display
500 * is to be queried. If the display cannot be synched to this device,
501 * the RM will overwrite the mask with a 0.
502 * validateExternal
503 * This parameter is set by the client to tell the RM to validate the
504 * presence of an external sync source when enabling a master.
505 * refresh
506 * This parameter is set by the client to indicate the desired refresh rate
507 * The value is in 0.0001 Hertz (i.e. it has been multiplied by 10000).
508 * configFlags
509 * contains flags for specific options. So far only
510 * NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_CONFIG_FLAGS_KEEP_MASTER_SWAPBARRIER_DISABLED
511 * is supported which allows the caller to prevent the rm code to automatically
512 * enable the swapbarrier on framelock masters on fpga revisions <= 5.
513 *
514 * Possible status values returned are:
515 * NV_OK
516 * NV_ERR_GENERIC
517 * NV_ERR_INVALID_ARGUMENT
518 *
519 */
520#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_SYNC (0x30f10110) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_PARAMS_MESSAGE_ID" */
521
522#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_SYNC (0x30f10111) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_PARAMS_MESSAGE_ID" */
523
524// If set the swapbarrier is not enable automatically when enablign a framelock master on fpga revs <= 5.
525#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_CONFIG_FLAGS_KEEP_MASTER_SWAPBARRIER_DISABLED (0x00000001)
526
527typedef struct NV30F1_CTRL_GSYNC_CONTROL_SYNC_PARAMS {
528 NvU32 gpuId;
529 NvU32 master;
530 NvU32 displays;
531 NvU32 validateExternal;
532 NvU32 refresh;
533 NvU32 configFlags;
534} NV30F1_CTRL_GSYNC_CONTROL_SYNC_PARAMS;
535
536#define NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_PARAMS_MESSAGE_ID (0x10U)
537
538typedef NV30F1_CTRL_GSYNC_CONTROL_SYNC_PARAMS NV30F1_CTRL_GSYNC_GET_CONTROL_SYNC_PARAMS;
539
540#define NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_PARAMS_MESSAGE_ID (0x11U)
541
542typedef NV30F1_CTRL_GSYNC_CONTROL_SYNC_PARAMS NV30F1_CTRL_GSYNC_SET_CONTROL_SYNC_PARAMS;
543
544/*
545 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_UNSYNC
546 *
547 * This command disables frame sync on displays
548 *
549 * gpuId
550 * The parameter is set by the client to indicate the gpuId on which
551 * frame lock will be disabled.
552 * master
553 * This parameter is set by the client to specify whether this/these
554 * display(s) to be unset is a master/are slaves.
555 * displays
556 * This is a device mask set by the client to indicate which display(s)
557 * are to be unsynched.
558 * retainMaster
559 * Retain the designation as master, but unsync the displays.
560 *
561 * Possible status values returned are:
562 * NV_OK
563 * NV_ERR_GENERIC
564 * NV_ERR_INVALID_ARGUMENT
565 */
566#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_UNSYNC (0x30f10112) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_UNSYNC_PARAMS_MESSAGE_ID" */
567
568#define NV30F1_CTRL_GSYNC_SET_CONTROL_UNSYNC_PARAMS_MESSAGE_ID (0x12U)
569
570typedef struct NV30F1_CTRL_GSYNC_SET_CONTROL_UNSYNC_PARAMS {
571 NvU32 gpuId;
572 NvU32 master;
573 NvU32 displays;
574 NvU32 retainMaster;
575} NV30F1_CTRL_GSYNC_SET_CONTROL_UNSYNC_PARAMS;
576
577/*
578 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SYNC
579 *
580 * This command gets the sync state for the gpus attached to the
581 * framelock device. Note that the frame lock device only has
582 * knowledge of sync status at the gpu level, not the display
583 * device level.
584 *
585 * gpuId
586 * The parameter is set by the client to indicate which gpuId is to be
587 * queried.
588 * bTiming
589 * This parameter is set by the RM to indicate that timing on the GPU is
590 * in sync with the master sync signal.
591 * bStereoSync
592 * This parameter is set by the RM to indicate whether the phase of the
593 * timing signal coming from the GPU is the same as the phase of the
594 * master sync signal.
595 * bSyncReady
596 * This parameter is set by the RM to indicate if a sync signal has
597 * been detected.
598 *
599 *
600 * Possible status values returned are:
601 * NV_OK
602 * NV_ERR_GENERIC
603 * NV_ERR_INVALID_ARGUMENT
604 *
605 */
606
607#define NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SYNC (0x30f10113) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_PARAMS_MESSAGE_ID" */
608
609#define NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_PARAMS_MESSAGE_ID (0x13U)
610
611typedef struct NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_PARAMS {
612 NvU32 gpuId;
613 NvU32 bTiming;
614 NvU32 bStereoSync;
615 NvU32 bSyncReady;
616} NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_PARAMS;
617
618
619/*
620 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS
621 *
622 * This command gets status information for the frame lock device
623 * relevant to a control panel.
624 *
625 * which
626 * This is a mask set by the client describing which of the other
627 * parameters we should collect status information for.
628 * bLeadingEdge
629 * This parameter is set by the RM to indicate that the gsync device is
630 * set to sync to the leading edge of a house sync signal. Note that
631 * this does not mean that house sync is the signal source.
632 * bFallingEdge
633 * This parameter is set by the RM to indicate that the gsync device is
634 * set to sync to the falling edge of a house sync signal. Note that
635 * this does not mean that house sync is the signal source.
636 * syncDelay
637 * This parameter is set by the RM to indicate the sync delay in
638 * microseconds,
639 * refresh
640 * This parameter is set by the RM to indicate the rate of frame sync pulse in
641 * 0.0001 Hertz (i.e. it has been multiplied by 10000). This is not the refresh
642 * rate of display device. This is same as incoming house sync rate if
643 * framelocked to an external house sync signal. Otherwise, this is same
644 * as the refresh rate of the master display device.
645 * houseSyncIncomming
646 * This parameter is set by the RM to indicate the rate of an incomming
647 * house sync signal in 0.0001 Hertz (i.e. it has been multiplied by 10000).
648 * syncInterval
649 * This parameter is set by the RM to indicate the number of incoming
650 * sync pulses to wait before the generation of the frame sync pulse.
651 * bSyncReady
652 * This paramater is set by the RM to indicate if a sync signal has
653 * been detected (this parameter is also available from the
654 * NV30F1_CTRL_CMD_GSYNC_GET_STATUS_SYNC method).
655 * bSwapReady
656 * This paramater is set by the RM to indicate if the hardware is
657 * ready to swap.
658 * bHouseSync
659 * This parameter is set by the RM to indicate that a house sync signal
660 * should be used as the source signal if it is available.
661 * bPort0Input
662 * This parameter is set by the RM to indicate that RJ45 port 0 is
663 * configured as an input.
664 * bPort1Input
665 * This parameter is set by the RM to indicate that RJ45 port 1 is
666 * configured as an input
667 * bPort0Ehternet
668 * This parameter is set by the RM to indicate that RJ45 port 0 has
669 * been connected to an ethernet hub (this is not the right thing to do).
670 * bPort1Ehternet
671 * This parameter is set by the RM to indicate that RJ45 port 1 has
672 * been connected to an ethernet hub (this is not the right thing to do).
673 * universalFrameCount
674 * This parameter is set by the RM to indicate the value of the
675 * Universal frame counter.
676 * bInternalSlave
677 * This parameter is set by the RM to indicate that a p2061 has been
678 * configured as internal slave.
679 *
680 * Possible status values returned are:
681 * NV_OK
682 * NV_ERR_GENERIC
683 * NV_ERR_INVALID_ARGUMENT
684 *
685 */
686#define NV30F1_CTRL_CMD_GSYNC_GET_STATUS (0x30f10114) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_STATUS_PARAMS_MESSAGE_ID" */
687
688#define NV30F1_CTRL_GSYNC_GET_STATUS_PARAMS_MESSAGE_ID (0x14U)
689
690typedef struct NV30F1_CTRL_GSYNC_GET_STATUS_PARAMS {
691 NvU32 which;
692 NvU32 bLeadingEdge;
693 NvU32 bFallingEdge;
694 NvU32 syncDelay;
695 NvU32 refresh;
696 NvU32 houseSyncIncoming;
697 NvU32 syncInterval;
698 NvU32 bSyncReady;
699 NvU32 bSwapReady;
700 NvU32 bHouseSync;
701 NvU32 bPort0Input;
702 NvU32 bPort1Input;
703 NvU32 bPort0Ethernet;
704 NvU32 bPort1Ethernet;
705 NvU32 universalFrameCount;
706 NvU32 bInternalSlave;
707} NV30F1_CTRL_GSYNC_GET_STATUS_PARAMS;
708
709/*
710 * which values
711 *
712 */
713
714#define NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_POLARITY (0x00000001)
715#define NV30F1_CTRL_GSYNC_GET_STATUS_LEADING_EDGE (0x00000001)
716#define NV30F1_CTRL_GSYNC_GET_STATUS_FALLING_EDGE (0x00000001)
717#define NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_DELAY (0x00000002)
718#define NV30F1_CTRL_GSYNC_GET_STATUS_REFRESH (0x00000004)
719#define NV30F1_CTRL_GSYNC_GET_STATUS_HOUSE_SYNC_INCOMING (0x00000008)
720#define NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_INTERVAL (0x00000010)
721#define NV30F1_CTRL_GSYNC_GET_STATUS_SYNC_READY (0x00000020)
722#define NV30F1_CTRL_GSYNC_GET_STATUS_SWAP_READY (0x00000040)
723#define NV30F1_CTRL_GSYNC_GET_STATUS_TIMING (0x00000080)
724#define NV30F1_CTRL_GSYNC_GET_STATUS_STEREO_SYNC (0x00000100)
725#define NV30F1_CTRL_GSYNC_GET_STATUS_HOUSE_SYNC (0x00000200)
726#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT_INPUT (0x00000400)
727#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT0_INPUT (0x00000400)
728#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT1_INPUT (0x00000400)
729#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT_ETHERNET (0x00000800)
730#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT0_ETHERNET (0x00000800)
731#define NV30F1_CTRL_GSYNC_GET_STATUS_PORT1_ETHERNET (0x00000800)
732#define NV30F1_CTRL_GSYNC_GET_STATUS_UNIVERSAL_FRAME_COUNT (0x00001000)
733#define NV30F1_CTRL_GSYNC_GET_STATUS_INTERNAL_SLAVE (0x00002000)
734
735/*
736 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_TESTING
737 *
738 * This command controls the test signal on the gsync device.
739 *
740 * bEmitTestSignal
741 * This parameter is set by the client to emit or stop emitting the test
742 * signal.
743 *
744 * Possible status values returned are:
745 * NV_OK
746 * NV_ERR_GENERIC
747 * NV_ERR_INVALID_ARGUMENT
748 */
749#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_TESTING (0x30f10120) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_TESTING_PARAMS_MESSAGE_ID" */
750
751#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_TESTING (0x30f10121) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_TESTING_PARAMS_MESSAGE_ID" */
752
753typedef struct NV30F1_CTRL_GSYNC_CONTROL_TESTING_PARAMS {
754 NvU32 bEmitTestSignal;
755} NV30F1_CTRL_GSYNC_CONTROL_TESTING_PARAMS;
756
757#define NV30F1_CTRL_GSYNC_GET_CONTROL_TESTING_PARAMS_MESSAGE_ID (0x20U)
758
759typedef NV30F1_CTRL_GSYNC_CONTROL_TESTING_PARAMS NV30F1_CTRL_GSYNC_GET_CONTROL_TESTING_PARAMS;
760
761#define NV30F1_CTRL_GSYNC_SET_CONTROL_TESTING_PARAMS_MESSAGE_ID (0x21U)
762
763typedef NV30F1_CTRL_GSYNC_CONTROL_TESTING_PARAMS NV30F1_CTRL_GSYNC_SET_CONTROL_TESTING_PARAMS;
764
765/*
766 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_WATCHDOG
767 *
768 * This command enables and disables the gsync watchdog
769 *
770 * enable
771 * This parameter is set by the client to enable or disable the
772 * gsync watchdog.
773 *
774 * Possible status values returned are:
775 * NV_OK
776 * NV_ERR_GENERIC
777 * NV_ERR_INVALID_ARGUMENT
778 */
779#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_WATCHDOG (0x30f10130) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_WATCHDOG_PARAMS_MESSAGE_ID" */
780
781#define NV30F1_CTRL_GSYNC_SET_CONTROL_WATCHDOG_PARAMS_MESSAGE_ID (0x30U)
782
783typedef struct NV30F1_CTRL_GSYNC_SET_CONTROL_WATCHDOG_PARAMS {
784 NvU32 enable;
785} NV30F1_CTRL_GSYNC_SET_CONTROL_WATCHDOG_PARAMS;
786
787
788/*
789 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_INTERLACE_MODE
790 *
791 * This command enables or disables interlace mode.
792 *
793 * enable
794 * This parameter is set by the client to enable or disable
795 * interlace mode
796 *
797 * Possible status values returned are:
798 * NV_OK
799 * NV_ERR_GENERIC
800 * NV_ERR_INVALID_ARGUMENT
801 *
802 */
803#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_INTERLACE_MODE (0x30f10140) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_INTERLACE_MODE_PARAMS_MESSAGE_ID" */
804
805#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_INTERLACE_MODE (0x30f10141) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_INTERLACE_MODE_PARAMS_MESSAGE_ID" */
806
807typedef struct NV30F1_CTRL_GSYNC_CONTROL_INTERLACE_MODE_PARAMS {
808 NvU32 enable;
809} NV30F1_CTRL_GSYNC_CONTROL_INTERLACE_MODE_PARAMS;
810
811#define NV30F1_CTRL_GSYNC_GET_CONTROL_INTERLACE_MODE_PARAMS_MESSAGE_ID (0x40U)
812
813typedef NV30F1_CTRL_GSYNC_CONTROL_INTERLACE_MODE_PARAMS NV30F1_CTRL_GSYNC_GET_CONTROL_INTERLACE_MODE_PARAMS;
814
815#define NV30F1_CTRL_GSYNC_SET_CONTROL_INTERLACE_MODE_PARAMS_MESSAGE_ID (0x41U)
816
817typedef NV30F1_CTRL_GSYNC_CONTROL_INTERLACE_MODE_PARAMS NV30F1_CTRL_GSYNC_SET_CONTROL_INTERLACE_MODE_PARAMS;
818
819/*
820 *
821 * NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_SWAP_BARRIER
822 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_SWAP_BARRIER
823 *
824 * These commands enables or disables the swap barrier
825 * connection between a GPU and the rest of the gsync
826 * network
827 *
828 * gpuId
829 * The parameter is set by the client to indicate which gpuId is to be
830 * queried.
831 * enable
832 * In a set command, this parameter is set by the client to
833 * indicate if the barrier should be enabled (i.e. connected
834 * to the rest of the network) or disabled (disconnected).
835 * In both a set and a get command, if successful, the RM
836 * uses this parameter to return the current (i.e. post-set)
837 * value.
838 *
839 * Possible status values returned are:
840 * NV_OK
841 * NV_ERR_GENERIC
842 * NV_ERR_INVALID_ARGUMENT
843 *
844 */
845#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_SWAP_BARRIER (0x30f10150) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_BARRIER_PARAMS_MESSAGE_ID" */
846
847#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_SWAP_BARRIER (0x30f10151) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_CONTROL_SWAP_BARRIER_PARAMS_MESSAGE_ID" */
848
849typedef struct NV30F1_CTRL_GSYNC_CONTROL_SWAP_BARRIER_PARAMS {
850 NvU32 gpuId;
851 NvBool enable;
852} NV30F1_CTRL_GSYNC_CONTROL_SWAP_BARRIER_PARAMS;
853
854#define NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_BARRIER_PARAMS_MESSAGE_ID (0x50U)
855
856typedef NV30F1_CTRL_GSYNC_CONTROL_SWAP_BARRIER_PARAMS NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_BARRIER_PARAMS;
857
858#define NV30F1_CTRL_GSYNC_SET_CONTROL_SWAP_BARRIER_PARAMS_MESSAGE_ID (0x51U)
859
860typedef NV30F1_CTRL_GSYNC_CONTROL_SWAP_BARRIER_PARAMS NV30F1_CTRL_GSYNC_SET_CONTROL_SWAP_BARRIER_PARAMS;
861
862/*
863 * NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW
864 *
865 * This command allow clients to obtain time period for which SwapLock window will
866 * remain HIGH for GSYNC III (P2060) i.e. TswapRdyHi. RM clients will use this value
867 * for programming SWAP_LOCKOUT_START on all heads of GPU connected to P2060.
868 *
869 * tSwapRdyHi
870 * RM will return swap lock window High time period in this variable. By default
871 * tSwapRdyHi is 250 micro seconds. RM also provide regkey to change this value.
872 * tSwapRdyHi also used by RM to configure value of LSR_MIN_TIME while programming
873 * swap barrier.
874 * Client should consider tSwapRdyHi only for Gsync III (P2060) network.
875 *
876 * Possible status values returned are:
877 * NV_OK
878 * NV_ERR_GENERIC
879 */
880#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW (0x30f10153) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW_PARAMS_MESSAGE_ID" */
881
882#define NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW_PARAMS_MESSAGE_ID (0x53U)
883
884typedef struct NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW_PARAMS {
885 NvU32 tSwapRdyHi;
886} NV30F1_CTRL_GSYNC_GET_CONTROL_SWAP_LOCK_WINDOW_PARAMS;
887
888
889/*
890 * NV30F1_CTRL_CMD_GSYNC_GET_OPTIMIZED_TIMING
891 *
892 * This command allows the client to obtain suggested
893 * adjustments to vertical and horizontal timing values
894 * that will improve the ability of gsync to lock.
895 *
896 * gpuId
897 * This parameter is set by the client to indicate the
898 * gpuId of the GPU to which the display to be optimized
899 * is attached.
900 * output
901 * This parameter is set by the client to indicate the
902 * output resource type of the display to be optimized.
903 * For example, CRTs use DAC output, while DFPs use SOR
904 * (Serial Output Resource) type.
905 * protocol
906 * This parameter is set by the client to indicate the
907 * data protocol of output resource. For DAC displays,
908 * the format of the standard mode most closely matching
909 * the desired mode is used. For SOR display devices,
910 * the LVDS/TMDS/etc format is the protocol.
911 * structure
912 * This parameter is set by the client to indicate the
913 * raster structure of the mode, either progressive or
914 * interlaced. Diagrams of the raster structures are
915 * provided below.
916 * adjust
917 * This parameter is set by the client to specify which
918 * of the timing values, other than hTotal and vTotal,
919 * may be adjusted during optimization.
920 * If the client does not obtain instructions from the
921 * user about where adjustments should be applied, safe
922 * default values for progressive/interlaced modes are
923 * provided below.
924 * hTotal
925 * This parameter is set by the client to specify the
926 * initial Horizontal Pixel Total, from which the
927 * RM will begin optimizing. The RM also uses the
928 * parameter to return the optimized value.
929 * vTotal
930 * This parameter is set by the client to specify the
931 * initial Vertical Pixel Total, from which the
932 * RM will begin optimizing. The RM also uses the
933 * parameter to return the optimized value.
934 * hBlankStart
935 * This parameter is set by the client to specify the
936 * initial Horizontal Blanking Start, from which the
937 * RM will begin optimizing. The RM also uses the
938 * parameter to return the optimized value.
939 * vBlankStart
940 * This parameter is set by the client to specify the
941 * initial Vertical Blanking Start, from which the
942 * RM will begin optimizing. The RM also uses the
943 * parameter to return the optimized value.
944 * hBlankEnd
945 * This parameter is set by the client to specify the
946 * initial Horizontal Blanking End, from which the
947 * RM will begin optimizing. The RM also uses the
948 * parameter to return the optimized value.
949 * vBlankEnd
950 * This parameter is set by the client to specify the
951 * initial Vertical Blanking End, from which the
952 * RM will begin optimizing. The RM also uses the
953 * parameter to return the optimized value.
954 * vInterlacedBlankStart
955 * This parameter is set by the client to specify the
956 * initial Interlaced Vertical Blanking Start, from
957 * which the RM will begin optimizing. The RM will
958 * ignore this parameter for non-interlaced modes, as
959 * it has no meaning in those modes. In modes where
960 * it is meaningful, the RM also uses the parameter
961 * to return the optimized value.
962 * vInterlacedBlankEnd
963 * This parameter is set by the client to specify the
964 * initial Interlaced Vertical Blanking End, from
965 * which the RM will begin optimizing. The RM will
966 * ignore this parameter for non-interlaced modes, as
967 * it has no meaning in those modes. In modes where
968 * it is meaningful, the RM also uses the parameter
969 * to return the optimized value.
970 * hSyncEnd
971 * This parameter is set by the client to specify the
972 * initial Horizontal Raster Sync End, from which the
973 * RM will begin optimizing. The RM also uses the
974 * parameter to return the optimized value.
975 * vSyncEnd
976 * This parameter is set by the client to specify the
977 * initial Vertical Raster Sync End, from which the
978 * RM will begin optimizing. The RM also uses the
979 * parameter to return the optimized value.
980 * hDeltaStep
981 * This parameter is set by the client to specify the
982 * increments by which the Horizontal Pixel Total may
983 * be adjusted by the RM, during optimization.
984 * If the client does not obtain a custom value for
985 * this parameter from the user, setting all four of
986 * hDeltaStep, vDeltaStep, hDeltaMax, and vDeltaMax
987 * to zero will result in a safe default for all four.
988 * vDeltaStep
989 * This parameter is set by the client to specify the
990 * increments by which the vertical timings of each
991 * frame (in interlaced modes, each field) may be
992 * adjusted by the RM, during optimization.
993 * In interlaced modes, the adjustments to vTotal,
994 * vInterlacedBlankStart, and vInterlacedBlankEnd may
995 * be in increments of vDeltaStep or twice vDeltaStep,
996 * depending on where adjustments are made.
997 * In progressive modes, the adjustment to the vTotal
998 * will simply be in increments of vDeltaStep.
999 * If the client does not obtain a custom value for
1000 * this parameter from the user, setting all four of
1001 * hDeltaStep, vDeltaStep, hDeltaMax, and vDeltaMax
1002 * to zero will result in a safe default for all four.
1003 * hDeltaMax
1004 * This parameter is set by the client to specify the
1005 * maximum amount that the Horizontal Pixel Total may
1006 * be adjusted by the RM, during optimization.
1007 * If the client does not obtain a custom value for
1008 * this parameter from the user, setting all four of
1009 * hDeltaStep, vDeltaStep, hDeltaMax, and vDeltaMax
1010 * to zero will result in a safe default for all four.
1011 * vDeltaMax
1012 * This parameter is set by the client to specify the
1013 * maximum amount that vertical timings of each frame
1014 * (in interlaced modes, each field) may be adjusted
1015 * by the RM, during optimization.
1016 * In interlaced modes, the adjustments to vTotal,
1017 * vInterlacedBlankStart, and vInterlacedBlankEnd may
1018 * be up to twice vDeltaMax.
1019 * In progressive modes, the adjustment to the vTotal
1020 * may simply be up to vDeltaMax.
1021 * If the client does not obtain a custom value for
1022 * this parameter from the user, setting all four of
1023 * hDeltaStep, vDeltaStep, hDeltaMax, and vDeltaMax
1024 * to zero will result in a safe default for all four.
1025 * refreshX10K
1026 * This parameter is set by the client to specify the
1027 * desired refresh rate, multiplied by 10000. This
1028 * allows refresh rate to be set in units of 0.0001 Hz.
1029 * For example, a 59.94 Hz rate would be set as 599400.
1030 * The client can alternatively specify a the
1031 * pixelClockHz parameter (if the passed in refreshX10K
1032 * parameter is set to 0, the pixelClockHz parameter
1033 * will be used).
1034 * pixelClockHz
1035 * This parameter is set by the client to specify the
1036 * desired pixel clock frequency in units of Hz. The
1037 * client can alternatively specify the refreshX10K parameter.
1038 * This parameter is returned by the RM to report the
1039 * optimal pixel clock to use with the adjusted mode,
1040 * in units of Hz.
1041 *
1042 *
1043 * bOptimized[out]
1044 * This is set to NV_TRUE if the timings were successfully optimized, and
1045 * NV_FALSE otherwise.
1046 *
1047 *
1048 * Progressive Raster Structure
1049 *
1050 * hSyncEnd hTotal
1051 * 0 | hBlankEnd hBlankStart |
1052 * | | | | | vSync vBlank
1053 * 0--+--------------------------------------------+ +-+ |
1054 * | Sync | | |
1055 * vSyncEnd--| +----------------------------------------+ +-+ |
1056 * | | Back Porch | | |
1057 * vBlankEnd--| | +--------------------------------+ | | +-+
1058 * | | | Active Area | | | |
1059 * | | | +------------------------+ | | | |
1060 * | | | | | | | | |
1061 * | S | B | A | | A | F | | |
1062 * | y | a | c | | c | r | | |
1063 * | n | c | t | | t | o | | |
1064 * | c | k | i | | i | n | | |
1065 * | | | v | | v | t | | |
1066 * | | P | e | Output Viewport | e | | | |
1067 * | | o | | | | P | | |
1068 * | | r | A | | A | o | | |
1069 * | | c | r | | r | r | | |
1070 * | | h | e | | e | c | | |
1071 * | | | a | | a | h | | |
1072 * | | | | | | | | |
1073 * | | | +------------------------+ | | | |
1074 * | | | Active Area | | | |
1075 * vBlankStart-| | +--------------------------------+ | | +-+
1076 * | | Front Porch | | |
1077 * vTotal--+---+----------------------------------------+ +-+ |
1078 * ___
1079 * / \________________________________________/ hSync
1080 * ________ ____
1081 * \________________________________/ hBlank
1082 *
1083 *
1084 *
1085 * Interlaced Raster Structure
1086 *
1087 * hSyncEnd hTotal
1088 * 0 | hBlankEnd hBlankStart |
1089 * | | | | | vSync vBlank
1090 * 0--+--------------------------------------------+ +-+ |
1091 * | Sync | | |
1092 * vSyncEnd--| +----------------------------------------+ +-+ |
1093 * | | Back Porch | | |
1094 * vBlankEnd--| | +--------------------------------+ | | +-+
1095 * | | | Active Area | | | |
1096 * | | | +------------------------+ | | | |
1097 * | | | | | | | | |
1098 * | S | B | A | | A | F | | |
1099 * | y | a | c | | c | r | | |
1100 * | n | c | t | | t | o | | |
1101 * | c | k | i | | i | n | | |
1102 * | | | v | | v | t | | |
1103 * | | P | e | Output Viewport | e | | | |
1104 * | | o | | | | P | | |
1105 * | | r | A | | A | o | | |
1106 * | | c | r | | r | r | | |
1107 * | | h | e | | e | c | | |
1108 * | | | a | | a | h | | |
1109 * | | | | | | | | |
1110 * | | | +------------------------+ | | | |
1111 * | | | Active Area | | | |
1112 * vBlankStart-| | +--------------------------------+ | | +-+
1113 * | | | | |
1114 * | | Front Porch +--------------------+ | |
1115 * | | | | +-+ |
1116 * | +-------------------+ | | |
1117 * | | | |
1118 * | Sync +--------------------+ | |
1119 * | | | +-+ |
1120 * | +-------------------+ | | |
1121 * vInterlaced | | Back Porch | | |
1122 * BlankEnd--| | +--------------------------------+ | | +-+
1123 * | | | Active Area | | | |
1124 * | | | +------------------------+ | | | |
1125 * | | | | | | | | |
1126 * | S | B | A | | A | F | | |
1127 * | y | a | c | | c | r | | |
1128 * | n | c | t | | t | o | | |
1129 * | c | k | i | | i | n | | |
1130 * | | | v | | v | t | | |
1131 * | | P | e | Output Viewport | e | | | |
1132 * | | o | | | | P | | |
1133 * | | r | A | | A | o | | |
1134 * | | c | r | | r | r | | |
1135 * | | h | e | | e | c | | |
1136 * | | | a | | a | h | | |
1137 * | | | | | | | | |
1138 * | | | +------------------------+ | | | |
1139 * vInterlaced | | | Active Area | | | |
1140 * BlankStart-| | +--------------------------------+ | | +-+
1141 * | | Front Porch | | |
1142 * vTotal--+---+----------------------------------------+ +-+ |
1143 * ___
1144 * / \________________________________________/ hSync
1145 * ________ ____
1146 * \________________________________/ hBlank
1147 *
1148 * Possible status values returned are:
1149 * NV_OK
1150 * NV_ERR_GENERIC
1151 * NV_ERR_INVALID_ARGUMENT
1152 *
1153*/
1154
1155#define NV30F1_CTRL_CMD_GSYNC_GET_OPTIMIZED_TIMING (0x30f10160) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PARAMS_MESSAGE_ID" */
1156
1157#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PARAMS_MESSAGE_ID (0x60U)
1158
1159typedef struct NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PARAMS {
1160 NvU32 gpuId;
1161 NvU32 output;
1162 NvU32 protocol;
1163 NvU32 structure;
1164 NvU32 adjust;
1165 NvU32 hDeltaStep;
1166 NvU32 hDeltaMax;
1167 NvU32 vDeltaStep;
1168 NvU32 vDeltaMax;
1169 NvU32 hSyncEnd;
1170 NvU32 hBlankEnd;
1171 NvU32 hBlankStart;
1172 NvU32 hTotal;
1173 NvU32 vSyncEnd;
1174 NvU32 vBlankEnd;
1175 NvU32 vBlankStart;
1176 NvU32 vInterlacedBlankEnd;
1177 NvU32 vInterlacedBlankStart;
1178 NvU32 vTotal;
1179 NvU32 refreshX10K;
1180 NV_DECLARE_ALIGNED(NvU64 pixelClockHz, 8);
1181
1182 NvBool bOptimized;
1183} NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PARAMS;
1184
1185/* output values */
1186#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_OUTPUT_DAC (0x00000001)
1187#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_OUTPUT_SOR (0x00000004)
1188
1189/* protocol values for DAC displays (e.g. CRTs) */
1190#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_DAC_RGB_CRT (0x00000000)
1191
1192/* protocol values for SOR displays (e.g. DFPs) */
1193#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_LVDS_CUSTOM (0x00000000)
1194#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_SINGLE_TMDS_A (0x00000001)
1195#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_SINGLE_TMDS_B (0x00000002)
1196#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_DUAL_TMDS (0x00000005)
1197#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_DP_A (0x00000008)
1198#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_DP_B (0x00000009)
1199#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_PROTOCOL_SOR_HDMI_FRL (0x0000000C)
1200
1201/* structure values */
1202#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_STRUCTURE_PROGRESSIVE (0x00000000)
1203#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_STRUCTURE_INTERLACED (0x00000001)
1204
1205/* adjust values */
1206#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_H_FRONT_PORCH (0x00000001)
1207#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_V_FRONT_PORCH (0x00000002)
1208#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_H_ACTIVE_AREA (0x00000004)
1209#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_V_ACTIVE_AREA (0x00000008)
1210#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_H_BACK_PORCH (0x00000010)
1211#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_V_BACK_PORCH (0x00000020)
1212#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_H_RASTER_SYNC (0x00000040)
1213#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_V_RASTER_SYNC (0x00000080)
1214
1215#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_DEFAULT_CRT (0x00000030)
1216#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_ADJUST_DEFAULT_DFP (0x00000020)
1217
1218/* DeltaStep and DeltaMax values to trigger default settings */
1219#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_H_DELTA_STEP_USE_DEFAULTS (0x00000000)
1220#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_H_DELTA_MAX_USE_DEFAULTS (0x00000000)
1221#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_V_DELTA_STEP_USE_DEFAULTS (0x00000000)
1222#define NV30F1_CTRL_GSYNC_GET_OPTIMIZED_TIMING_V_DELTA_MAX_USE_DEFAULTS (0x00000000)
1223
1224/*
1225 * NV30F1_CTRL_CMD_GSYNC_SET_EVENT_NOTIFICATION
1226 *
1227 * This command sets event notification state for the associated Gsync
1228 * object. This command requires that an instance of NV01_EVENT has
1229 * been previously bound to the associated Gsync object.
1230 *
1231 * If one or more of the "smart event notification" options are set in the
1232 * action parameter, multiple sequential events of the same type will only
1233 * trigger one notification. After that, only an event of a different type
1234 * will trigger a new notification.
1235 *
1236 * action
1237 * This member specifies the desired event notification action.
1238 * Valid notification actions include:
1239 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_DISABLE
1240 * This action disables event notification for the associated
1241 * Gsync object.
1242 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_SYNC_LOSS
1243 * This action enables smart event notification for the
1244 * associated Gsync object, for "sync loss" events.
1245 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_SYNC_GAIN
1246 * This action enables smart event notification for the
1247 * associated Gsync object, for "sync gained" events.
1248 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_STEREO_LOSS
1249 * This action enables smart event notification for the
1250 * associated Gsync object, for "stereo lost" events.
1251 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_STEREO_GAIN
1252 * This action enables smart event notification for the
1253 * associated Gsync object, for "stereo gained" events.
1254 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_HOUSE_GAIN
1255 * This action enables smart event notification for the
1256 * associated Gsync object, for "house sync (BNC) plug in" events.
1257 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_HOUSE_LOSS
1258 * This action enables smart event notification for the
1259 * associated Gsync object, for "house sync (BNC) plug out" events.
1260 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_RJ45_GAIN
1261 * This action enables smart event notification for the
1262 * associated Gsync object, for "ethernet (RJ45) plug in" events.
1263 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_RJ45_LOSS
1264 * This action enables smart event notification for the
1265 * associated Gsync object, for "ethernet (RJ45) plug out" events.
1266 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_COUNT_MATCH
1267 * This action enables smart event notification for the
1268 * associated Gsync object, for "frame counter match" events.
1269 * NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_ALL
1270 * This action enables smart event notification for the
1271 * associated Gsync object, for any type of event.
1272 *
1273 * Possible status values returned are:
1274 * NV_OK
1275 * NV_ERR_INVALID_PARAM_STRUCT
1276 * NV_ERR_INVALID_ARGUMENT
1277 * NV_ERR_INVALID_STATE
1278 */
1279#define NV30F1_CTRL_CMD_GSYNC_SET_EVENT_NOTIFICATION (0x30f10170) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_PARAMS_MESSAGE_ID" */
1280
1281#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_PARAMS_MESSAGE_ID (0x70U)
1282
1283typedef struct NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_PARAMS {
1284 NvU32 action;
1285} NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_PARAMS;
1286
1287/* valid action values */
1288
1289#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_DISABLE (0x00000000)
1290#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_SYNC_LOSS (0x00000001)
1291#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_SYNC_GAIN (0x00000002)
1292#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_STEREO_LOSS (0x00000004)
1293#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_STEREO_GAIN (0x00000008)
1294#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_HOUSE_GAIN (0x00000010)
1295#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_HOUSE_LOSS (0x00000020)
1296#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_RJ45_GAIN (0x00000040)
1297#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_RJ45_LOSS (0x00000080)
1298#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_COUNT_MATCH (0x00000100)
1299#define NV30F1_CTRL_GSYNC_SET_EVENT_NOTIFICATION_ACTION_SMART_ALL (0x000001FF)
1300
1301#define NV30F1_CTRL_GSYNC_EVENT_TYPES 9
1302
1303/*
1304 * NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_STEREO_LOCK_MODE
1305 * NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_STEREO_LOCK_MODE
1306 *
1307 * These commands can be used to get/set the stereo lock assistance mode of
1308 * the GSYNC device. This is supported by GSYNC III device only.
1309 * 1] In this mode the GSYNC recreates the hidden VS either by ->
1310 * (a) using local stereo edge if stereo is toggle or
1311 * (b) counting lines and generate the missing VS.
1312 * 2] Master GSYNC card recreates the stereo and passes it along to
1313 * the slave GSYNC cards.
1314 * 3] Slave GSYNC cards generates the stereo raster sync structure to
1315 * synchronize the GPU.
1316 * 4] For stereo sync status reporting, under this mode, the GSYNC automatically
1317 * reports stereo lock whenever it gets the master stereo signal. The
1318 * assumption is local stereo will be in synced with the new structure.
1319 * 5] If the slave GSYNC card does not observed master stereo for any reason,
1320 * (a) it clears the stereo sync bit and
1321 * (b) it generates its own version of stereo and sync the GPU.
1322 *
1323 * Parameters:
1324 * gpuId
1325 * This parameter is set by the client to indicate the gpuId on which
1326 * the stereo lock mode should be enabled/disabled.
1327 *
1328 * enable
1329 * In SET query, this parameter is set by the client to indicate whether
1330 * RM should enable or disable stereo lock mode for GPU specified in gpuId.
1331 * 1 and 0 indicates enable and disable stereo lock mode respectively. In
1332 * GET query, RM will set this parameter to 1 or 0 depending on StereoLock
1333 * mode is enabled or not respectively for specified GPU.
1334 *
1335 * Possible status values returned are:
1336 * NV_OK
1337 * NV_ERR_GENERIC
1338 * NV_ERR_INVALID_ARGUMENT
1339 *
1340 */
1341#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_STEREO_LOCK_MODE (0x30f10172) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_STEREO_LOCK_MODE_PARAMS_MESSAGE_ID" */
1342
1343#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_STEREO_LOCK_MODE (0x30f10173) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_STEREO_LOCK_MODE_PARAMS_MESSAGE_ID" */
1344
1345typedef struct NV30F1_CTRL_CMD_GSYNC_CONTROL_STEREO_LOCK_MODE_PARAMS {
1346 NvU32 gpuId;
1347 NvU32 enable;
1348} NV30F1_CTRL_CMD_GSYNC_CONTROL_STEREO_LOCK_MODE_PARAMS;
1349
1350#define NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_STEREO_LOCK_MODE_PARAMS_MESSAGE_ID (0x72U)
1351
1352typedef NV30F1_CTRL_CMD_GSYNC_CONTROL_STEREO_LOCK_MODE_PARAMS NV30F1_CTRL_CMD_GSYNC_SET_CONTROL_STEREO_LOCK_MODE_PARAMS;
1353
1354#define NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_STEREO_LOCK_MODE_PARAMS_MESSAGE_ID (0x73U)
1355
1356typedef NV30F1_CTRL_CMD_GSYNC_CONTROL_STEREO_LOCK_MODE_PARAMS NV30F1_CTRL_CMD_GSYNC_GET_CONTROL_STEREO_LOCK_MODE_PARAMS;
1357
1358/*
1359 * NV30F1_CTRL_CMD_GSYNC_READ_REGISTER
1360 *
1361 * This command is used to read raw i2c registers from the gsync device, via
1362 * the given GPU (registers on the same gsync device may have different values
1363 * depending on which GPU is used to do the read).
1364 *
1365 * This may only be used by a privileged client.
1366 *
1367 * Parameters:
1368 * gpuId
1369 * This parameter is set by the client to specify which GPU to use to
1370 * perform the read.
1371 *
1372 * reg
1373 * This parameter is set by the client to specify which i2c register to
1374 * read.
1375 *
1376 * data
1377 * This parameter is written by the RM and returned to the client upon a
1378 * successful read.
1379 *
1380 * Possible status values returned are:
1381 * NV_OK
1382 * NV_ERR_GENERIC
1383 * NV_ERR_INVALID_ARGUMENT
1384 * NV_ERR_INSUFFICIENT_PERMISSIONS
1385 */
1386#define NV30F1_CTRL_CMD_GSYNC_READ_REGISTER (0x30f10180) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_READ_REGISTER_PARAMS_MESSAGE_ID" */
1387
1388#define NV30F1_CTRL_GSYNC_READ_REGISTER_PARAMS_MESSAGE_ID (0x80U)
1389
1390typedef struct NV30F1_CTRL_GSYNC_READ_REGISTER_PARAMS {
1391 NvU32 gpuId;
1392 NvU8 reg;
1393 NvU8 data;
1394} NV30F1_CTRL_GSYNC_READ_REGISTER_PARAMS;
1395
1396/*
1397 * NV30F1_CTRL_CMD_GSYNC_WRITE_REGISTER
1398 *
1399 * This command is used to write raw i2c registers on the gsync device, via the
1400 * given GPU (registers on the same gsync device may have different values
1401 * depending on which GPU is used to do the write).
1402 *
1403 * This may only be used by a privileged client.
1404 *
1405 * Parameters:
1406 * gpuId
1407 * This parameter is set by the client to specify which GPU to use to
1408 * perform the write.
1409 *
1410 * reg
1411 * This parameter is set by the client to specify which i2c register to
1412 * write.
1413 *
1414 * data
1415 * This parameter is set by the client to specify what data to write to the
1416 * given i2c register.
1417 *
1418 * Possible status values returned are:
1419 * NV_OK
1420 * NV_ERR_GENERIC
1421 * NV_ERR_INVALID_ARGUMENT
1422 * NV_ERR_INSUFFICIENT_PERMISSIONS
1423 */
1424
1425#define NV30F1_CTRL_CMD_GSYNC_WRITE_REGISTER (0x30f10181) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_WRITE_REGISTER_PARAMS_MESSAGE_ID" */
1426
1427#define NV30F1_CTRL_GSYNC_WRITE_REGISTER_PARAMS_MESSAGE_ID (0x81U)
1428
1429typedef struct NV30F1_CTRL_GSYNC_WRITE_REGISTER_PARAMS {
1430 NvU32 gpuId;
1431 NvU8 reg;
1432 NvU8 data;
1433} NV30F1_CTRL_GSYNC_WRITE_REGISTER_PARAMS;
1434
1435
1436
1437/*
1438 * NV30F1_CTRL_CMD_GSYNC_SET_LOCAL_SYNC
1439 *
1440 * This command enables/disables raster sync on displays i.e.
1441 * mosaic groups between gpus.
1442 *
1443 * gpuTimingSource
1444 * The parameter is set by the client to indicate the gpuId of the
1445 * Timing Source gpu for specified mosaic group.
1446 * gpuTimingSlaves[]
1447 * This parameter is set by the client to indicate the gpuIds of the
1448 * timing slave gpus for specified mosaic group. It should not contain
1449 * more gpuids than slaveGpuCount.
1450 * slaveGpuCount
1451 * This parameter is set by the client to indicate the count of timing
1452 * slave gpus under specified group.
1453 * Referring to gsync3-P2060, slaveGpuCount can vary from 0x01 to 0x03
1454 * as maximum possible connected gpus are four and one gpu must be
1455 * timing master for mosaic group.
1456 * mosaicGroupNumber
1457 * This parameter is set by the client to tell the RM to which mosaic
1458 * group it should refer.
1459 * Referring to gsync3-P2060, mosaicGroupNumber can contain 0x00 or
1460 * 0x01 as only two mosaic groups are possible.
1461 * enableMosaic
1462 * This parameter is set by the client to indicate RM that whether RM
1463 * should enable mosaic or disable mosaic.
1464 *
1465 * Possible status values returned are:
1466 * NV_OK
1467 * NV_ERR_GENERIC
1468 * NV_ERR_INVALID_ARGUMENT
1469 *
1470 */
1471#define NV30F1_CTRL_CMD_GSYNC_SET_LOCAL_SYNC (0x30f10185) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_LOCAL_SYNC_PARAMS_MESSAGE_ID" */
1472
1473#define NV30F1_CTRL_GSYNC_SET_LOCAL_SYNC_PARAMS_MESSAGE_ID (0x85U)
1474
1475typedef struct NV30F1_CTRL_GSYNC_SET_LOCAL_SYNC_PARAMS {
1476 NvU32 gpuTimingSource;
1477 NvU32 gpuTimingSlaves[NV30F1_CTRL_MAX_GPUS_PER_GSYNC];
1478 NvU32 slaveGpuCount;
1479 NvU32 mosaicGroupNumber;
1480 NvBool enableMosaic;
1481} NV30F1_CTRL_GSYNC_SET_LOCAL_SYNC_PARAMS;
1482
1483/*
1484 * NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH
1485 *
1486 * This command configure GSYNC registers for pre-flash and post-flash
1487 * operations. This is currenly used for GSYNC-3 (P2060) only. RM clients
1488 * has to make sure that they perform both pre-flash and post-flash
1489 * operations on GSYNC board. Avoiding, post-flash will cause mismatch
1490 * between RM cached-data and GSYNC register values.
1491 *
1492 * Parameters:
1493 * gpuId
1494 * This parameter is set by the client to indicate the gpuId for which
1495 * GSYNC board connected to that GPU will be configured for pre-flash
1496 * or post-flash operation depending on preFlash value.
1497 *
1498 * preFlash
1499 * This parameter is set by the client to indicate whether RM has to configure
1500 * GSYNC registers and SW state for pre-flash or post-flash operation. Values
1501 * 1 and 0 indicates that RM will configure GSYNC board for pre-flash and
1502 * post-flash operations respectively.
1503 *
1504 * Possible status values returned are:
1505 * NV_OK
1506 * NV_ERR_GENERIC
1507 * NV_ERR_INVALID_ARGUMENT
1508 *
1509 */
1510#define NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH (0x30f10186) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH_PARAMS_MESSAGE_ID" */
1511
1512#define NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH_PARAMS_MESSAGE_ID (0x86U)
1513
1514typedef struct NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH_PARAMS {
1515 NvU32 gpuId;
1516 NvU32 preFlash;
1517} NV30F1_CTRL_CMD_GSYNC_CONFIG_FLASH_PARAMS;
1518
1519/*
1520 * NV30F1_CTRL_CMD_GSYNC_GET_HOUSE_SYNC_MODE
1521 * NV30F1_CTRL_CMD_GSYNC_SET_HOUSE_SYNC_MODE
1522 *
1523 * These two commands gets/sets house sync mode as input or output.
1524 *
1525 * Parameters:
1526 * houseSyncMode
1527 * This parameter indicates whether the house sync mode is input or
1528 * output. For GET_HOUSE_SYNC_MODE, the current mode will be written
1529 * by RM and returned to the client; for SET_HOUSE_SYNC_MODE, the client
1530 * will write the new mode value to this parameter and pass it to RM
1531 * for execution.
1532 *
1533 * Possible status values returned are:
1534 * NV_OK
1535 * NV_ERR_GENERIC
1536 * NV_ERR_INVALID_ARGUMENT
1537 * NV_ERR_INVALID_DEVICE
1538 * NV_ERR_INVALID_STATE
1539 *
1540 */
1541#define NV30F1_CTRL_CMD_GSYNC_GET_HOUSE_SYNC_MODE (0x30f10187) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_GET_HOUSE_SYNC_MODE_PARAMS_MESSAGE_ID" */
1542
1543typedef struct NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_PARAMS {
1544 NvU8 houseSyncMode;
1545} NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_PARAMS;
1546
1547#define NV30F1_CTRL_GSYNC_GET_HOUSE_SYNC_MODE_PARAMS_MESSAGE_ID (0x87U)
1548
1549typedef NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_PARAMS NV30F1_CTRL_GSYNC_GET_HOUSE_SYNC_MODE_PARAMS;
1550
1551#define NV30F1_CTRL_CMD_GSYNC_SET_HOUSE_SYNC_MODE (0x30f10188) /* finn: Evaluated from "(FINN_NV30_GSYNC_GSYNC_INTERFACE_ID << 8) | NV30F1_CTRL_GSYNC_SET_HOUSE_SYNC_MODE_PARAMS_MESSAGE_ID" */
1552
1553#define NV30F1_CTRL_GSYNC_SET_HOUSE_SYNC_MODE_PARAMS_MESSAGE_ID (0x88U)
1554
1555typedef NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_PARAMS NV30F1_CTRL_GSYNC_SET_HOUSE_SYNC_MODE_PARAMS;
1556
1557#define NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_INPUT (0x00)
1558#define NV30F1_CTRL_GSYNC_HOUSE_SYNC_MODE_OUTPUT (0x01)
1559
1560/* _ctrl30f1_h_ */