mirror of
git://nv-tegra.nvidia.com/tegra/kernel-src/nv-kernel-display-driver.git
synced 2025-12-22 09:11:48 +03:00
Updating prebuilts and/or headers
d13779dbbab1c776db15f462cd46b29f2c0f8c7c - Makefile 7d577fdb9594ae572ff38fdda682a4796ab832ca - COPYING 5728867ce2e96b63b29367be6aa1c0e47bcafc8f - SECURITY.md 6b73bf6a534ddc0f64e8ba88739381c3b7fb4b5c - nv-compiler.sh 05e911b99b109a721d2045f025b21189e2718e60 - README.md ec5f1eb408e0b650158e0310fb1ddd8e9b323a6f - CONTRIBUTING.md af3ee56442f16029cb9b13537477c384226b22fc - CODE_OF_CONDUCT.md 07bd07999f296d935386a8edf719d0e296f63227 - kernel-open/Kbuild 45b68e3eacda04dcadce48a8238574302a71a3ca - kernel-open/Makefile 70bd025d834add7e40a0ee69e48612a289df1f07 - kernel-open/conftest.sh 0b1508742a1c5a04b6c3a4be1b48b506f4180848 - kernel-open/dkms.conf 19a5da412ce1557b721b8550a4a80196f6162ba6 - kernel-open/common/inc/os_dsi_panel_props.h 4750735d6f3b334499c81d499a06a654a052713d - kernel-open/common/inc/nv-caps.h 92de3baafe321dd0dcf8665aae4614d5ac670718 - kernel-open/common/inc/rs_access.h 60ef64c0f15526ae2d786e5cec07f28570f0663b - kernel-open/common/inc/conftest.h 880e45b68b19fdb91ac94991f0e6d7fc3b406b1f - kernel-open/common/inc/nv-pci-types.h 6d2f660ef0942edf664874f260266ec81cd0ff08 - kernel-open/common/inc/nvtypes.h d580300f41118dacc5569fffa9f47e78c5883141 - kernel-open/common/inc/nv-modeset-interface.h 5bc7a748c7d3dfa6559ca4f9fe6199e17098ec8f - kernel-open/common/inc/nv-lock.h b249abc0a7d0c9889008e98cb2f8515a9d310b85 - kernel-open/common/inc/nvgputypes.h e4a4f57abb8769d204468b2f5000c81f5ea7c92f - kernel-open/common/inc/nv-procfs.h 8b19b93e958aca626899f035334a4c96f8776eb6 - kernel-open/common/inc/nv.h ede1f77acb43e28391bceac058e00a7a8d799b0d - kernel-open/common/inc/nvmisc.h ae374d3e438f8d3b60df8c4602618c58564b73f9 - kernel-open/common/inc/rm-gpu-ops.h 3f7b20e27e6576ee1f2f0557d269697a0b8af7ec - kernel-open/common/inc/nv-firmware-registry.h 5fd1da24ae8263c43dc5dada4702564b6f0ca3d9 - kernel-open/common/inc/dce_rm_client_ipc.h 3e8075872e2efa843b74b884ef5098468edc4f18 - kernel-open/common/inc/nvimpshared.h befb2c0bf0a31b61be5469575ce3c73a9204f4e9 - kernel-open/common/inc/nv_stdarg.h 0e70d16576584082ee4c7f3ff9944f3bd107b1c1 - kernel-open/common/inc/cpuopsys.h d7ab0ee225361daacd280ff98848851933a10a98 - kernel-open/common/inc/nv-list-helpers.h b02c378ac0521c380fc2403f0520949f785b1db6 - kernel-open/common/inc/nv-dmabuf.h a3d1e51c0f4217f1dc4cb0c48aa0eafd054d4e5e - kernel-open/common/inc/nv-procfs-utils.h 81592e5c17bebad04cd11d73672c859baa070329 - kernel-open/common/inc/nv-chardev-numbers.h 61cf8f3fd32142dc402f6802b5d4c9af6c875c35 - kernel-open/common/inc/nv-firmware.h d5253e7e4abd3ad8d72375260aa80037adcd8973 - kernel-open/common/inc/nv_dpy_id.h 61a9589e4a8ec122e5a6c2258658d493ee747897 - kernel-open/common/inc/nv-platform.h b986bc6591ba17a74ad81ec4c93347564c6d5165 - kernel-open/common/inc/nvkms-format.h 4f487eccd762f3ca645a685d5c333ff569e7987c - kernel-open/common/inc/nv-kthread-q-os.h 4015c4557ea0790a2bdf5695832c89e31d75aee9 - kernel-open/common/inc/nvlimits.h 143051f69a53db0e7c5d2f846a9c14d666e264b4 - kernel-open/common/inc/nv-kref.h 56f432032bef4683c2801f46bec5065923475fb1 - kernel-open/common/inc/nv-kthread-q.h b4c5d759f035b540648117b1bff6b1701476a398 - kernel-open/common/inc/nvCpuUuid.h ea5d5f391b3d634e97c8f9463045bd314c81fe14 - kernel-open/common/inc/nv-linux.h 7c7888550b12eeb98128ea9ac771b897327f538e - kernel-open/common/inc/nv-hypervisor.h f9cb3701681994ff6f32833892d900b0da2b89f6 - kernel-open/common/inc/nv-pgprot.h b8700a911ac85770bf25d70b9692308af63966bd - kernel-open/common/inc/nvstatuscodes.h 3a5f4f105672921b857fec7f2b577d9d525afe37 - kernel-open/common/inc/nv-timer.h 5cd0b3f9c7f544e9064efc9b5ba4f297e5494315 - kernel-open/common/inc/nv-time.h 7a78f354e0b68f03d6ab566d5b755e299456f361 - kernel-open/common/inc/os_gpio.h 3d5aa82afa27ba6edd0ebbf500e8b07a8d1dd788 - kernel-open/common/inc/nv-proto.h 2eb11e523a3ecba2dcd68f3146e1e666a44256ae - kernel-open/common/inc/nv-ioctl.h 1328058925b64e97588d670fe70466b31af7c7c1 - kernel-open/common/inc/nv-mm.h fba1f7a11efe4362f60cbf3ec71a9a2a3b28a9d8 - kernel-open/common/inc/nv-pci.h 95bf694a98ba78d5a19e66463b8adda631e6ce4c - kernel-open/common/inc/nvstatus.h d74a8d4a9ae3d36e92b39bc7c74b27df44626b1c - kernel-open/common/inc/nv_mig_types.h b3258444b6a2c2399f5f00c7cac5b470c41caeaa - kernel-open/common/inc/nv-hash.h 29309411e2bf1c2e6492a104dcb9f53705c2e9aa - kernel-open/common/inc/nvkms-kapi.h 44cb5bc2bc87a5c3447bcb61f2ce5aef08c07fa7 - kernel-open/common/inc/nv_uvm_interface.h 1e7eec6561b04d2d21c3515987aaa116e9401c1f - kernel-open/common/inc/nv-kernel-interface-api.h c54c62de441828282db9a4f5b35c2fa5c97d94f1 - kernel-open/common/inc/nvkms-api-types.h ade7410c1c0572dbed49b4b0d97b87245ca59115 - kernel-open/common/inc/os-interface.h 2ffd0138e1b3425ade16b962c3ff02a82cde2e64 - kernel-open/common/inc/nv-ioctl-numa.h 995d8447f8539bd736cc09d62983ae8ebc7e3436 - kernel-open/common/inc/nv_common_utils.h c75bfc368c6ce3fc2c1a0c5062834e90d822b365 - kernel-open/common/inc/nv-memdbg.h dfd7b82a7f2939d4c1869840059705c6b71bffe3 - kernel-open/common/inc/nv-msi.h 3b12d770f8592b94a8c7774c372e80ad08c5774c - kernel-open/common/inc/nvi2c.h 894ef9e230604572bbceabdfd5f241059d54aa10 - kernel-open/common/inc/nv_speculation_barrier.h 107d1ecb8a128044260915ea259b1e64de3defea - kernel-open/common/inc/nv-ioctl-numbers.h 19cfcbf5a3021aa9aaa0ceacbb6711e7f7a6e09e - kernel-open/common/inc/nv_uvm_user_types.h cfcd2ef5eaec92f8e4647fff02a3b7e16473cbff - kernel-open/common/inc/nv_uvm_types.h b642fb649ce2ba17f37c8aa73f61b38f99a74986 - kernel-open/common/inc/nv-retpoline.h 3a26838c4edd3525daa68ac6fc7b06842dc6fc07 - kernel-open/common/inc/nv-gpu-info.h cda75171ca7d8bf920aab6d56ef9aadec16fd15d - kernel-open/common/inc/os/nv_memory_type.h 70b67003fda6bdb8a01fa1e41c3b0e25136a856c - kernel-open/common/inc/os/nv_memory_area.h 11b09260232a88aa1f73f109fdfab491a7b73576 - kernel-open/nvidia/nv-nano-timer.c dcf4427b83cce7737f2b784d410291bf7a9612dc - kernel-open/nvidia/nv-reg.h 0b8ff957fb14f20ba86f61e556d1ab15bf5acd74 - kernel-open/nvidia/nv-imp.c 6b09b5ef8a37f78c8e82074b06b40ef593c81807 - kernel-open/nvidia/libspdm_rsa.c b8d361216db85fe897cbced2a9600507b7708c61 - kernel-open/nvidia/libspdm_hkdf_sha.c 66e2bfc490fb77e0b72a8192b719d3dc74d25d59 - kernel-open/nvidia/nv-pat.c 26a30f2d26c2a97a6e2ee457d97d32f48b0bf25b - kernel-open/nvidia/nv-vm.c b8a770cea0629c57d8b0b3d7414d7b0f043ee8cf - kernel-open/nvidia/libspdm_ecc.c 4c183eb39251cd78d90868ec6f75ebc7a37e6644 - kernel-open/nvidia/os-usermap.c 8c30b6230439edcbec62636cc93be512bca8637f - kernel-open/nvidia/nv-usermap.c 7af675f85642229b7e7de05dcadd622550fe7ad7 - kernel-open/nvidia/nv-vtophys.c d11ab03a617b29efcf00f85e24ebce60f91cf82c - kernel-open/nvidia/nv-backlight.c ef8fd76c55625aeaa71c9b789c4cf519ef6116b2 - kernel-open/nvidia/libspdm_hkdf.c 1590794925ebd9cbc14aae8c47e0cc205a3f4b52 - kernel-open/nvidia/nv-rsync.h 934a686ba8d7b77cce2d928cb3b04f611d9f9187 - kernel-open/nvidia/libspdm_aead.c f16e6a33b5004566333fb8b99504a0fb95d51226 - kernel-open/nvidia/nv-gpio.c 8ed2c3b93eeaa52342d944e794180fd5d386688a - kernel-open/nvidia/libspdm_rsa_ext.c 2e5d18118835c19c5ca7edee9bceeae613b9d7f9 - kernel-open/nvidia/nv-procfs.c 23009178fd74b867836e8c23055544a900aeea7a - kernel-open/nvidia/nv.c 65fe797fb5d4af2db67544ddb79d49ab1b7ca859 - kernel-open/nvidia/nv-dsi-parse-panel-props.c e3efae4ed920545062a2d06064df8be1a2a42135 - kernel-open/nvidia/nv-caps-imex.h 8c64e75aaaa9ac6f17aae7ed62db23eb2e5b9953 - kernel-open/nvidia/nv_uvm_interface.c 4563589496a93a2720e25807ca1be2565f03554c - kernel-open/nvidia/nv-bpmp.c aea97021d9aa023a357f009fcddc710f710ceb5e - kernel-open/nvidia/libspdm_x509.c f29e5bc1c7bd2c670780cdbb7275900a69f4d205 - kernel-open/nvidia/internal_crypt_lib.h 22418fb7ae38c7f153af94edf2f5bd1cbcacb889 - kernel-open/nvidia/nv-modeset-interface.c 6ae527b69eebb44224b05e8cb3546757532d8a16 - kernel-open/nvidia/nv-dma.c fe204e3820d206b5b0c34a51084f39b97310305a - kernel-open/nvidia/nv-ipc-soc.c 60d6ff5becc0ddbcf4b489b9d88c1dec8ccc67be - kernel-open/nvidia/nv-platform-pm.c c1f7c81018a414b7a657431b115a1b86d3ebe3e7 - kernel-open/nvidia/os-mlock.c c762aa186dc72ed0b9183492f9bd187c301d33d3 - kernel-open/nvidia/nv-kthread-q.c 70bece14e12b9ffc92816ee8159a4ce596579d78 - kernel-open/nvidia/os-pci.c a677049bb56fa5ebe22fe43b0c4a12acd58a6677 - kernel-open/nvidia/nv-p2p.c e4d12f027cb5f74124da71bbbc23bcb33651834a - kernel-open/nvidia/nv-pci-table.c 5aec112c8a7eca49686f36efefe6d6e3e9548e32 - kernel-open/nvidia/nv-pci.c 6dfc57ac42bed97c6ff81d82e493f05b369e0b84 - kernel-open/nvidia/nvspdm_cryptlib_extensions.h bba706cfbc04b3a880b5e661066f92e765fad663 - kernel-open/nvidia/nv-caps-imex.c ed3c83f62e4ccc4b53d886eedd4b47518a361393 - kernel-open/nvidia/nv-dmabuf.c 66b7fad4d73a23153298ce777afb14d2c8be42c1 - kernel-open/nvidia/libspdm_internal_crypt_lib.c 6d4fbea733fdcd92fc6a8a5884e8bb359f9e8abd - kernel-open/nvidia/rmp2pdefines.h b71bf4426322ab59e78e2a1500509a5f4b2b71ab - kernel-open/nvidia/nv-pat.h 9a5a58bd6eb71a4c32e334a1a4e3326a17143cce - kernel-open/nvidia/os-interface.c 1a91f5e6d517856303da448bea80d167b238e41c - kernel-open/nvidia/nv-i2c.c 7d409e3f0255d17457bffbf318e2f9ea160680a5 - kernel-open/nvidia/nv-pci-table.h c50865d3070a0c3476ce24ff1ab4cc4e3f9ea4be - kernel-open/nvidia/detect-self-hosted.h 7ae9a57b9e99fd2a3534798e52e57f7784738a53 - kernel-open/nvidia/nv-report-err.c 3b27e4eaa97bd6fa71f1a075b50af69b1ec16454 - kernel-open/nvidia/libspdm_ec.c dd9e367cba9e0672c998ec6d570be38084a365ab - kernel-open/nvidia/libspdm_rand.c d8b8077adb7fd70eb9528d421bdef98c4378b57a - kernel-open/nvidia/nv-msi.c 23ae2957e6d58ab1b41398b6fdeecb7c475300b9 - kernel-open/nvidia/nv-platform.c dd819a875c584bc469082fcf519779ea00b1d952 - kernel-open/nvidia/libspdm_aead_aes_gcm.c 74958745f83b14c04aaa60248bf5c86ceef6b5cb - kernel-open/nvidia/nv-acpi.c 4d19a1756af848d25fd2fd8cc691dcbcf0afb776 - kernel-open/nvidia/os-registry.c 80f9ac558a57c60cbf70f3ecaf73c71e60c98885 - kernel-open/nvidia/nv-rsync.c 7f5d251db1db4a179a67efea0178fbfda94f95d0 - kernel-open/nvidia/nv_gpu_ops.h 642c3a7d10b263ab9a63073f83ad843566927b58 - kernel-open/nvidia/libspdm_hmac_sha.c 7d53c2d27580d1b2cc56246d9972f3f310a3cd34 - kernel-open/nvidia/nv-clk.c 0f28ebcdb723e836c923e40642429838fa9e86dc - kernel-open/nvidia/nvidia-sources.Kbuild 99540efd2dfa6907b84e628e12370eefb0222850 - kernel-open/nvidia/nv-mmap.c 11ac7a3a3b4def7fa31a289f5f8461ad90eca06b - kernel-open/nvidia/nv-tracepoint.h a14b9115cff1e5e7491737083588a5646c8c227b - kernel-open/nvidia/nv-report-err.h 011f975d4f94f7b734efa23d3c8075321eaaf0e8 - kernel-open/nvidia/nv-memdbg.c c0cf3914fcda832f27472ba2fdb9c0f831f05733 - kernel-open/nvidia/nvidia.Kbuild ac976b92e83f19125d6b3f7e95d9523e430b9b09 - kernel-open/nvidia/nv-p2p.h 9b036018501d9b8543aabe7ec35dbe33023bb3e0 - kernel-open/nvidia/nv-host1x.c 11778961efc78ef488be5387fa3de0c1b761c0d9 - kernel-open/nvidia/libspdm_sha.c 02b1936dd9a9e30141245209d79b8304b7f12eb9 - kernel-open/nvidia/nv-cray.c 2d61ad39b2356c9cfd8d57c1842e80a20272e37f - kernel-open/nvidia/nv-caps.c fc199c04b321db79ab5446574d9b994f8bfe6c24 - kernel-open/nvidia/libspdm_shash.c fa178a7209f56008e67b553a2c5ad1b2dd383aac - kernel-open/nvidia/hal/library/cryptlib/cryptlib_rng.h 34de62da6f880ba8022299c77eddbb11d7fc68d2 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_hash.h 8af43a3f0e4201aa6ff0099221a371fb1801e818 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_rsa.h cf94004b7b5729982806f7d6ef7cc6db53e3de56 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_aead.h 9a6e164ec60c2feb1eb8782e3028afbffe420927 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_mac.h 4991dfa8852edbdd1ffbd2d44f7b6ac4e1c8c752 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_ec.h 7694b027d74d65561ce6cd15a8c0822e4b32b73a - kernel-open/nvidia/hal/library/cryptlib/cryptlib_sm2.h 8b84a0cc1127f39652362007e048ea568c9cf80b - kernel-open/nvidia/hal/library/cryptlib/cryptlib_ecd.h 2d7b566655ba8a05fae4ea4f6c806b75d7ebb5f3 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_cert.h 0dcb1fd3982e6307b07c917cb453cddbcd1d2f43 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_dh.h 7ff12b437215b77c920a845943e4101dcde289c4 - kernel-open/nvidia/hal/library/cryptlib/cryptlib_hkdf.h 16dd525c52448a32cc8da75d6a644d8a35efbfee - kernel-open/nvidia/library/spdm_lib_config.h 53a9acf65cad6bc4869a15d8086990365c987456 - kernel-open/nvidia/library/cryptlib.h cfbaebb1091f7b1a8d2e3c54c2301ac45ade6c40 - kernel-open/nvidia/internal/libspdm_lib_config.h 2ea094687fbee1e116cd0362cbeba7592439e0b6 - kernel-open/nvidia-drm/nvidia-drm-crtc.h bed7b5053d09473188061b0d7f6a3a65b64f72e0 - kernel-open/nvidia-drm/nvidia-drm-linux.c 0f8e4535cf97fadea23c9848483355583f492131 - kernel-open/nvidia-drm/nvidia-drm-utils.c 35034b6f174cd6a14b7d94a07f777794570959b4 - kernel-open/nvidia-drm/nvidia-drm-gem-dma-buf.h 072e1d6a260e348dada181162949eee190321ed8 - kernel-open/nvidia-drm/nvidia-drm-gem-nvkms-memory.c e86dac2985f4e61f4e2676b3290e47cdcb951c46 - kernel-open/nvidia-drm/nvidia-drm-modeset.c f00a605cac7ffc7f309e3952c5d4cea7cbfc0b7e - kernel-open/nvidia-drm/nvidia-drm-gem-user-memory.h 99642b76e9a84b5a1d2e2f4a8c7fb7bcd77a44fd - kernel-open/nvidia-drm/nvidia-drm.h 763833186eabf1a0501434426c18161febf624d4 - kernel-open/nvidia-drm/nvidia-drm-fb.h 4bada3ff7bfee8b7e222fc4cafb2ac97c67d7898 - kernel-open/nvidia-drm/nvidia-drm-gem-nvkms-memory.h 99a2e922a448b4d76318ec151378c8bbf5971595 - kernel-open/nvidia-drm/nvidia-drm-helper.c ace74442a1a573cee5ed1f67801ab1bdc142b4ae - kernel-open/nvidia-drm/nvidia-drm.c 94c28482252c983fd97532634ffafea0bf77337a - kernel-open/nvidia-drm/nvidia-drm-ioctl.h a4f77f8ce94f63f3ca2a970c1935d8da48ab5ccc - kernel-open/nvidia-drm/nvidia-drm-format.c 6ea6eeaae58c4ced3fb2d6bc1128b895165e5a9a - kernel-open/nvidia-drm/nvidia-drm-drv.h 4154c5562cebd2747bd15fb302c19cb0cefe1c9c - kernel-open/nvidia-drm/nvidia-drm-connector.h c762aa186dc72ed0b9183492f9bd187c301d33d3 - kernel-open/nvidia-drm/nv-kthread-q.c e4d12f027cb5f74124da71bbbc23bcb33651834a - kernel-open/nvidia-drm/nv-pci-table.c 47110750cf788e7d9ddb5db85be3658ac660a109 - kernel-open/nvidia-drm/nvidia-drm-fence.h 73a1acab50e65c468cb71b65238a051bc306ae70 - kernel-open/nvidia-drm/nvidia-drm-encoder.h aa388c0d44060b8586967240927306006531cdb7 - kernel-open/nvidia-drm/nvidia-drm-helper.h d0b4f4383a7d29be40dd22e36faa96dae12d2364 - kernel-open/nvidia-drm/nvidia-drm-os-interface.h 63a2fec1f2c425e084bdc07ff05bda62ed6b6ff1 - kernel-open/nvidia-drm/nvidia-drm-gem-user-memory.c 0e2d8b82e79dfd18fff7ce45e42e501e2e7a06c2 - kernel-open/nvidia-drm/nvidia-drm-drv.c 19031f2eaaaeb0fa1da61681fa6048c3e303848b - kernel-open/nvidia-drm/nvidia-drm-gem.c 71ea2d5b02bf8fb3e8cf6b7c84686e2edbc244d0 - kernel-open/nvidia-drm/nvidia-drm-encoder.c 7d409e3f0255d17457bffbf318e2f9ea160680a5 - kernel-open/nvidia-drm/nv-pci-table.h 9f57b8724205e03ca66b32fe710cd36b82932528 - kernel-open/nvidia-drm/nvidia-drm-conftest.h 6e9838b169beffe149ba12625acb496504d36d50 - kernel-open/nvidia-drm/nvidia-drm-gem-dma-buf.c d2525a36b7aec71982df80a89b861f220312103d - kernel-open/nvidia-drm/nvidia-dma-resv-helper.h a505f0aa98ebcf438307f6bacf9bf5a5be189839 - kernel-open/nvidia-drm/nvidia-drm-connector.c d5518597469dc874ee7e264b9400db51af2fcd44 - kernel-open/nvidia-drm/nvidia-drm-format.h 437d87e7e4bd34ae3c67b27c2faaa394575acf70 - kernel-open/nvidia-drm/nvidia-drm-priv.h 88b2035ddbba8c7f455209e61256b4e7b09c11dd - kernel-open/nvidia-drm/nvidia-drm-fence.c eff6a0b72274c8824b7a79e9aee261da3a6fb4f1 - kernel-open/nvidia-drm/nvidia-drm-gem.h 6528efa1f8061678b8543c5c0be8761cab860858 - kernel-open/nvidia-drm/nvidia-drm-modeset.h 46a41b0b3470190abcdc57a739238a9cd773812b - kernel-open/nvidia-drm/nvidia-drm.Kbuild 995d8447f8539bd736cc09d62983ae8ebc7e3436 - kernel-open/nvidia-drm/nv_common_utils.h 40b5613d1fbbe6b74bff67a5d07974ad321f75f0 - kernel-open/nvidia-drm/nvidia-drm-utils.h d924c494620760887546f428f87387d8ed5b99a6 - kernel-open/nvidia-drm/nvidia-drm-fb.c 5eb8385042f3efa5c2e14d168cdb40b211467552 - kernel-open/nvidia-drm/nvidia-drm-crtc.c 62a9b9b30fd7417d9ab085b2bfc731aadd9826f9 - kernel-open/nvidia-drm/nvidia-drm-os-interface.c ca86fee8bd52e6c84e376199c5f3890078bc2031 - kernel-open/nvidia-modeset/nvidia-modeset-os-interface.h 73d346cb00350ecef5cb841316f24021d8b15e8d - kernel-open/nvidia-modeset/nvidia-modeset-linux.c 885370cd7fc5f4d9d685d9d8d3e21460fd30cb38 - kernel-open/nvidia-modeset/nvkms.h c762aa186dc72ed0b9183492f9bd187c301d33d3 - kernel-open/nvidia-modeset/nv-kthread-q.c 8ef1c6aa1976e45bdf9c3eded10434daa5b79341 - kernel-open/nvidia-modeset/nvidia-modeset.Kbuild 2ea1436104463c5e3d177e8574c3b4298976d37e - kernel-open/nvidia-modeset/nvkms-ioctl.h 13d4f9648118dd25b790be0d8d72ebaa12cc8d0e - src/common/sdk/nvidia/inc/rs_access.h 579be4859587206460d8729804aab19180fb69bb - src/common/sdk/nvidia/inc/nvtypes.h 993f17e3094243623f793ae16bd84b5fa3f335ec - src/common/sdk/nvidia/inc/g_finn_rm_api.h a54d77d45f9b0c5ae3fa8b59d2117145260800b6 - src/common/sdk/nvidia/inc/cc_drv.h b249abc0a7d0c9889008e98cb2f8515a9d310b85 - src/common/sdk/nvidia/inc/nvgputypes.h 78a4b6b19a38de41527ef8b290754deca5906817 - src/common/sdk/nvidia/inc/nvcd.h ede1f77acb43e28391bceac058e00a7a8d799b0d - src/common/sdk/nvidia/inc/nvmisc.h 46966ed7fc8d85931b49b12683c42666181f33f6 - src/common/sdk/nvidia/inc/nvimpshared.h befb2c0bf0a31b61be5469575ce3c73a9204f4e9 - src/common/sdk/nvidia/inc/nv_stdarg.h f5a682339a89d2b119b43e5b9263dd67346ed3bc - src/common/sdk/nvidia/inc/cpuopsys.h cf1de27d5bcbd0adbe3c3b64466193b7d9094c71 - src/common/sdk/nvidia/inc/nverror.h 4015c4557ea0790a2bdf5695832c89e31d75aee9 - src/common/sdk/nvidia/inc/nvlimits.h 7c7888550b12eeb98128ea9ac771b897327f538e - src/common/sdk/nvidia/inc/nv-hypervisor.h b8700a911ac85770bf25d70b9692308af63966bd - src/common/sdk/nvidia/inc/nvstatuscodes.h 95bf694a98ba78d5a19e66463b8adda631e6ce4c - src/common/sdk/nvidia/inc/nvstatus.h a506a41b8dcf657fb39a740ffc1dfd83835d6c89 - src/common/sdk/nvidia/inc/nvcfg_sdk.h 1e7eec6561b04d2d21c3515987aaa116e9401c1f - src/common/sdk/nvidia/inc/nv-kernel-interface-api.h af0bc90b3ad4767de53b8ff91e246fdab0146e8b - src/common/sdk/nvidia/inc/nvsecurityinfo.h 5cec5038e1f4a395a08b765c8361a9560f3312b7 - src/common/sdk/nvidia/inc/nvdisptypes.h c8b96af9d498f87cb9acde064648f9e84d789055 - src/common/sdk/nvidia/inc/nv_vgpu_types.h 3b12d770f8592b94a8c7774c372e80ad08c5774c - src/common/sdk/nvidia/inc/nvi2c.h bbf6c09ef9bb10ab63d337bf011872f9073c3e5b - src/common/sdk/nvidia/inc/nvos.h 9bca638f5832d831880f090c583fac6fc8cf6ee6 - src/common/sdk/nvidia/inc/dpringbuffertypes.h 7de14a0c3cc8460a9c41e1ee32fda5409c5b9988 - src/common/sdk/nvidia/inc/mmu_fmt_types.h 774318ced0fdcb199e99cf0fee9688259dd01a51 - src/common/sdk/nvidia/inc/nvfixedtypes.h ed51b6e2d454af3da36f9c5f4a8a7958d2c5f156 - src/common/sdk/nvidia/inc/alloc/alloc_channel.h ffe618524466cbbff64de55d88fd987e198bb8c9 - src/common/sdk/nvidia/inc/class/cl9271.h cef74c734fc7d2f32ff74095c59212d9e1d4cafc - src/common/sdk/nvidia/inc/class/cl84a0.h 9f8a45cb986e3ad2bd4a8900469fe5f8b0c9463a - src/common/sdk/nvidia/inc/class/cl9870.h a6bb32861fa3f93ccb16490f0f2751a1ef333eed - src/common/sdk/nvidia/inc/class/cl0101.h e6818f1728a66a70080e87dac15a6f92dd875b4e - src/common/sdk/nvidia/inc/class/cl927d.h 522682a17bacd5c1d6081c0020d094ee3d5c4a30 - src/common/sdk/nvidia/inc/class/clcb97.h 89d4eeb421fc2be3b9717e333e9ff67bfffa24e8 - src/common/sdk/nvidia/inc/class/cl2080.h f558fddfdc088b86a1b479542b8e782e42a5bdce - src/common/sdk/nvidia/inc/class/clc37a.h d301edef2d1dd42382670e5a6ceef0d8caf67d28 - src/common/sdk/nvidia/inc/class/cl90cd.h 1dfae8f11f8e92908f59a1c9493e84ce40d53b90 - src/common/sdk/nvidia/inc/class/cl0070.h 95d99f0805c8451f0f221483b3618e4dbd1e1dd8 - src/common/sdk/nvidia/inc/class/cl90f1.h 99a34eee22f584d5dfb49c3018a8cb9a7b1035ed - src/common/sdk/nvidia/inc/class/cl5070_notification.h c4f090f0dae5bdebf28c514c1b5a9bd8606aa56c - src/common/sdk/nvidia/inc/class/cl9097.h 4b77798281f3754a80961308d44a70b1a717283b - src/common/sdk/nvidia/inc/class/clc46f.h bd2a88f8dbc64add00ad366aa3e76d116cb090b3 - src/common/sdk/nvidia/inc/class/cl0073.h e587a693bc1cee68983a7039ddbf16a3d3461d64 - src/common/sdk/nvidia/inc/class/cl9471.h ddbffcce44afa7c07924fd64a608f7f3fe608ccc - src/common/sdk/nvidia/inc/class/cl0071.h 74c75472658eea77d031bf3979dd7fe695b4293f - src/common/sdk/nvidia/inc/class/cl0092_callback.h fd16daebcd23a680b988dde4ae99625434dcb8fa - src/common/sdk/nvidia/inc/class/cl0000.h c2d8bb02052e80cd0d11695e734f5e05ab7faeb5 - src/common/sdk/nvidia/inc/class/cl907dswspare.h 5ca1d01dab6b9e814160ddce868d00aa9a1ead58 - src/common/sdk/nvidia/inc/class/clc873.h 7c7406d40a09372dcae2aaf3fcad225c3dd2cf3f - src/common/sdk/nvidia/inc/class/cl9010_callback.h 2240664ad950c9c2e64b6f4d18e05349bc91443c - src/common/sdk/nvidia/inc/class/clc573.h 593384ce8938ceeec46c782d6869eda3c7b8c274 - src/common/sdk/nvidia/inc/class/cl900e.h 101da471fe4e167815425793491e43193e407d9a - src/common/sdk/nvidia/inc/class/clc397.h dec74b9cf8062f1a0a8bbeca58b4f98722fd94b0 - src/common/sdk/nvidia/inc/class/cl0076.h 46f74fc51a7ec532330e966cad032782e80808b8 - src/common/sdk/nvidia/inc/class/clcc7b.h 053e3c0de24348d3f7e7fe9cbd1743f46be7a978 - src/common/sdk/nvidia/inc/class/cl0004.h 71e34a03bcfa70edfbec4dbdeade82a932057938 - src/common/sdk/nvidia/inc/class/clc637.h 447fe99b23c5dbe3d2a7601e8228a1a1831c6705 - src/common/sdk/nvidia/inc/class/clcc70.h 89ed6dd37fca994e18e03a5410d865b88e1ff776 - src/common/sdk/nvidia/inc/class/clc87e.h 03d873c3a0e0376440f23171640d9c517f7a34e9 - src/common/sdk/nvidia/inc/class/cl902d.h 78259dc2a70da76ef222ac2dc460fe3caa32457a - src/common/sdk/nvidia/inc/class/clc37e.h b7a5b31a8c3606aa98ba823e37e21520b55ba95c - src/common/sdk/nvidia/inc/class/cl402c.h 5ee1adc8d952212b37211c6f4f677ba672f5117c - src/common/sdk/nvidia/inc/class/clcc71.h bd12f7cdc3a01668b9c486dc6456f9263dd459ea - src/common/sdk/nvidia/inc/class/clc57b.h 4b2f2194a1655cc6ae707866f130bbe357d0c21f - src/common/sdk/nvidia/inc/class/clb097tex.h 5409e5af182ac18ef8d13380bdfe7cf2e83d37d7 - src/common/sdk/nvidia/inc/class/clc37b.h aeb4cbab8d1d0fbd0a5747fa36d6f56c00234b2d - src/common/sdk/nvidia/inc/class/clc097tex.h 36fd6906e2688dad2e7ab648be7e070b9eb6f11d - src/common/sdk/nvidia/inc/class/clc971.h 513c505274565fa25c5a80f88a7d361ffbcb08c3 - src/common/sdk/nvidia/inc/class/cl0005.h 53e6252cd85a60698c49a721f4e41da1cb14e5bd - src/common/sdk/nvidia/inc/class/clc97dswspare.h 645adeb829dbcf315bf67ff8387e7a5d982d7b6e - src/common/sdk/nvidia/inc/class/cl00de.h 0f91db32d9e346b4d9f3762c9e59a8f8e5fd0903 - src/common/sdk/nvidia/inc/class/clcc7d.h a24c2a943c7ceceb8d015f5cd02148f8c4e7c23d - src/common/sdk/nvidia/inc/class/clb097.h 691bb932ea3f60d2b9ad3e4d7fa53ab1a2a5e6c5 - src/common/sdk/nvidia/inc/class/clc870.h 758e2fb8b5d89079f03be09d74964e9246cb180c - src/common/sdk/nvidia/inc/class/clc797.h f4af32374be4d05a2e55c97053a4f0d1f4b85154 - src/common/sdk/nvidia/inc/class/cl0000_notification.h 1e578eb23dacca047e0b342cce3024b3134f8de9 - src/common/sdk/nvidia/inc/class/clc7b5.h 941a031920c0b3bb16473a6a3d4ba8c52c1259d7 - src/common/sdk/nvidia/inc/class/cl917e.h b23cdfb66f40c6d9a903f602b8ff4526063b5a2d - src/common/sdk/nvidia/inc/class/clc097.h 0de3548dde4e076cbd0446330b2d5ae4862c1501 - src/common/sdk/nvidia/inc/class/clc973.h ddb996ff90b80c0f58729b9ac89fa6d2d3950e49 - src/common/sdk/nvidia/inc/class/cla16f.h cb610aaae807d182b4a2ee46b9b43ebfa4a49a08 - src/common/sdk/nvidia/inc/class/clc57e.h 9e1d2f90d77e23f1d2163a8f8d8d747058e21947 - src/common/sdk/nvidia/inc/class/cl9010.h 7a14243de2b228f086810f968a1712627f1333fd - src/common/sdk/nvidia/inc/class/clc36f.h 7c8e1f1055f9522cfb2935ea0aae612ef172c26e - src/common/sdk/nvidia/inc/class/clc370_notification.h 64ad2ab88e2006bcdace06e7109981496c39f265 - src/common/sdk/nvidia/inc/class/clc87d.h 36c6162356ac39346c8900b1e0074e4b614d4b5a - src/common/sdk/nvidia/inc/class/clc370.h 5df0ce4eb733554e963eb3c7938396f58f2dd4d5 - src/common/sdk/nvidia/inc/class/cl2081.h a4d82d12346918edd0a7564a5c6cbfe849532b7f - src/common/sdk/nvidia/inc/class/clca70.h 159b78a13e43a2afe6c17714a6f8619675480346 - src/common/sdk/nvidia/inc/class/clc86f.h 6ddba2e93c046ae04f48685c73f8f2d9fe74a398 - src/common/sdk/nvidia/inc/class/clc67a.h 83c6378ef27c8b640895a123801d27e6c4fd3754 - src/common/sdk/nvidia/inc/class/clc671.h 7f75433a769a020d9f36996c855c8ce6ab39dd83 - src/common/sdk/nvidia/inc/class/clc37dcrcnotif.h 31ac68401e642baf44effb681d42374f42cf86b1 - src/common/sdk/nvidia/inc/class/cl00c3.h 95ca0b08eed54d1c6dd76fdf9cf4715007df1b20 - src/common/sdk/nvidia/inc/class/cl0020.h 20d5608c2d6e55efd6d1756a00739f7a05d3a2b3 - src/common/sdk/nvidia/inc/class/clc361.h 9797f4758d534181eeaa6bc88d576de43ba56045 - src/common/sdk/nvidia/inc/class/clc574.h a39d75d3e479aebaf3849415e156c3cfe427298a - src/common/sdk/nvidia/inc/class/clc771.h eac86d7180236683b86f980f89ec7ebfe6c85791 - src/common/sdk/nvidia/inc/class/cl957d.h f7a2fea4725d59e95294c397ede001504b777b0d - src/common/sdk/nvidia/inc/class/clc697.h f3f33f70ec85c983acec8862ccaabf5b186de2bb - src/common/sdk/nvidia/inc/class/cl9270.h 8b94512c9746c6976c4efeee0291bf44bb5e0152 - src/common/sdk/nvidia/inc/class/clcc73.h 60d0c7923699599a5a4732decfbcb89e1d77b69e - src/common/sdk/nvidia/inc/class/cl9770.h e0c9a155f829c158c02c21b49c083168f8b00cbe - src/common/sdk/nvidia/inc/class/clc37dswspare.h 499bc681107a2b7ad7af3d2211b582b8fb9d9761 - src/common/sdk/nvidia/inc/class/clcc7a.h e1bfd0c78f397e7c924c9521f87da8286bebe3f1 - src/common/sdk/nvidia/inc/class/cl84a0_deprecated.h 2f291dc867e71f625c59f72787b9fb391a16d0e6 - src/common/sdk/nvidia/inc/class/clc638.h 8d2dcc086f892dd58270c9e53e747513ed4b2f93 - src/common/sdk/nvidia/inc/class/clb06f.h 3d262347ab41547d9ccc28a892d24c83c6b1158e - src/common/sdk/nvidia/inc/class/cla06f.h bae36cac0a8d83003ded2305409192995d264d04 - src/common/sdk/nvidia/inc/class/cl0001.h ba8f5899df4287b8440bcb9c8e09e10db73ebf12 - src/common/sdk/nvidia/inc/class/clc97a.h 7bfcd7cf1735b2a54839e8a734e2227060ebf570 - src/common/sdk/nvidia/inc/class/clc197.h e231c552afb3a78da7341ee49bf36940f1f65202 - src/common/sdk/nvidia/inc/class/clc77d.h 821396a58944ba4620f43cf6ee833b7a04d67193 - src/common/sdk/nvidia/inc/class/clc970.h 1f1879fcddf3c3f1f6c44df0e51822ad1bfa1aae - src/common/sdk/nvidia/inc/class/cl9171.h a23967cf3b15eefe0cc37fef5d03dfc716770d85 - src/common/sdk/nvidia/inc/class/clc372sw.h 02ff42b6686954e4571b8a318575372239db623b - src/common/sdk/nvidia/inc/class/cl30f1_notification.h 4be055f206ef1049e8a5b824f9f4830eba0e224c - src/common/sdk/nvidia/inc/class/cla26f.h ef173136a93cdd2e02ec82d7db05dc223b93c0e1 - src/common/sdk/nvidia/inc/class/clc770.h a3e011723b5863277a453bfcfb59ce967cee0673 - src/common/sdk/nvidia/inc/class/clc670.h f33b9fdad6ceb534530fecfd16b40a71f5f5cfdc - src/common/sdk/nvidia/inc/class/clc56f.h 02906b5ba8aab0736a38fd1f6d7b4f6026a5185b - src/common/sdk/nvidia/inc/class/clc57esw.h aa6387d7ce55a88789c5731e89dedde57115131c - src/common/sdk/nvidia/inc/class/clc97b.h 86ab048c67a075349622c597fa9c4f2a9a3d8635 - src/common/sdk/nvidia/inc/class/cl9571.h 9b2d08d7a37beea802642f807d40413c7f9a8212 - src/common/sdk/nvidia/inc/class/clc37d.h bd9f406625e6c0cce816a5ddfb9078723e7f7fb5 - src/common/sdk/nvidia/inc/class/clb0b5sw.h ab27db8414f1400a3f4d9011e83ac49628b4fe91 - src/common/sdk/nvidia/inc/class/cl987d.h 2614a83d383b540f23ef721ec49af1dfde629098 - src/common/sdk/nvidia/inc/class/cl0080.h 9db39be032023bff165cd9d36bee2466617015a5 - src/common/sdk/nvidia/inc/class/cl0002.h 094bec72bfa8c618edc139bc353b20433f1c1da2 - src/common/sdk/nvidia/inc/class/cl2080_notification.h e72a7871d872b2eb823cc67c0a7d4cafb3d0ca18 - src/common/sdk/nvidia/inc/class/cl90ec.h 0ad3b3e00dc83a0487bd96abd5fe467213aa51ad - src/common/sdk/nvidia/inc/class/clc597.h 869e41c3ba08d704fcf00541075986de43d6b090 - src/common/sdk/nvidia/inc/class/cl917b.h b685769b5f3fed613227498866d06cc3c1caca28 - src/common/sdk/nvidia/inc/class/cl2082.h 4c0d054bd0d9935d8d2cedba3f5e910d6b6f8ed3 - src/common/sdk/nvidia/inc/class/clc997.h 1697a9ed528d633a1e78c0071868d7dff899af26 - src/common/sdk/nvidia/inc/class/clc57a.h 8e85d29d4006dbd3a913fcc088be5e8c87bbdabb - src/common/sdk/nvidia/inc/class/cl0100.h 15d1f928a9b3f36065e377e29367577ae92ab065 - src/common/sdk/nvidia/inc/class/cl0080_notification.h e3bd2cacd357e411bc1b6b7d7660ffa97c3a7ee3 - src/common/sdk/nvidia/inc/class/clb197.h 16f9950a48c4e670b939a89724b547c5be9938bf - src/common/sdk/nvidia/inc/class/clc570.h 060722ac6a529a379375bb399785cbf2380db4fd - src/common/sdk/nvidia/inc/class/clc373.h bd910ff84b9920af83e706a8ab37c68157a372c8 - src/common/sdk/nvidia/inc/class/clc97e.h b71d1f698a3e3c4ac9db1f5824db983cf136981a - src/common/sdk/nvidia/inc/class/cl9170.h 2a031d85b85c4b1e5b278f6010ca8f33b2192de1 - src/common/sdk/nvidia/inc/class/cl90e7.h 9ceb4ec8538818c8b1dcc7ffe885584b8e0f435e - src/common/sdk/nvidia/inc/class/cla097.h a9503a5558b08071f35b11df9a917310947c378b - src/common/sdk/nvidia/inc/class/cl00da.h d8000ab8ef59e64d17b4089c43953ca69b7f605f - src/common/sdk/nvidia/inc/class/clc67e.h 6400b9ad3460dafe00424e3c1b1b7a05ab865a63 - src/common/sdk/nvidia/inc/class/cl50a0.h 7032fd79731907df00a2fe0bbf6c0f4ce87f021d - src/common/sdk/nvidia/inc/class/cl917dcrcnotif.h b11e7b13106fd6656d1b8268ffc15700fba58628 - src/common/sdk/nvidia/inc/class/clc371.h ff47d8a4b4bdb3b9cd04ddb7666005ac7fcf2231 - src/common/sdk/nvidia/inc/class/cl003e.h 0285aed652c6aedd392092cdf2c7b28fde13a263 - src/common/sdk/nvidia/inc/class/cl00fc.h 81b4e4432da8412c119e795662819cfe7558711f - src/common/sdk/nvidia/inc/class/cl917a.h 38265d86eb7c771d2d3fc5102d53e6a170a7f560 - src/common/sdk/nvidia/inc/class/cl0041.h 848c89981de73d681615266e4e983b74c2ef418f - src/common/sdk/nvidia/inc/class/cla06fsubch.h 2d76476dba432ffc1292d2d5dd2a84ff3a359568 - src/common/sdk/nvidia/inc/class/cl0092.h b46b2cfcf72fc2f9722bd42cea8daaeeda861471 - src/common/sdk/nvidia/inc/class/clc871.h 022e8405220e482f83629dd482efee81cc49f665 - src/common/sdk/nvidia/inc/class/clc77f.h fe7484d17bc643ad61faabee5419ddc81cf9bfd6 - src/common/sdk/nvidia/inc/class/cl9570.h bb79bbd1b0a37283802bc59f184abe0f9ced08a5 - src/common/sdk/nvidia/inc/class/cl0040.h 6249715d9876f5825ad62f563bf070e93710a2ad - src/common/sdk/nvidia/inc/class/clc67d.h b1133e9abe15cf7b22c04d9627afa2027e781b81 - src/common/sdk/nvidia/inc/class/cl917c.h 7ef21c4f4fd4032c8f25f8fb33669e692a26e700 - src/common/sdk/nvidia/inc/class/clcb97tex.h 73b706e4916f4c70302387c88c8e14e7b2c1f4e6 - src/common/sdk/nvidia/inc/class/clc67b.h c40fd87fa6293d483b5bf510e2e331143ded9fa4 - src/common/sdk/nvidia/inc/class/cl9470.h 20894d974d1f8f993c290463f1c97c71fd2e40b1 - src/common/sdk/nvidia/inc/class/cl30f1.h 9f7f04825f3f218cc0c4610938935e2f0a73e13b - src/common/sdk/nvidia/inc/class/clc97d.h 04ab1761d913030cb7485149ecd365f2f9c0f7da - src/common/sdk/nvidia/inc/class/cl0005_notification.h da8d312d2fdc6012e354df4fa71ed62ae4aac369 - src/common/sdk/nvidia/inc/class/cl927c.h 158c98c8721d558ab64a025e6fdd04ce7a16ba9e - src/common/sdk/nvidia/inc/class/cl947d.h 5416c871e8d50a4e76cbad446030dbedbe1644fd - src/common/sdk/nvidia/inc/class/cl00f2.h 0b35244321b1f2f6647f8389f6fa7254c34790e2 - src/common/sdk/nvidia/inc/class/cl90cdtrace.h 39161706917567f434a6fff736b22f3358923e68 - src/common/sdk/nvidia/inc/class/clc06f.h bc3674f2384cb3695ce5f035ed16e9c39bba4d1b - src/common/sdk/nvidia/inc/class/cl00fe.h dd4f75c438d19c27e52f25b36fc8ded1ce02133c - src/common/sdk/nvidia/inc/class/cl917cswspare.h 435a34753d445eb9711c7132d70bd26df2b8bdab - src/common/sdk/nvidia/inc/class/cl917d.h b31019107ada7b0fb8247c09d93b95a630821fa8 - src/common/sdk/nvidia/inc/class/clcc7e.h 31939808cd46382b1c63bc1e0bd4af953302773f - src/common/sdk/nvidia/inc/class/cl977d.h 83427e3172c64c3b9ef393205ccc3b961ec65190 - src/common/sdk/nvidia/inc/class/cl5070.h db8dd50ad3e64fe0472d82c0940908d5da5e0321 - src/common/sdk/nvidia/inc/class/cla0b5.h 28867d69a6ceac83da53a11a5e1ef87d9476f0be - src/common/sdk/nvidia/inc/class/clc57d.h 8b07d7aca050be883fdc0d6f4b19eac0b0b6c796 - src/common/sdk/nvidia/inc/class/clc673.h c116d91177c6cbfb8c25e7f35bb49a8d5a51816c - src/common/sdk/nvidia/inc/class/cl008f.h 4fc2133935b8e560c9a1048bc0b1f1c2f0a4464c - src/common/sdk/nvidia/inc/class/cl00c1.h 5a6098f821e8faa19345313477726431f9271cde - src/common/sdk/nvidia/inc/class/clc661.h 6db83e33cb3432f34d4b55c3de222eaf793a90f0 - src/common/sdk/nvidia/inc/class/cl00b1.h 5b573deb4d68ccb67d9cccc11b28203c5db3d2f7 - src/common/sdk/nvidia/inc/ctrl/ctrl0002.h 88947927d79e15df8cbf77a59ac883a29e970413 - src/common/sdk/nvidia/inc/ctrl/ctrlc638.h 625af1df5c9453bd35a9e873ee5c77e73d5fd195 - src/common/sdk/nvidia/inc/ctrl/ctrl90ec.h ade4a731f59c7cd16b4a60d318a19147b9918bb9 - src/common/sdk/nvidia/inc/ctrl/ctrl0004.h 90843f8173a341deb7f1466cd69a17114c6b9e4f - src/common/sdk/nvidia/inc/ctrl/ctrl90f1.h a305225ceda0a39c76ed61b819a1f4165f5644f5 - src/common/sdk/nvidia/inc/ctrl/ctrl00fe.h be3c9e2de8b8d33fe04389b224fa6ad95ecd089b - src/common/sdk/nvidia/inc/ctrl/ctrla06f.h c3e3213f548f93592f7d3dfd76e63a2102d800ec - src/common/sdk/nvidia/inc/ctrl/ctrl0076.h d7415e78725899f9d10fa2d5f03f3d62cef42f26 - src/common/sdk/nvidia/inc/ctrl/ctrlc36f.h 9e343f73f46238075cef766cad499533559dfa28 - src/common/sdk/nvidia/inc/ctrl/ctrl00da.h f7601ce8c7c2d7a1143bff5280e3e5d9b5c4c147 - src/common/sdk/nvidia/inc/ctrl/ctrl906f.h 97ac039e796faca6c9f78e16020fe96225b33492 - src/common/sdk/nvidia/inc/ctrl/ctrlc637.h fe7ce28fe76174a6de68236b44ea565ba2ea687b - src/common/sdk/nvidia/inc/ctrl/ctrl00de.h 3ba6904c69aa7710c4561d5643b18fc41e141d4e - src/common/sdk/nvidia/inc/ctrl/ctrlxxxx.h b178067ba5f93e7fafb4c2ee0f5032acf9bc55d7 - src/common/sdk/nvidia/inc/ctrl/ctrla081.h 58a5d3a55b2d9b29d4f1b1e7b5d4d02ae6885e30 - src/common/sdk/nvidia/inc/ctrl/ctrl003e.h 16a24249210637987d17af6069ae5168404743ee - src/common/sdk/nvidia/inc/ctrl/ctrl30f1.h 58f8e48d5851cc10e3c5fd3655d7948b9f327ca0 - src/common/sdk/nvidia/inc/ctrl/ctrl2080.h b86c4d68c5758f9813f00cc562110c72ef602da7 - src/common/sdk/nvidia/inc/ctrl/ctrl90e7.h c042a366bc755def9e4132e2768c1675871dbe65 - src/common/sdk/nvidia/inc/ctrl/ctrl0041.h c8b2e0e64bb3cf3c562dee5fa7913035f82d8247 - src/common/sdk/nvidia/inc/ctrl/ctrl402c.h 352825959d98fe9b47a474cfdd154d380c80d24e - src/common/sdk/nvidia/inc/ctrl/ctrl90cd.h 9d908bb15aecc9d8094e1b6c13301efba6032079 - src/common/sdk/nvidia/inc/ctrl/ctrl0080.h 3fcf5dbb82508d88a040981a7ab21eac1466bb2b - src/common/sdk/nvidia/inc/ctrl/ctrl0073.h bfee287b190fd698735c5660592741ba5c25a8ea - src/common/sdk/nvidia/inc/ctrl/ctrl0020.h 2e65ccd2704919780a152c69f53400a0dc5e6e41 - src/common/sdk/nvidia/inc/ctrl/ctrlb06f.h 4fb7753f3502303314d9e8f853ee3b752f7e9317 - src/common/sdk/nvidia/inc/ctrl/ctrl0100.h 8764e07e9d348163db4eb41b0c3cf32c76172c0d - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000client.h 5782a19aeaf9695c13940cf4532e41523a8460e3 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000base.h f21c15122509a8843e676a2bd5e799c58cd96379 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000system.h 326b61039197db58d8369256f6d7dc9764aea421 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000unix.h e7452921bdbd036ca3a37c60c49829c05e95c2d5 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000vgpu.h 5f3b68d39f14137d33f239408a6a13543f4ac966 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000gpu.h d08ef822e97ee56984618d52ed3ed55ee395eadb - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000gsync.h 8fcc64b22b0f6cde40d5ecd23e5e2444277a5999 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000nvd.h 70d65d4f923ec0efd8931433ae50930d12f78a07 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000diag.h a33a1c1173962183793d84276e46c61d27ca867e - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000gpuacct.h 1b594c39d1439c3d1ecc24c4325b2ea8c2724548 - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000syncgpuboost.h 0146d2b3ecec8760e76dacd8ce6bb75c343c6cac - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000proc.h 11abea0cdf485863196de56169451980ee6c016a - src/common/sdk/nvidia/inc/ctrl/ctrl0000/ctrl0000event.h 4f0ccb0667bd3e3070e40f3f83bede7849bc78e4 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080nvjpg.h 08dda80bac8d3418ad08e291012cf315dc9e5805 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080host.h 28b06c8f8152dce2b2e684a4ba84acd25a8b8c26 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080base.h add9e3867e3dbd2c11bed36604680af4aaa0f164 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080dma.h 2ffb93d092df65570b074ad97f0bb436a1c66dff - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080gpu.h 79fd7ed84cb238ea90ea3691f40ea7140034d3dc - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080bif.h 2ea79d79223b06633fb7f541ebbe5a300ba3885f - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080perf.h 44c9aa512eb0b9b92cace9e674299f2a9227c37c - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080internal.h a3328cf6633f9b04258eff05ce30e66cc6930310 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080cipher.h a427892e601a4ca4f88cc5778ff78895324f3728 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080unix.h 92ff82d1045933baa79958a9f6efd451b0123e95 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080bsp.h 7ef9e10955708592e92e127eb3fb372adff44818 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080msenc.h 3c1bd0db339456c335acd50a75ace42cb8bbe6f8 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080fifo.h be10e3f4a9dd2f2ab35305ee0af628ef339b25a7 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080gr.h db66195c8e7252c5f424953275cbb7be90a17ba8 - src/common/sdk/nvidia/inc/ctrl/ctrl0080/ctrl0080fb.h c74ac448c3382d92e662804b56e73edd748e2678 - src/common/sdk/nvidia/inc/ctrl/ctrl83de/ctrl83debase.h 7318f74523bb6a015e561dba1a06b47a278d856d - src/common/sdk/nvidia/inc/ctrl/ctrl83de/ctrl83dedebug.h 702d9cb471a344a25911449cc580f69f7155ab1c - src/common/sdk/nvidia/inc/ctrl/ctrlc372/ctrlc372chnc.h 3f747a4fc98291329e0245a971248cf2c28a1b60 - src/common/sdk/nvidia/inc/ctrl/ctrlc372/ctrlc372base.h 19c7eff334c591c803dcd93fc0818798c281df48 - src/common/sdk/nvidia/inc/ctrl/ctrl208f/ctrl208fbase.h c7dcbc0ae7454df6523c6deb5f07a70dc2fdbc15 - src/common/sdk/nvidia/inc/ctrl/ctrl208f/ctrl208fgpu.h 882b13d54585a6fc5534d12b9cdcec29c8cde337 - src/common/sdk/nvidia/inc/ctrl/ctrl208f/ctrl208fucodecoverage.h 76fb63a6782ff1236303fdd7bf2698f42965a266 - src/common/sdk/nvidia/inc/ctrl/ctrl90e7/ctrl90e7base.h 00d2655f569187190bd117bdf37fe4ddd5e92320 - src/common/sdk/nvidia/inc/ctrl/ctrl90e7/ctrl90e7bbx.h 8064c31eb1e447561c415f9835aecac97d5f3517 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073stereo.h 713aa1291aef3f79304ad35c5143a7576f242f63 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073common.h bb7955387f6a286927e7922019676ca0aba713e6 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073internal.h 35367f08b96510a5312653b5197d6bb34c0a3d00 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073event.h a0cf9dfb520e3320cd9c154c01cd2f1a7bbbd864 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073dp.h c2066c407f81538047c435fffca2705c28107663 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073specific.h d727b328e995a7d969ec036f2d5b52264568a7bf - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073system.h 52f251090780737f14eb993150f3ae73be303921 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073dpu.h 77eb4fab61225663a3f49b868c983d5d532ca184 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073svp.h 6ca26c7149455e43f32e8b83b74f4a34a24a2d29 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073base.h 134d43961ea1d42fc36d75685fdd7944f92b0b53 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073dfp.h 022feef64678b2f71ab70dc67d5d604054990957 - src/common/sdk/nvidia/inc/ctrl/ctrl0073/ctrl0073psr.h 2a00952f0f3988c5425fec957a19d926ae75ba28 - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370verif.h 79b38bbe679d397b48b78266aa5f50459fe5b5bc - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370base.h 514d012dbfd9e056b7f729bccb213fa9193d433e - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370or.h 6ef99465758f71f420ac17765380cc37dbcac68a - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370event.h 5f70c2eb6a144bc4d7ca8be63fa46391909e8201 - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370rg.h f4ed3ccff4720114d1aaed82484ed70cf07626db - src/common/sdk/nvidia/inc/ctrl/ctrlc370/ctrlc370chnc.h ba3b73356bf0d1409ecfd963b623c50ec83f1813 - src/common/sdk/nvidia/inc/ctrl/ctrla06f/ctrla06finternal.h bb0a5ff091ef854b19e7da0043b7b7b10232c3de - src/common/sdk/nvidia/inc/ctrl/ctrla06f/ctrla06fbase.h 1f25c9f215991f34fee94dafac5fad0e7460db1c - src/common/sdk/nvidia/inc/ctrl/ctrla06f/ctrla06fgpfifo.h ddeb0df51d5f662948f9098a5d85b40c8ab6504b - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070base.h e3fb93f0ff3469ec76cecdc6f0bf1c296551a2b1 - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070impoverrides.h a138379dd76c468072f1862b8fc6ae79ee876b4e - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070common.h ee99443c1bd3441df474566622486b04c4502ac0 - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070verif.h 44e1b06211eee31e42e81879f5220f26ddec70ae - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070rg.h ff789d585a7f001b8bd32e07a268c635d39b17ab - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070or.h 03f54e22b39ad5cf682eada7147c6c155f16b385 - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070chnc.h e8d883de767aa995a374d8da56b5c9da8787cb1d - src/common/sdk/nvidia/inc/ctrl/ctrl5070/ctrl5070system.h 8fdb493bda6119025c1d00f289a6394e7dcd1b53 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080flcn.h cfa32c37f373eeef53aedc3f4dffff1634c122e8 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080gpumon.h 41a0a14e04527fa2c349d2895bb41affd154c999 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080dmabuf.h ecd312fabb249a25655e151cee3615c5ab61ffa7 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080pmgr.h c30b5995d353e68623b32fea398f461351e3b8f1 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080lpwr.h aa0f685b94bdae99a58aa1a45735b0593a2e6f5a - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080vfe.h aa86ffd04a55436ecacbedb1626f6187bbddedf7 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080perf_cf.h 3423a69bba50e1405b5a7d631bfff1f6f0a1673f - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080grmgr.h 1990d0c4fa84c6d078282d4d7d0624ccb0325ce7 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080unix.h 146263409e5304f661da349b56761ab7403144bd - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080fb.h 8b622186edb156e980d02bd59a71c01923d1aa23 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080tmr.h 70dc706ea4ee7b143a716aae9e4f8c0bcef6c249 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080clk.h 0a156fc54f45386fabd06ef5ec11ba3a816fbfb7 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080boardobj.h c157e185d3c64ee9476ddc75881bfc5a5b8b997f - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080nvd.h 785d96360f86bc53eb428fd3f4fbeda395400c8a - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080bios.h b8e8c5ccab01d7997d1fd5579a690cb3279a8ab3 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080base.h b2eecbca32d87b939858bf0b22f93c06b49b3a04 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080i2c.h 24a891a02e1a882769d4da3454e4dfcf42b1ea6c - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080ecc.h 6969b092708d57f88b0f0fdbb3464c786f90710c - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080bus.h 013bd8d50841ea314f5ea2bd507470f2c3aff831 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080fifo.h d63388ff48ca055c82bcd6148506eacd0e26b4dc - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080vgpumgrinternal.h 96f72ec608cd198be995f3acd9c04afe7c7e6dc8 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080volt.h 359c6b06f2712a527d1ef08465179c14a8b4a751 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080acr.h 4c2af959d06536294d62b2366a6ba61ca744bd50 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080dma.h d15e8e86ca66b3a69a774e322dfdd349b9f978b9 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080spdm.h 898fa08818b657c27b456d952e7a4e09d8d197ee - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080illum.h 9933e90ad92eb7df2f64dcc30dcd680d5f7c530d - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080ce.h 18d1a44b7113c1707bbf5c65fb1be790304c0bed - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080gpu.h 0cd5e883dfafb74ce2ec9bccca6e688a27e6cfa9 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080perf_cf_pwr_model.h 07f82ae90cde3c6e2e6c5af135c40e01660c39a3 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080boardobjgrpclasses.h c8f1c115d78bab309c0a887324b0dabfb8f9ea2d - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080gsp.h ecceb8f7382c8f55c6ccd0330e14ccbc49fcd09c - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080mc.h 2577a1d505a3d682e223fbcbc6d4c7d13162749d - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080nvlink.h d3969094e68f9d584ba9c6fb5457801caff6ccc1 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080pmu.h 74f1abf45a2a0f60c82e4825b9abfa6c57cab648 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080power.h 115f683e5926ae130de87e4cea805ef6915ed728 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080pmumon.h d4ba227a522423503e5044c774dbcca692c48247 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080rc.h 97bb79e74b25134fa02a60d310b3e81170df6fd6 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080clkavfs.h baeb07c8bdadf835db754452f63d40956bc6a199 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080event.h 338c7de5d574fe91cda1372c5221e754d4c4b717 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080perf.h 4e4a4f9e94f2d7748064949f4b16845829670bf6 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080thermal.h 5ac6c9a299256935259eaf94323ae58995a97ad7 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080gpio.h e4441458a7914414a2092f36a9f93389ed65154a - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080fuse.h b55e4cf81b6112868eb6f6cd9c1a3b32f8fcda49 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080gr.h 302f79771fcdba3122cf61affb53e0a3a3a27e6d - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080internal.h 5c7b955ef5e6f6ca9c0944e8a2b2c4a1ae760e04 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080spi.h 93a9fa93eb3d1099991e4682b6228124220ca293 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080fla.h 7f1af5b788616bab285a73bab5098fb6d134b159 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080fan.h 51dbd71f1cd5a66dd7a5b0fbb753713d27ff937c - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080ucodefuzzer.h cf1757ff453132fb64be0dec6c50eb935db29784 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080nvlink_common.h 59254e4bdc475b70cfd0b445ef496f27c20faab0 - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080cipher.h 119432bbce99e91484a2bac79ca5257a36a7f98b - src/common/sdk/nvidia/inc/ctrl/ctrl2080/ctrl2080hshub.h 7f15697ca8645f77352f88c2a84713f348e98a24 - src/common/unix/nvidia-3d/include/nvidia-3d-vertex-arrays.h 220ac9628fe5afa0191b8c20304402baf0f70353 - src/common/unix/nvidia-3d/include/nvidia-3d-fermi.h 23478354284aa1be69bc70fa4157aa408177829c - src/common/unix/nvidia-3d/include/nvidia-3d-volta.h 75859a11c0fae125a0619c47ead964416ac8d6ed - src/common/unix/nvidia-3d/include/nvidia-3d-pascal.h e621c127011311e8f97c8784d8539751a820bf47 - src/common/unix/nvidia-3d/include/nvidia-3d-maxwell.h 07fc2cd8495309f1218b9ddee4a4809b6dcb65a3 - src/common/unix/nvidia-3d/include/nvidia-3d-types-priv.h 1276b525f23b582e029c2ddc9ed0115f8e9dafb4 - src/common/unix/nvidia-3d/include/nvidia-3d-hopper.h 5030b264e17b70df0c99bc9da4350bdb48f2f60a - src/common/unix/nvidia-3d/include/nvidia-3d-kepler.h 146b4f305bfe710622a878fe3e9afd4f834124b8 - src/common/unix/nvidia-3d/include/nvidia-3d-turing.h 61f0a408812c04a59fb8f12713ce34d2ed544fe3 - src/common/unix/nvidia-3d/include/nvidia-3d-surface.h e7a4acaef431a49ca7efd6bf72b6e8b57fafbab0 - src/common/unix/nvidia-3d/include/nv_xz_mem_hooks.h 40a9c57cca5b2f8acfe3ead472dcf0adc9423050 - src/common/unix/nvidia-3d/src/nvidia-3d-vertex-arrays.c af1a4d99bd19b72de120ba2046f35b95650985b1 - src/common/unix/nvidia-3d/src/nvidia-3d-volta.c f78f737f1dfb52cf248543cced017a8fbad7b270 - src/common/unix/nvidia-3d/src/nvidia-3d-surface.c 4ea7a2a6811239760a1b56833fb07dbf8a99a10e - src/common/unix/nvidia-3d/src/nvidia-3d-hopper.c e43e6ce6b9781d44b68868703fdbb779fc95f5d4 - src/common/unix/nvidia-3d/src/nvidia-3d-kepler.c 09fa5fbae25e08c819277566d7281f17305863f8 - src/common/unix/nvidia-3d/src/nvidia-3d-turing.c e0ef9ab77cfdf207c800a9c067739add28632047 - src/common/unix/nvidia-3d/src/nvidia-3d-pascal.c 57f19f6aa7b896794aafacd978b2469d976f6f78 - src/common/unix/nvidia-3d/src/nvidia-3d-maxwell.c 08c29625af227debb72dd703630a754ac4fbeee0 - src/common/unix/nvidia-3d/src/nvidia-3d-core.c 7ca41841cc54bd597f5c10cc346b8f574b1c2acf - src/common/unix/nvidia-3d/src/nvidia-3d-fermi.c d0331b7ebba0537af50bdf5815d9c048cbeb3388 - src/common/unix/nvidia-3d/src/nvidia-3d-init.c 569a662ce5f79dc450f44eeb7a0ff36580ba27fe - src/common/unix/nvidia-3d/interface/nvidia-3d-types.h a06524af04de90562b08b6b26783232cf7ff01d4 - src/common/unix/nvidia-3d/interface/nvidia-3d-utils.h 3e97ecc773087c0c7f370faf0a9ff838793c9bd6 - src/common/unix/nvidia-3d/interface/nvidia-3d-color-targets.h 2d91e6f3ad425d3ca95de79ecb929b22cac57f52 - src/common/unix/nvidia-3d/interface/nvidia-3d-shaders.h fd454a2318e970e6b1cb4a4b7b5633e4cb2e8b45 - src/common/unix/nvidia-3d/interface/nvidia-3d.h 34daeec12bbf45f0f85406afc56414da45afc2e6 - src/common/unix/nvidia-3d/interface/nvidia-3d-shader-constants.h 727210acfe72963aa6dddf1bcee91dc122897113 - src/common/unix/nvidia-3d/interface/nvidia-3d-constant-buffers.h 069b576dc1f03143999512cd03fc48fe18ed6706 - src/common/unix/nvidia-3d/interface/nvidia-3d-imports.h 2476f128437c0520204e13a4ddd2239ff3f40c21 - src/common/unix/common/inc/nv-float.h 881cbcc7ed39ea9198279136205dbe40142be35e - src/common/unix/common/inc/nv_assert.h cb7c13757ca480e10b4ef3e3851d82ad5ccca3f1 - src/common/unix/common/inc/nv_mode_timings.h d5253e7e4abd3ad8d72375260aa80037adcd8973 - src/common/unix/common/inc/nv_dpy_id.h 3e64a8fe60bb1266a769be8a5c0716e10c816b38 - src/common/unix/common/inc/nv_amodel_enum.h 995d8447f8539bd736cc09d62983ae8ebc7e3436 - src/common/unix/common/inc/nv_common_utils.h edded9ca3d455444372fe6c497b2d61bd0cc3f96 - src/common/unix/common/utils/nv_memory_tracker.c 7bccb5a3dea9208f0fbd86d36efc369f215d5c3c - src/common/unix/common/utils/unix_rm_handle.c 26f2a36442266c5d2664d509ecfd31094a83e152 - src/common/unix/common/utils/nv_vasprintf.c e903bbbecf4fb3085aaccca0628f0a0e4aba3e58 - src/common/unix/common/utils/nv_mode_timings_utils.c 667b361db93e35d12d979c47e4d7a68be9aa93b6 - src/common/unix/common/utils/interface/nv_mode_timings_utils.h 07c675d22c4f0f4be6647b65b6487e2d6927c347 - src/common/unix/common/utils/interface/nv_memory_tracker.h 8d9c4d69394b23d689a4aa6727eb3da1d383765a - src/common/unix/common/utils/interface/unix_rm_handle.h 9e008270f277e243f9167ab50401602378a2a6e8 - src/common/unix/common/utils/interface/nv_vasprintf.h 673bbd33569f55a900b5388a77d19edd3822ecf3 - src/common/unix/xzminidec/src/xz_dec_stream.c 9c67bdcbea04fbe1a5b2746549e502cdc368b54e - src/common/unix/xzminidec/src/xz_config.h f2cfbcf1e2cb1d7545b5de609a4e7672bf8ae976 - src/common/unix/xzminidec/src/xz_dec_bcj.c 93af3bcdf863afa9655107c86f49aefdf9c05d90 - src/common/unix/xzminidec/src/xz_lzma2.h fba46fe8f4a160d71a708578a85ab6731e4e024f - src/common/unix/xzminidec/src/xz_crc32.c 0ce26be0fb63a7ae52e2bb15a1770c80b9a5ac84 - src/common/unix/xzminidec/src/xz_stream.h 8365ec8d875fad74507d49228ad8959c66bbc360 - src/common/unix/xzminidec/src/xz_dec_lzma2.c 2ade48b4c53fc3bebf1587bc0a1a08b26cd5981d - src/common/unix/xzminidec/src/xz_private.h c2a87873eeff2a8010bb8a2cb8d1df28a20a0097 - src/common/unix/xzminidec/interface/xz.h 4498dc65d71b2b8635b365550e5e521da14c8e6b - src/common/unix/nvidia-push/include/nvidia-push-priv.h 4847b168b4f5e78dbb92cfec80734789a9131b87 - src/common/unix/nvidia-push/include/nvidia-push-priv-imports.h 616dd99d8dda5dbe35032a5fc558ff48f7cc1620 - src/common/unix/nvidia-push/src/nvidia-push-init.c 0916485ec1ff275771d88a725dcbf586663dbc33 - src/common/unix/nvidia-push/src/nvidia-push.c 548f9e591d2c851b157575e1b83e25eb47bc61e6 - src/common/unix/nvidia-push/interface/nvidia-push-methods.h 5f5013bdbda9582252db2e92a105a57f24ca7d96 - src/common/unix/nvidia-push/interface/nvidia-push-init.h f3576444d1dbcc4e9379bee6151ef8c7a382e276 - src/common/unix/nvidia-push/interface/nvidia-push-utils.h 918c4f2e2edd0a52c7085f758286dacd21b5b4c5 - src/common/unix/nvidia-push/interface/nvidia-push-types.h b54add7dea08ff736ac27ee259f6ccb389c01f09 - src/common/unix/nvidia-headsurface/nvidia-headsurface-types.h 5d014581148b38eede1d31a1f48e388cf6eb7a45 - src/common/unix/nvidia-headsurface/nvidia-headsurface-constants.h e1fbb040ea9d3c773ed07deb9ef5d63c8c8cab7a - src/common/inc/nvSha1.h 8f0d91e1a8f0d3474fb91dc3e6234e55d2c79fcc - src/common/inc/rmosxfac.h bcad75550591ede46152403e40413f87e85b0a80 - src/common/inc/nvlog_defs.h ebccc5c2af2863509e957fe98b01d9a14d8b0367 - src/common/inc/nv_list.h 0e970acfcadddd89fae91c812647fecb80c98d52 - src/common/inc/pex.h 73e2133709eb920a92fcebf7aaab958020493183 - src/common/inc/nvctassert.h 6fa5359ffe91b624548c226b6139f241771a9289 - src/common/inc/jt.h 489ce9f046d9c2ff95a1284ab5e04b5843b874ae - src/common/inc/nvVer.h 7ab322addb3e1ba880cee07dc0d26d882db097b0 - src/common/inc/nvCpuIntrinsics.h d9c0905f374db0b9cc164ce42eab457d1ba28c53 - src/common/inc/nvop.h d70c17a0693c8b5dbf7c83f693eec352ce22917c - src/common/inc/nv_smg.h b4c5d759f035b540648117b1bff6b1701476a398 - src/common/inc/nvCpuUuid.h 4282574b39d1bcaf394b63aca8769bb52462b89b - src/common/inc/nvBinSegment.h 8c41b32c479f0de04df38798c56fd180514736fc - src/common/inc/nvBldVer.h 62e510fa46465f69e9c55fabf1c8124bee3091c4 - src/common/inc/nvHdmiFrlCommon.h 82aadec9509f41eab58727c3498dc24a30a0128e - src/common/inc/nvrmcontext.h d74a8d4a9ae3d36e92b39bc7c74b27df44626b1c - src/common/inc/nv_mig_types.h a346380cebac17412b4efc0aef2fad27c33b8fb5 - src/common/inc/nvlog_inc2.h e670ffdd499c13e5025aceae5541426ab2ab0925 - src/common/inc/gps.h 963aebc9ec7bcb9c445eee419f72289b21680cdd - src/common/inc/hdmi_spec.h 987027bed503d8ce5ad01706aae4a16ee37f3e2d - src/common/inc/nvSemaphoreCommon.h 5257e84f2048b01258c78cec70987f158f6b0c44 - src/common/inc/nvlog_inc.h 4a88a536b71995db70e3a83a48d47072693ec69d - src/common/inc/nv_speculation_barrier.h 2408132586b69e580ff909f7f66451aa2882abff - src/common/inc/nvPNPVendorIds.h 4f7ca8fb43d6885cf60869ed241476032f20f5f3 - src/common/inc/nvUnixVersion.h 23edf9cce2608c494dad045b9466b8f3a18bab56 - src/common/inc/displayport/dpcd20.h ecc26f6fae35818791733c1a56ea1b556bba7f4f - src/common/inc/displayport/displayport2x.h aad6f14dacdb166a8d884cae6c5f382d98e5c46c - src/common/inc/displayport/dpcd14.h 27572a26d0a0a32f38606323ea6da65096bac039 - src/common/inc/displayport/displayport.h 8f7c9c19a76eca84fc2556841042c2f1c3d07a1a - src/common/inc/displayport/dpcd.h 4ee8a4d2a0fe12d348ac4c1a1e0a22bd272e146d - src/common/inc/swref/common_def_nvlink.h e182f9538fea08b5d25f3e74083a7a12a7d49809 - src/common/inc/swref/published/nv_ref.h 641e9803749cbeeca1149c43fe2da5e6edf25137 - src/common/inc/swref/published/nv_arch.h 059493ce7d5390b7e859a19d1a24752df8126ace - src/common/inc/swref/published/turing/tu102/kind_macros.h 86a59440492fd6f869aef3509f0e64a492b4550d - src/common/inc/swref/published/turing/tu102/dev_mmu.h 38589617aab40efdd86b401a18d1e28b5d3b9f8e - src/common/inc/swref/published/disp/v05_02/dev_disp.h 1ea0c3d6ea0c79c01accc7b25d15b421ab49a55d - src/common/inc/swref/published/disp/v04_02/dev_disp.h c01e4a95ede641ff5a9e6918b39db4d2099c91cb - src/common/inc/swref/published/disp/v05_01/dev_disp.h 04345c77f8c7a8b4825f0cb7fc96ca7c876af51c - src/common/inc/swref/published/disp/v04_01/dev_disp.h 1604a3fa3e3142118c82a1dc621cdac81806195a - src/common/inc/swref/published/disp/v03_00/dev_disp.h c4f12d6055573a19f9211fdddd3778575e2a17fd - src/common/inc/swref/published/disp/v02_04/dev_disp.h 64c123c90018c5ee122b02b02cbccfcd5ec32cab - src/common/inc/swref/published/t23x/t234/dev_fuse.h b5ce995e9e5afcd73d39642e31998e087ea133e8 - src/common/shared/nvstatus/nvstatus.c 08816a33e698308c76f3a026c29d0dcb41c5ee20 - src/common/shared/inc/compat.h 9231ac111286772170925e8f6cf92bde5914abb8 - src/common/shared/inc/nvdevid.h 750ecc85242882a9e428d5a5cf1a64f418d59c5f - src/common/displayport/inc/dp_object.h a6ff1a7aee138f6771c5b0bbedb593a2641e1114 - src/common/displayport/inc/dp_messages.h 80380945c76c58648756446435d615f74630f2da - src/common/displayport/inc/dp_timeout.h cdb1e7797c250b0a7c0449e2df5ce71e42b83432 - src/common/displayport/inc/dp_merger.h 070b4f6216f19feebb6a67cbb9c3eb22dc60cf74 - src/common/displayport/inc/dp_buffer.h 02b65d96a7a345eaa87042faf6dd94052235009c - src/common/displayport/inc/dp_messageheader.h 78595e6262d5ab0e6232392dc0852feaf83c7585 - src/common/displayport/inc/dp_auxbus.h e27519c72e533a69f7433638a1d292fb9df8772e - src/common/displayport/inc/dp_crc.h b2db6b37515f7c979e18686694546b9fa5145459 - src/common/displayport/inc/dp_hostimp.h 29ee5f4ef6670f06e96c07b36c11e3bad8bee6aa - src/common/displayport/inc/dp_address.h 575f4f97189ad6b4944bdd4127cdbee79d8c688d - src/common/displayport/inc/dp_groupimpl.h cf09c061fa898cd84edd34a9457726abc501b03c - src/common/displayport/inc/dp_configcaps.h afa1135330de2ce8f1a6d20e99b54f507b5adbbd - src/common/displayport/inc/dp_evoadapter.h 01f1dd58ed5bb12503fa45be7a6657cde0a857e2 - src/common/displayport/inc/dp_guid.h cca426d571c6b01f7953180e2e550e55c629f0f4 - src/common/displayport/inc/dp_auxretry.h a086546bf92d7e5e9adf66dcac012b3dc81c2597 - src/common/displayport/inc/dp_internal.h f6e1b0850f5ed0f23f263d4104523d9290bb8669 - src/common/displayport/inc/dp_vrr.h 2f134665b274bb223c3f74e0ec5c6a0392fa6387 - src/common/displayport/inc/dp_discovery.h 07d22f84e6a386dad251761278a828dab64b6dd5 - src/common/displayport/inc/dp_bitstream.h f09aae8321de23e0a48072d0e082aecb84a3ebbe - src/common/displayport/inc/dp_mainlink.h cae50568f7bef4a2a69c4d718a5297b9ae15da3f - src/common/displayport/inc/dp_deviceimpl.h eb9cdbb0a907926b1afd2a551ec19830f06ae205 - src/common/displayport/inc/dp_splitter.h 5bd3706ceea585df76a75dda7f9581b91ee8f998 - src/common/displayport/inc/dp_tracing.h 4a098c4d09dedc33b86748d5fe9a30d097675e9f - src/common/displayport/inc/dp_list.h 6c87ce702f215b21c1ab0064a2a85b3eda96ecec - src/common/displayport/inc/dp_edid.h be558902391fb6cb5085652b560391b54befca4b - src/common/displayport/inc/dp_printf.h 379d3933c90eaf9c35a0bad2bd6af960a321465f - src/common/displayport/inc/dp_wardatabase.h 2016714a04d46ac8412ef55d2156d86ba4d594eb - src/common/displayport/inc/dp_auxdefs.h e2075486b392d6b231f2f133922ac096ca4bc095 - src/common/displayport/inc/dp_ringbuffer.h 09c80a469f1e7e0edd6381578d66fd0e789bc0db - src/common/displayport/inc/dp_regkeydatabase.h 7622cb576c2ebbfe65c0f6132d8561ab1815f668 - src/common/displayport/inc/dp_qse.h dd420c9e7c271d8bea047d431667524105473e95 - src/common/displayport/inc/dp_linkconfig.h e02e5621eaea52a2266a86dcd587f4714680caf4 - src/common/displayport/inc/dp_linkedlist.h 430f42522a1e60f2420aa2e4e471aa20945d0253 - src/common/displayport/inc/dp_timer.h 0f71b80d0a0d53fc6581ef341a4e637a467a3795 - src/common/displayport/inc/dp_connectorimpl.h c8c55dfc7b085b421b01bd9dc7b74abe6f9a0932 - src/common/displayport/inc/dp_connector.h 78ef30b2caf2cf4ff441b5613a796b93ae8973bd - src/common/displayport/inc/dp_messagecodings.h 1363fca23628f312c4b6b0c868b8a43f4a8a5a24 - src/common/displayport/inc/dp_watermark.h d2b00a849a81f6c6092e3b2c4e7ed20fcee62b39 - src/common/displayport/inc/dptestutil/dp_testmessage.h 70b155b0da07a92ede884a9cec715f67e6b5c3e8 - src/common/displayport/src/dp_list.cpp 107b170d4496a754f22819e66794bcdc51256b7c - src/common/displayport/src/dp_sst_edid.cpp fea946e5320e7de8e9229bca8d4a6a14b9e8db59 - src/common/displayport/src/dp_crc.cpp 2caf1cd4a99e55126883dbdd9f6b74883c71e171 - src/common/displayport/src/dp_messagecodings.cpp ef3fefa8dd819d4086c054919b769ca18d058469 - src/common/displayport/src/dp_wardatabase.cpp c49e37f3e225e60a74c71a2b571e542e12fd9bc9 - src/common/displayport/src/dp_watermark.cpp e874ffeaeb6deec57605bf91eaa2af116a9762bd - src/common/displayport/src/dp_bitstream.cpp d699ce22e5e2d641caa2fbacca3095d7dd7b3ffe - src/common/displayport/src/dp_evoadapter.cpp 5f2fb1683cff15175e3ef2276b721863886adc79 - src/common/displayport/src/dp_vrr.cpp 0717b87aafecbe2216e0f0b53ee088a980ef7ad4 - src/common/displayport/src/dp_auxretry.cpp 0670fb5302b1bd3fc65daa848f23e4086619b5e6 - src/common/displayport/src/dp_discovery.cpp 5c12759c27407e8df4c8f1f7bc6ec1595b6b1a63 - src/common/displayport/src/dp_messages.cpp 93ba2409667997fdbcb7af1a8f24ec4a0e15b62c - src/common/displayport/src/dp_timer.cpp ffdd039884b1400eaf4d6d7cc81d0faba5282014 - src/common/displayport/src/dp_deviceimpl.cpp c625716e5516a290ac501563e2a73eef9b4f7dd6 - src/common/displayport/src/dp_edid.cpp af1672e8abb92d8d574d9605285753a8580c5d10 - src/common/displayport/src/dp_groupimpl.cpp 2cda981a5e36285ba4173573d074f8761e74f186 - src/common/displayport/src/dp_qse.cpp 5c7adbdfe295f7e1a1d4899a62bf95b456f84412 - src/common/displayport/src/dp_messageheader.cpp d3c4c54f96cc02d37fab45521685426e5c38fb4d - src/common/displayport/src/dp_mst_edid.cpp f56f92e32710b0342805b785d34ba1a9f2a54ed3 - src/common/displayport/src/dp_guid.cpp eb7e47407bd04e871f891038cc08736d066ffaa9 - src/common/displayport/src/dp_connectorimpl.cpp a62b774b7c45882b5854b91b600987c343c24966 - src/common/displayport/src/dp_linkconfig.cpp 0a8818da34b5321763c1f60cb8b6ea5e1a2837f1 - src/common/displayport/src/dp_splitter.cpp 24c0787ce5ec691c6b8edb351000265f47e0156a - src/common/displayport/src/dp_buffer.cpp 422a5d3426d5e1cc2346d9d5f86ccde66062ffdc - src/common/displayport/src/dp_merger.cpp 41589d1d5bfa4316d5d066a7201226baed5332db - src/common/displayport/src/dp_configcaps.cpp a0b68fce10eb0b95518cfd291e2d282872225295 - src/common/displayport/src/dptestutil/dp_testmessage.cpp f0a73cd173382d8abd4b0c70da8b32e144740bb5 - src/common/modeset/timing/nvt_dmt.c 15d7c508b621c877887962b2c27cdb6c7d1144a0 - src/common/modeset/timing/nvt_util.c 1341b987df8336c882e31d22d2141cadfb67272d - src/common/modeset/timing/nvtiming.h f8faf3eabd24a1239e1d4faebdc40c0ffa713ff9 - src/common/modeset/timing/nvt_edid.c c95a1c7914b0d1cba366f2a29e08eb93e0ad033d - src/common/modeset/timing/nvt_edidext_displayid.c 3d3a0889baed7a15c2adce54ba56c1dc783faffd - src/common/modeset/timing/dpsdp.h ff92b05f8648cb4bc31c0f64707065bb56ff3eb3 - src/common/modeset/timing/nvt_dsc_pps.c f75b1d98895bdccda0db2d8dd8feba53b88180c5 - src/common/modeset/timing/displayid.h 1997adbf2f6f5be7eb6c7a88e6660391a85d891b - src/common/modeset/timing/nvt_gtf.c 2737ed1d1eccd163f9cd12b1944f96a03c526b31 - src/common/modeset/timing/nvtiming_pvt.h 58b68f1272b069bb7819cbe86fd9e19d8acd0571 - src/common/modeset/timing/edid.h 6d221aad371436ba304448ba2cf04f89148a09bb - src/common/modeset/timing/nvt_edidext_displayid20.c 48761f63bc2794dfbde10492cc53137458cfcd0e - src/common/modeset/timing/nvt_dsc_pps.h 08ef97092899a3dc80251f61cedc73a851d70baa - src/common/modeset/timing/nvt_edidext_861.c d7cb716eeae50ecfe44fb3c4c4476de598ab78d7 - src/common/modeset/timing/nvt_tv.c 080c1de64d099ecb1aeb9b0b2f176f7be2d609b5 - src/common/modeset/timing/displayid20.h 1c2e163802849848e9ae1586d38c4cd82494217f - src/common/modeset/timing/nvt_ovt.c 54aa88075d9ceb9c6ef99d9c15cb32751a33f8d0 - src/common/modeset/timing/nvt_cvt.c e13cbe77f864afcddaccff7aeb1923cd02f1482f - src/common/modeset/timing/nvt_displayid20.c f8911888bdd441666c03fe27381d7730b7dd9131 - src/common/modeset/hdmipacket/nvhdmipkt_internal.h 12118b508a757fd0a162d1e740d93685a67363ea - src/common/modeset/hdmipacket/nvhdmipkt.c 5b541b9ab6fe9333815a760d4043fef725b1c848 - src/common/modeset/hdmipacket/nvhdmipkt_C971.c 83d94f0a5eb7318d00d96115b0139f9f99052ddc - src/common/modeset/hdmipacket/nvhdmipkt_CC71.c b390bf4f74d690068ff24dce90b79b227769ac2f - src/common/modeset/hdmipacket/nvhdmipkt_C671.c 206727972ab3a5f8a2cde0e153d63aef929b6c01 - src/common/modeset/hdmipacket/nvhdmipkt_0073.c a71968671ce6b64e235de6902bebc2a06da7ae04 - src/common/modeset/hdmipacket/nvhdmipkt_9171.c 54a1b5e5aaf0848a72befc896ed12f1de433ad4f - src/common/modeset/hdmipacket/nvhdmipkt_9471.c 57dbf547549c6fe24eb51cc54185b321c263108f - src/common/modeset/hdmipacket/nvhdmipkt.h 9be7b7be94a35d1d9a04f269ff560dbbb7860a2a - src/common/modeset/hdmipacket/nvhdmipkt_9571.c 559406ebdbd7f810f1ecbeb3e78b6518834b90fe - src/common/modeset/hdmipacket/nvhdmipkt_class.h e1df3885cd76f5159801c1f66f20b18537eaecf3 - src/common/modeset/hdmipacket/nvhdmipkt_C871.c 5e12a290fc91202e4ba9e823b6d8457594ed72d3 - src/common/modeset/hdmipacket/nvhdmi_frlInterface.h 67db549636b67a32d646fb7fc6c8db2f13689ecc - src/common/modeset/hdmipacket/nvhdmipkt_9271.c e6d500269128cbd93790fe68fbcad5ba45c2ba7d - src/common/modeset/hdmipacket/nvhdmipkt_C371.c 764d216e9941d0dcf41e89b2a0ddd8acf55902c8 - src/common/modeset/hdmipacket/nvhdmipkt_common.h b882497ae393bf66a728dae395b64ac53602a1a5 - src/common/softfloat/nvidia/nv-softfloat.h be9407a273620c0ba619b53ed72d59d52620c3e4 - src/common/softfloat/nvidia/platform.h f6d98979ab2d1e2b0d664333104130af6abbcad5 - src/common/softfloat/source/f64_to_i64_r_minMag.c 21a6232d93734b01692689258a3fdfbbf4ff089d - src/common/softfloat/source/s_roundToUI32.c 29321080baa7eab86947ac825561fdcff54a0e43 - src/common/softfloat/source/i32_to_f32.c dafa667ee5dd52c97fc0c3b7144f6b619406c225 - src/common/softfloat/source/s_mulAddF64.c 108eec2abf1cddb397ce9f652465c2e52f7c143b - src/common/softfloat/source/f64_roundToInt.c 513a7d1c3053fc119efcd8ae1bcc9652edc45315 - src/common/softfloat/source/f32_lt.c d19ff7dfece53875f2d6c6f7dd9e7772f7b0b7ec - src/common/softfloat/source/f32_to_i64_r_minMag.c 2db07bbb8242bc55a24ef483af6d648db0660de0 - src/common/softfloat/source/f32_add.c c951c9dffa123e4f77ed235eca49ef9b67f9f3d2 - src/common/softfloat/source/s_subMagsF64.c 5c1026617c588bcf5f1e59230bd5bb900600b9ac - src/common/softfloat/source/f64_mul.c 5c4ee32cc78efc718aaa60ec31d0b00b1bee3c2c - src/common/softfloat/source/f64_to_ui64_r_minMag.c 6fa7493285fe2f7fdc0ac056a6367e90327905c2 - src/common/softfloat/source/f32_sub.c da3b3f94a817909a3dc93ca5fa7675805c7979e0 - src/common/softfloat/source/f64_isSignalingNaN.c d701741d8d6a92bb890e53deda1b795f5787f465 - src/common/softfloat/source/f64_le.c baa7af4eea226140c26ffe6ab02a863d07f729fb - src/common/softfloat/source/f64_eq_signaling.c 2e5c29d842a8ebc5fbf987068dc9394cee609cc7 - src/common/softfloat/source/f32_to_ui64.c 054b23a974fc8d0bab232be433c4e516e6c1250a - src/common/softfloat/source/f64_lt_quiet.c dde685423af544e5359efdb51b4bf9457c67fa3b - src/common/softfloat/source/f32_sqrt.c fb062ecbe62a1f5878fd47f0c61490f2bde279dd - src/common/softfloat/source/s_roundToI32.c 8e58f0258218475616ff4e6317516d40ad475626 - src/common/softfloat/source/f32_lt_quiet.c ab19c6b50c40b8089cb915226d4553d1aa902b0e - src/common/softfloat/source/f64_to_i32_r_minMag.c 86fdc2472526375539216461732d1db6a9f85b55 - src/common/softfloat/source/s_roundPackToF32.c 9266c83f3e50093cc45d7be6ab993a0e72af1685 - src/common/softfloat/source/s_roundPackToF64.c 2e0fec421f4defd293cf55c5f3af7d91f4b7d2cc - src/common/softfloat/source/ui64_to_f32.c 68843a93e1f46195243ef1164f611b759cf19d17 - src/common/softfloat/source/f32_le_quiet.c 00ab2120f71117161d4f6daaa9b90a3036a99841 - src/common/softfloat/source/f32_to_ui32.c d0f8f08c225b60d88b6358d344404ba9df3038ec - src/common/softfloat/source/s_normSubnormalF32Sig.c 0108fe6f0d394ad72083aff9bb58507f97a0b669 - src/common/softfloat/source/ui32_to_f64.c 7bc81f5bc894118c08bfd52b59e010bc068ed762 - src/common/softfloat/source/ui32_to_f32.c 0adfa7e174cdb488bb22b06642e14e7fc6f49c67 - src/common/softfloat/source/s_roundToI64.c c3ce12c227d25bc0de48fbcf914fc208e2448741 - src/common/softfloat/source/f64_sub.c b9fd15957f7ae5effeccb5d8adaa7434b43f44e1 - src/common/softfloat/source/s_roundToUI64.c 29396b7c23941024a59d5ea06698d2fbc7e1a6ca - src/common/softfloat/source/f64_to_i64.c ae25eea499b3ea5bdd96c905fd0542da11083048 - src/common/softfloat/source/s_normRoundPackToF64.c b22876b0695f58ee56143c9f461f1dde32fefbf3 - src/common/softfloat/source/f64_to_ui64.c b8c5ccc1e511637d8b2ba2657de4937b80c01c07 - src/common/softfloat/source/f32_le.c 0126e0fceb1fa7912f4d5b8c3a6ebb4a048eb98a - src/common/softfloat/source/f16_to_f32.c 1ff879eca2a273293b5cd6048419b2d2d8063b93 - src/common/softfloat/source/f64_mulAdd.c 0e9694d551848d88531f5461a9b3b91611652e9a - src/common/softfloat/source/f64_to_ui32_r_minMag.c 5a5e0d9f1ee7e8c0d1d4f9fbcf6eba330a5f1792 - src/common/softfloat/source/f32_isSignalingNaN.c bc992c88f3de09e3a82447cf06dbde7c6604f7f8 - src/common/softfloat/source/f64_to_f32.c 1a86a6948bf6768bd23a19f1f05d40968c1d2b15 - src/common/softfloat/source/f64_rem.c 50daf9186bc5d0180d1453c957164b136d5ffc89 - src/common/softfloat/source/f64_eq.c 09cb0cdb90eb23b53cd9c1a76ba26021084710d1 - src/common/softfloat/source/s_addMagsF32.c 9f4d355d85fbe998e243fe4c7bbf8ad23062b6e2 - src/common/softfloat/source/i64_to_f64.c fd40a71c7ebf9d632a384fadf9487cfef4f3ea98 - src/common/softfloat/source/s_shiftRightJam128.c aaf6ccb77a1a89fa055a0fb63513297b35e2e54b - src/common/softfloat/source/f64_le_quiet.c 38bd00e9c4d2f1354c611404cca6209a6c417669 - src/common/softfloat/source/s_countLeadingZeros64.c d9a86343e6cc75714f65f690082dd4b0ba724be9 - src/common/softfloat/source/s_roundPackToF16.c 0bf499c0e3a54186fa32b38b310cc9d98ccdcfe3 - src/common/softfloat/source/f32_eq.c d4b26dc407a891e9ff5324853f1845a99c5d5cd2 - src/common/softfloat/source/f32_to_i32.c 296c40b0589536cb9af3231ad3dcd7f2baaa6887 - src/common/softfloat/source/f64_lt.c 0d8e42636a3409a647291fdb388001c2b11bba07 - src/common/softfloat/source/f32_to_f16.c 9a60700ce25578100d83d529e49f08f71cf35e17 - src/common/softfloat/source/s_normSubnormalF16Sig.c ec1a797b11f6e846928a4a49a8756f288bda1dfa - src/common/softfloat/source/i32_to_f64.c 729e790328168c64d65a1355e990274c249bbb3a - src/common/softfloat/source/f32_to_i32_r_minMag.c 9a5b93459ace2da23964da98617d6b18006fab86 - src/common/softfloat/source/s_countLeadingZeros8.c 84b0a01ba2a667eb28b166d45bd91352ead83e69 - src/common/softfloat/source/i64_to_f32.c 4b37be398b3e73ae59245f03b2ba2394fc902b4d - src/common/softfloat/source/s_normSubnormalF64Sig.c 6f83fa864007e8227ae09bb36a7fdc18832d4445 - src/common/softfloat/source/f32_mul.c daeb408588738b3eb4c8b092d7f92ac597cf1fc6 - src/common/softfloat/source/f32_rem.c a94c8c2bd74633027e52e96f41d24714d8081eb4 - src/common/softfloat/source/s_approxRecipSqrt_1Ks.c 69dc4cc63b2a9873a6eb636ee7cb704cbd502001 - src/common/softfloat/source/f64_to_ui32.c 50b3147f8413f0595a4c3d6e6eeab84c1ffecada - src/common/softfloat/source/s_normRoundPackToF32.c bbc70102b30f152a560eb98e7a1a4b11b9ede85e - src/common/softfloat/source/f64_sqrt.c 760fd7c257a1f915b61a1089b2acb143c18a082e - src/common/softfloat/source/s_addMagsF64.c ebb4f674b6213fec29761fc4e05c1e3ddeda6d17 - src/common/softfloat/source/f32_mulAdd.c 4445b1fbbd507144f038fd939311ff95bc2cf5f1 - src/common/softfloat/source/ui64_to_f64.c 871cb1a4037d7b4e73cb20ad18390736eea7ae36 - src/common/softfloat/source/f32_to_ui64_r_minMag.c ce37cdce572a3b02d42120e81c4969b39d1a67b6 - src/common/softfloat/source/f64_to_i32.c c29536f617d71fe30accac44b2f1df61c98a97dc - src/common/softfloat/source/f64_div.c 54cbeb5872a86e822bda852ec15d3dcdad4511ce - src/common/softfloat/source/f64_add.c e7890082ce426d88b4ec93893da32e306478c0d1 - src/common/softfloat/source/s_approxRecipSqrt32_1.c 824383b03952c611154bea0a862da2b9e2a43827 - src/common/softfloat/source/s_subMagsF32.c 00c612847b3bd227a006a4a2697df85866b80315 - src/common/softfloat/source/s_mulAddF32.c 7c8e5ab3f9bf6b2764ce5fffe80b2674be566a12 - src/common/softfloat/source/softfloat_state.c e4930e155580a0f5aa7f3694a6205bc9aebfe7aa - src/common/softfloat/source/f32_to_f64.c 1484fc96d7731695bda674e99947280a86990997 - src/common/softfloat/source/f32_to_i64.c 2960704c290f29aae36b8fe006884d5c4abcabb4 - src/common/softfloat/source/f32_div.c 23b76c1d0be64e27a6f7e2ea7b8919f1a45a8e7c - src/common/softfloat/source/f32_to_ui32_r_minMag.c fe06512577e642b09196d46430d038d027491e9f - src/common/softfloat/source/f32_eq_signaling.c 5e6f9e120a17cc73297a35e4d57e4b9cbce01780 - src/common/softfloat/source/s_mul64To128.c e0ad81cfb5d2c0e74dc4ece9518ca15ffc77beaf - src/common/softfloat/source/f32_roundToInt.c d8b0c55a49c4fa0b040541db6d5ff634d7d103e7 - src/common/softfloat/source/8086-SSE/s_propagateNaNF64UI.c a6d5c83f6a0542b33ac9c23ac65ef69002cfff9d - src/common/softfloat/source/8086-SSE/s_propagateNaNF32UI.c 8efb3f7cd3217b5cd25896b4bad058c72fe5b89a - src/common/softfloat/source/8086-SSE/specialize.h 3d0dbc0a672d039a6346e1c21ddf87ffc9181978 - src/common/softfloat/source/8086-SSE/s_f32UIToCommonNaN.c d152bc457b655725185bdff42b36bb96d6e6715e - src/common/softfloat/source/8086-SSE/s_commonNaNToF16UI.c 1dd1b424087d9c872684df0c1b4063b077992d5f - src/common/softfloat/source/8086-SSE/s_f64UIToCommonNaN.c 252c816378fddab616b1f2a61e9fedd549224483 - src/common/softfloat/source/8086-SSE/s_commonNaNToF64UI.c 21a11759ed2afd746a47c4d78b67640c2d052165 - src/common/softfloat/source/8086-SSE/s_commonNaNToF32UI.c 98a850359fe08a7e39212f89ce96014ba80910da - src/common/softfloat/source/8086-SSE/s_f16UIToCommonNaN.c 0cbae7a5abc336331d460cbd3640d2cda02af434 - src/common/softfloat/source/8086-SSE/softfloat_raiseFlags.c 4cd1d6cfca3936a39aab9bc0eb622f5c7c848be1 - src/common/softfloat/source/include/softfloat_types.h 1ded4df85ff5fa904fa54c27d681265425be1658 - src/common/softfloat/source/include/primitiveTypes.h 5f589a4d48cc59a0e5762303df9ea4a06ca398da - src/common/softfloat/source/include/softfloat.h 9d8a025889f3ec0e1cca7c4b52308158e1f39226 - src/common/softfloat/source/include/primitives.h f118cad66d3c8ee17a52cec97cd3dc7e7a1cf2bc - src/common/softfloat/source/include/internals.h 14045fa6330dc6ed20d35eac5b4c5909631bca90 - src/common/src/nv_smg.c abccf0a8732b881d904d937287ced46edcde45ac - src/nvidia/Makefile c5f16fdf43ca3d2845d120c219d1da11257072b0 - src/nvidia/nv-kernel.ld dcf4427b83cce7737f2b784d410291bf7a9612dc - src/nvidia/arch/nvalloc/unix/include/nv-reg.h 4750735d6f3b334499c81d499a06a654a052713d - src/nvidia/arch/nvalloc/unix/include/nv-caps.h 3c61881e9730a8a1686e422358cdfff59616b670 - src/nvidia/arch/nvalloc/unix/include/nv_escape.h 7fc52a43b242a8a921c2707589fa07c8c44da11c - src/nvidia/arch/nvalloc/unix/include/nv.h 81592e5c17bebad04cd11d73672c859baa070329 - src/nvidia/arch/nvalloc/unix/include/nv-chardev-numbers.h e69045379ed58dc0110d16d17eb39a6f600f0d1d - src/nvidia/arch/nvalloc/unix/include/nv-ioctl-lockless-diag.h d1b1a1bc1fa30c1a966e95447f7831a06340d2d0 - src/nvidia/arch/nvalloc/unix/include/nv-priv.h 7e0175a8006f06b1d5f5be078d851a4f01648b96 - src/nvidia/arch/nvalloc/unix/include/nv-nb-regs.h 2eb11e523a3ecba2dcd68f3146e1e666a44256ae - src/nvidia/arch/nvalloc/unix/include/nv-ioctl.h 5f004c33f130e6c5cd275f9c85d46185e4e9b757 - src/nvidia/arch/nvalloc/unix/include/os_custom.h 499e72dad20bcc283ee307471f8539b315211da4 - src/nvidia/arch/nvalloc/unix/include/nv-unix-nvos-params-wrappers.h 824ffbe85c591c7423855bee7bf3193473ef2b70 - src/nvidia/arch/nvalloc/unix/include/osapi.h 669bd0c054b00a74e8996c18063fa9bbf5cd7690 - src/nvidia/arch/nvalloc/unix/include/os-interface.h 2ffd0138e1b3425ade16b962c3ff02a82cde2e64 - src/nvidia/arch/nvalloc/unix/include/nv-ioctl-numa.h b3ecb82f142a50bdc37eafaeb86d67f10fbcf73f - src/nvidia/arch/nvalloc/unix/include/rmobjexportimport.h af45762b6eeae912cc2602acf7dc31d30775ade7 - src/nvidia/arch/nvalloc/unix/include/nv-kernel-rmapi-ops.h 107d1ecb8a128044260915ea259b1e64de3defea - src/nvidia/arch/nvalloc/unix/include/nv-ioctl-numbers.h 3a26838c4edd3525daa68ac6fc7b06842dc6fc07 - src/nvidia/arch/nvalloc/unix/include/nv-gpu-info.h 98a5a3bd7b94e69f4e7d2c3a1769583c17ef5b57 - src/nvidia/arch/nvalloc/unix/src/os.c a659a503a6fcffdcacd2b76ae6b1f156b4b9216c - src/nvidia/arch/nvalloc/unix/src/osmemdesc.c b5ae9b8d551a3e5489605c13686fb6cce4579598 - src/nvidia/arch/nvalloc/unix/src/power-management-tegra.c a17aae37486b325442e447489b64add3694ab8b0 - src/nvidia/arch/nvalloc/unix/src/osunix.c b5b409625fde1b640e4e93276e35248f0fccfa4c - src/nvidia/arch/nvalloc/unix/src/gcc_helper.c 07f9c0995f1fbbba9eb819321996b57c1d2b86cd - src/nvidia/arch/nvalloc/unix/src/exports-stubs.c d8815125dbf79831b8fe55367bba60e7115243cc - src/nvidia/arch/nvalloc/unix/src/osinit.c b1e9f004152562aebd967505fcc1f52b774aef15 - src/nvidia/arch/nvalloc/unix/src/osapi.c a7383deea9dcab093323d8dde1ede73f85f93343 - src/nvidia/arch/nvalloc/unix/src/rmobjexportimport.c b1a6d0a1ca4307b8e8d9cf136c94ef7c9efbae4c - src/nvidia/arch/nvalloc/unix/src/registry.c 915ee6dbffff92a86d68ac38549b25aa1e146872 - src/nvidia/arch/nvalloc/unix/src/os-hypervisor-stubs.c ffea38efca6a43af9bc61bb6cb8c2b14c3d6fc20 - src/nvidia/arch/nvalloc/unix/src/escape.c d1089d8ee0ffcdbf73a42d7c4edb90769aa79d8c - src/nvidia/arch/nvalloc/common/inc/nvrangetypes.h 8530e3d1db60647a9132e10c2119a75295f18060 - src/nvidia/arch/nvalloc/common/inc/nv-firmware.h 1cd024cc06bba6f7c3663ca2d03fe25bd77761d3 - src/nvidia/generated/g_gpu_mgmt_api_nvoc.c 0be1c1ff5f200a9aa68cdf3d03bc4780e757a1ea - src/nvidia/generated/g_traceable_nvoc.h 998d18bc2f6e2cdd00cf383000b66be8e8778baa - src/nvidia/generated/g_nv_debug_dump_nvoc.h 4491368ac52cfda834bdd24df3b6f156c32ec3a9 - src/nvidia/generated/g_client_nvoc.c 4eb2331b2f9f8d8c01d62ad771702e9b42f22b65 - src/nvidia/generated/g_lock_stress_nvoc.h 6b5bf7b2f5dd000bfa2949e14642dd582ba4a378 - src/nvidia/generated/g_event_buffer_nvoc.h cd5f4b0bc23710e5b6277ff214a62c4993e95581 - src/nvidia/generated/g_code_coverage_mgr_nvoc.c b9903d23010ea9d63117c27d5fe0cfba09849fa4 - src/nvidia/generated/g_context_dma_nvoc.c 4b7aaad308f2f25b07d932fc0fe0c3327db522a9 - src/nvidia/generated/g_objtmr_nvoc.h 7bd355d08dc6f2509db22ed56f1c05ab97f5f620 - src/nvidia/generated/g_allclasses.h 4eea9bd7952613f08af07508e2e9c1c0344940e7 - src/nvidia/generated/g_gpu_mgr_nvoc.h c5cad88aa7de5a04a3b6f9836f355347448d6a7b - src/nvidia/generated/g_rmconfig_util.h db1d1e047d00780efbe4c1c1ae6e4fecd3ab49e8 - src/nvidia/generated/g_os_desc_mem_nvoc.h 1ec59322d0874153252a387dcb50bf6d7328d56e - src/nvidia/generated/g_system_mem_nvoc.c 21e57b9c63e847eeb5a29c218db2c5c37db83298 - src/nvidia/generated/g_gpu_nvoc.c 4613f3d42dbc899b278fca71c3aaae79159d7dbe - src/nvidia/generated/g_gpu_user_shared_data_nvoc.c b55573cb02ff8129aa4f5aa050ac53d1f4fcfdb2 - src/nvidia/generated/g_rs_resource_nvoc.h 16c8d551a3a908ec194d39c88c5603cea436c9b7 - src/nvidia/generated/g_binary_api_nvoc.c a232e1da560db2322a921a9f0dc260ad703af2b4 - src/nvidia/generated/g_mem_nvoc.h c503ca5954b8f6ebdba96904a1616a55ce08a2d3 - src/nvidia/generated/g_device_nvoc.c e7cc58e9f8173583bd253fa73df56324e48aa5ad - src/nvidia/generated/g_io_vaspace_nvoc.h b93ab0b9e39ca3c5b397cbdba58e4d9894d4130f - src/nvidia/generated/g_rpc-structures.h afda2b8579ed309e23be0ad1a835ee84fcbe535f - src/nvidia/generated/g_client_nvoc.h e97edab623386f7d1534b4f053a66fc8659167f6 - src/nvidia/generated/g_event_nvoc.h f4b2bffbdbb2b0b398e8dfe3420e46b2bf27839c - src/nvidia/generated/g_hal_nvoc.h 4626f4a1a4eadc3695d79454db25bd0153d1165d - src/nvidia/generated/g_resource_fwd_decls_nvoc.h 30035e0fb1ae8b816fc42b78a17eb30462640ce4 - src/nvidia/generated/g_kernel_head_nvoc.h 52ae6273ddf101e9715aed99991506cad8e96859 - src/nvidia/generated/g_disp_inst_mem_nvoc.c abc769851bd523ee08cf829bf3864cf5475066ec - src/nvidia/generated/g_subdevice_nvoc.h 255c404719b18c2a3aec2a47948c0fbcf4affd4b - src/nvidia/generated/rmconfig.h c7fda8cbe109ad2736694ce9ec0e2ab93d0e3f2c - src/nvidia/generated/g_mem_list_nvoc.h f9bdef39159a8475626a0edcbc3a53505a0ff80a - src/nvidia/generated/g_os_hal.h dc7bbba203ee5ff91b6f14eb3abfad8c15854e1d - src/nvidia/generated/g_mem_desc_nvoc.h 1702c9d021149c0f5c73ebeda7bea29e246af31d - src/nvidia/generated/g_nv_name_released.h 2e0c45e4186d44774286a71daf797c980c2ddf7a - src/nvidia/generated/g_objtmr_nvoc.c 9b78bc02a8fe0ec297167bb4bdb7f8255b94198b - src/nvidia/generated/g_disp_capabilities_nvoc.h 967d8c0d7d5c1271e82f30af992f48322695d367 - src/nvidia/generated/g_eng_state_nvoc.h 831cdf0767703c00918e70ef3933716b201781f1 - src/nvidia/generated/g_syncpoint_mem_nvoc.c ce74dbd8f88f50af0b3ea3b3034395cd98eb08e8 - src/nvidia/generated/g_gpu_access_nvoc.c 08ad957117efefe2e04448bce1cad2dec0e984af - src/nvidia/generated/g_odb.h 033a6d6bac0829783afe8a582fa6c4f329be7f04 - src/nvidia/generated/g_hypervisor_nvoc.h c1471919f6c19e1b576b7c636ba5ae7ab9d58177 - src/nvidia/generated/g_gpu_db_nvoc.c f68b7e209e268d14b0b98686d1766683139b9b5f - src/nvidia/generated/g_system_nvoc.c cdcab5a0094b9e9664f7a0e62ec31783617de5ab - src/nvidia/generated/g_code_coverage_mgr_nvoc.h 5e614b6db957a0ae77502ca6d5966bca506f8020 - src/nvidia/generated/g_gpu_group_nvoc.h eb15207a28b8eed41182de6311ec48f5e321729f - src/nvidia/generated/g_gpu_user_shared_data_nvoc.h ef9def144aaf1b2b292c9815c68a6007eff56dda - src/nvidia/generated/g_rs_server_nvoc.c eb07ee114f8cfc039978cdb7501c3ea03c879864 - src/nvidia/generated/g_generic_engine_nvoc.c d2f3d17e05337992bc031c823186583d62c10235 - src/nvidia/generated/g_chips2halspec_nvoc.h ad94c2430328b91392db363158fa2279b794cc54 - src/nvidia/generated/g_gpu_resource_nvoc.h c77048521f9c9890f14108c2c5457d78a85fe69d - src/nvidia/generated/g_gpu_access_nvoc.h 38a98487eec65d8807e47f99b013619c1537e983 - src/nvidia/generated/g_dce_client_nvoc.c d09bde39b1f12490ea0a696d6915d521c9f13953 - src/nvidia/generated/g_rpc-message-header.h 9becba61ba5ff7580b353abfb87cbe0f37817195 - src/nvidia/generated/g_binary_api_nvoc.h 50f70075eac2515b189e2d07a06b13cfa826945f - src/nvidia/generated/g_rs_client_nvoc.h f8b984c6bc09554753cfe6692dde2eb3171abc57 - src/nvidia/generated/g_disp_channel_nvoc.h 4931b316fc042705a5f094c8c23b0038f980b404 - src/nvidia/generated/g_generic_engine_nvoc.h 2a28557874bd51f567ef42c75fd4e3b09d8ad44d - src/nvidia/generated/g_gpu_arch_nvoc.c a17058fe665949f1e3861fe092e29b229cefbe62 - src/nvidia/generated/g_mem_mgr_nvoc.h 7aa02b964507a8269d35dc56170955025b98bd1a - src/nvidia/generated/g_gpu_arch_nvoc.h 0b9296f7797325b80ff0900f19a3763b564eb26b - src/nvidia/generated/g_context_dma_nvoc.h 4210ff36876e84e0adf1e9d4afb6654c7e6e5060 - src/nvidia/generated/g_resserv_nvoc.h 3613b4ec9b285a4e29edefa833704789c887c189 - src/nvidia/generated/g_tmr_nvoc.c 517b6b986a3749c9a6dd0f22bbef6569cdb48d97 - src/nvidia/generated/g_rs_client_nvoc.c 7670f19682bcd6224c999a8f80e770368e735632 - src/nvidia/generated/g_lock_stress_nvoc.c b348b1b465cb359ca3cf10f5e121714ffb95b582 - src/nvidia/generated/g_standard_mem_nvoc.c 54fa23e7cf0f07d625c25d5c08dad9cd1714f851 - src/nvidia/generated/g_standard_mem_nvoc.h 7e528d775caa7ff2bf4159c94fc2c2e4d3aadffc - src/nvidia/generated/g_chips2halspec_nvoc.c 40aa2c65168c893c725c983b2219ceff03d05608 - src/nvidia/generated/g_gpu_halspec_nvoc.h 17c4ce5e67bf8bc8f48a4e2b1b7752d4597703ad - src/nvidia/generated/g_kernel_head_nvoc.c 3ad8329c7f7d63633b7abf2cdd502e4257fa1726 - src/nvidia/generated/g_event_nvoc.c 7aba35752cd4c6447f844cd9432d7dc1bc77b33d - src/nvidia/generated/g_disp_capabilities_nvoc.c fa3a5418a5d6bd7fb2b375ed7f7b64293fdf5f86 - src/nvidia/generated/g_ioaccess_nvoc.h 3c3961ddf6422294c3322e3b0a3c97ee94bfd010 - src/nvidia/generated/g_gpu_mgr_nvoc.c b73b22368abf741cc0a5108b6c9585a81de28b57 - src/nvidia/generated/g_hal.h 6e219df1367ce7dc8f5f4a1f2209a7808a927871 - src/nvidia/generated/g_hal_mgr_nvoc.c 279538daf54163a7a53aab1330fba2c00fc3f234 - src/nvidia/generated/g_rmconfig_util.c 49e84272bbce137683232275b4f13a19c644c650 - src/nvidia/generated/g_prereq_tracker_nvoc.h 57eb0772bc280690eade3f5d54f786e252c75099 - src/nvidia/generated/g_object_nvoc.c 113297c44e702cd6535e007c1c5b2dd5e6f809dc - src/nvidia/generated/g_ioaccess_nvoc.c 216040d1883e8c4f1e8b47d9f6b279ec111d094d - src/nvidia/generated/g_hal_mgr_nvoc.h 113b10cf6cef2608ff4a288e2944d56da64f355d - src/nvidia/generated/g_gpu_group_nvoc.c 86bb88ccdfa34510d4acf21684e5b8bd32d820b2 - src/nvidia/generated/g_disp_sf_user_nvoc.h 5c0ed2e135f53ca09fbfb542bea88b304a2e1208 - src/nvidia/generated/g_event_buffer_nvoc.c 979082b8c018eee55d880265f7bfd294360816c6 - src/nvidia/generated/g_hda_codec_api_nvoc.c f917323efc9429fcea8643eb9a8d5ee46b1b50a5 - src/nvidia/generated/g_eng_state_nvoc.c 437329a9c6e35e4b02945ec035448e704521280e - src/nvidia/generated/g_hda_codec_api_nvoc.h fba7a2891fe10e837f5897034b8176a7307fbb12 - src/nvidia/generated/g_lock_test_nvoc.h 05269b7e73347b580f11decf0e1b9f467d0cb60c - src/nvidia/generated/g_dce_client_nvoc.h e175ab2ef1fd5b64c9f0d665a26b2ed6f864b106 - src/nvidia/generated/g_vaspace_nvoc.h cc7ec616b034ec01da1c5176b6c62759c3f31a06 - src/nvidia/generated/g_subdevice_nvoc.c 93f9738c0e8aa715592306ddf023adf6b548dcc4 - src/nvidia/generated/g_nvh_state.h 1745f3002758556d1b6d11a24d088ef87ba18bd5 - src/nvidia/generated/g_virt_mem_mgr_nvoc.c 8c9f26e959fa9a6a3c4a5cb8875458cc4a9bfe9e - src/nvidia/generated/g_os_nvoc.c 3b0e038829647cfe0d8807579db33416a420d1d2 - src/nvidia/generated/g_chips2halspec.h a1fad555b8ad36437992afdd6e3e08d236167ac7 - src/nvidia/generated/g_journal_nvoc.h d210a82e3dda39239201cfc1c2fcb2e971915c1e - src/nvidia/generated/g_device_nvoc.h 836f88914b046eadad9435786e1b474ee6690f5f - src/nvidia/generated/g_gpu_nvoc.h ea0d27b0f05818e2e44be7d04b31f8843e1d05b7 - src/nvidia/generated/g_io_vaspace_nvoc.c 10529db24fb0501aa7f2aae25e0a87247ab5405c - src/nvidia/generated/g_resource_nvoc.h 5d47bed309c731bfee4144f61093192e7efcaa55 - src/nvidia/generated/g_disp_channel_nvoc.c 8771d8f2cf58f5e1d91ece01c1962677cebc5e4b - src/nvidia/generated/g_rmconfig_private.h 951c1c8969a621344d4d2a3ec61b1ad51b39ea79 - src/nvidia/generated/g_client_resource_nvoc.c 629b6daac6c9215dc982973b6adcf84314d34d57 - src/nvidia/generated/g_gpu_halspec_nvoc.c 29d5ccf874298c8156314a6eb23c209f2920b779 - src/nvidia/generated/g_gpu_resource_nvoc.c fc26ab853e7c981c271ced30dfd78d95cd9bcdfd - src/nvidia/generated/g_gpu_db_nvoc.h aa76beb8b33254fae884434b688093f9c7f12c87 - src/nvidia/generated/g_hal_private.h 86739259b5059c9b9ea3061bd8d1846385cb95f4 - src/nvidia/generated/g_sdk-structures.h 41bc858f6aca964a8977ad96911ecf1e8b46385d - src/nvidia/generated/g_hal_archimpl.h f87916eae53dbea2f6bdbe80a0e53ecc2071d9fd - src/nvidia/generated/g_lock_test_nvoc.c 6b8597803d509372152e3915f15139186294add5 - src/nvidia/generated/g_gpu_class_list.c 2101385d1332db9a2902370a6b3c6117ca8b2737 - src/nvidia/generated/g_kern_disp_nvoc.h d71ff42bc0fc0faf1999a6cbe88c4492a47e200e - src/nvidia/generated/g_os_nvoc.h e58abb783f7561d0af925c2fca392c5165fcb199 - src/nvidia/generated/g_kern_disp_nvoc.c d6a34926ab710156c9c4b2d9f12a44e6dafd43d1 - src/nvidia/generated/g_tmr_nvoc.h c4c67b0e0284656b32c7b4547e22d521c442124a - src/nvidia/generated/g_disp_objs_nvoc.h 8e49b4d77641c98c6101dbc88a79290ceca6271a - src/nvidia/generated/g_rs_server_nvoc.h af206c390549eff5d690ad07f3e58cd417f07f5f - src/nvidia/generated/g_hal_register.h be659882e731b6a2019639265af46239c5c96ebf - src/nvidia/generated/g_hal_nvoc.c db76e8669776fbfa901c60d9b9908af2fabc4703 - src/nvidia/generated/g_virt_mem_mgr_nvoc.h 797bd0197236fb0afc2c7e052487db803ac5baf0 - src/nvidia/generated/g_rs_resource_nvoc.c 884bed29fb4735ae0b4504fc874702acd29ee541 - src/nvidia/generated/g_mem_mgr_nvoc.c 3168beb42f15591a50339692d502e04977615a7b - src/nvidia/generated/g_prereq_tracker_nvoc.c 8e0071daaf5471a0fb3856705ec993704eaed4b5 - src/nvidia/generated/g_disp_inst_mem_nvoc.h fb464cf839a1e76ac2a27346c7cd46ca921f1f56 - src/nvidia/generated/g_traceable_nvoc.c 8588d6f88ab5e8682952063fe0e2c840b334c622 - src/nvidia/generated/g_eng_desc_nvoc.h de99523103dd7df0934cbe7aa21179ec7f241817 - src/nvidia/generated/g_os_desc_mem_nvoc.c aa43dd8bdbdc71dc64d65e948221c7d5235588e7 - src/nvidia/generated/g_disp_objs_nvoc.c 9b6cc3a5e9e35139e9245cbe753fe9a552a488c0 - src/nvidia/generated/g_syncpoint_mem_nvoc.h ae311b0968df9e9c9c2cec89e3060c472fc70a4c - src/nvidia/generated/g_mem_nvoc.c dc7a782be9a0096701771cb9b2dc020c2f814e6d - src/nvidia/generated/g_system_nvoc.h 93a47004dd1c7529c6ee5f8abdf8b49c336fb681 - src/nvidia/generated/g_disp_sf_user_nvoc.c 3b5dfad8fccd7251cc177c7ea1b90265b4b6c901 - src/nvidia/generated/g_gpu_mgmt_api_nvoc.h b53ec15a1aaf102d42b79881cd1b270afeb7205c - src/nvidia/generated/g_system_mem_nvoc.h 67b2d3ea81ebe7be679bcafc688ced0d64f16edf - src/nvidia/generated/g_object_nvoc.h b1be7145e70d8811fbdbe07c0e99f32ad0e38429 - src/nvidia/generated/g_client_resource_nvoc.h 0d5b87b117d39b173a2a21a5cd71572bc2b26697 - src/nvidia/generated/g_resource_nvoc.c 51df7972f9932c2a5d800d4e2b3e4828e5aa2038 - src/nvidia/generated/g_vaspace_nvoc.c 0820fa0a975b2474ce0fdf64508cbd7758f60e5c - src/nvidia/generated/g_ref_count_nvoc.h fff3ebc8527b34f8c463daad4d20ee5e33321344 - src/nvidia/inc/lib/ref_count.h ec26741397ebd68078e8b5e34da3b3c889681b70 - src/nvidia/inc/lib/base_utils.h f8d9eb5f6a6883de962b63b4b7de35c01b20182f - src/nvidia/inc/lib/protobuf/prb.h 601edb7333b87349d791d430f1cac84fb6fbb919 - src/nvidia/inc/lib/zlib/inflate.h 671c628ff9d4e8075f953766adcab9bfc54bd67c - src/nvidia/inc/libraries/poolalloc.h 1e8730e4abd210e3c648ef999ccc2b1f1839b94c - src/nvidia/inc/libraries/field_desc.h 8dd7f2d9956278ed036bbc288bff4dde86a9b509 - src/nvidia/inc/libraries/eventbufferproducer.h 1b28bd0ee2e560ca2854a73a3ee5fb1cf713d013 - src/nvidia/inc/libraries/nvoc/utility.h d3cd73c0c97a291e76e28a6e3834d666e6452172 - src/nvidia/inc/libraries/nvoc/prelude.h 79b556739f0648cec938f281794663433fc5e048 - src/nvidia/inc/libraries/nvoc/runtime.h 91c67f272f0ada6f386e9f4a78fbde70aa5c883d - src/nvidia/inc/libraries/nvoc/object.h c0f66cf7b2fb6ca24b5d4badede9dcac0e3b8311 - src/nvidia/inc/libraries/nvoc/rtti.h a3db778e81f7188a700e008e4c5f5b1320ab811e - src/nvidia/inc/libraries/mmu/gmmu_fmt.h 1daea206ab581fa3554ff1811e1253a7d0053ac0 - src/nvidia/inc/libraries/mmu/mmu_fmt.h 56b8bae7756ed36d0831f76f95033f74eaab01db - src/nvidia/inc/libraries/prereq_tracker/prereq_tracker.h b8e52b576e6668e4de7ea65a31e12c2bb491a591 - src/nvidia/inc/libraries/mapping_reuse/mapping_reuse.h e772583f7fbf994fcf923d527d42372a716b4c57 - src/nvidia/inc/libraries/ioaccess/ioaccess.h 26853c886d848fb88e14da3aceab23f90589c05d - src/nvidia/inc/libraries/utils/nvprintf_level.h c314121149d3b28e58a62e2ccf81bf6904d1e4bc - src/nvidia/inc/libraries/utils/nvmacro.h 72dcc09b77608263573bd34adf09393328eddf86 - src/nvidia/inc/libraries/utils/nvrange.h b598ccd2721892b6915d4be432f1fc332477b666 - src/nvidia/inc/libraries/utils/nvbitvector.h 9aa5870d052a45c2489a6ea1a4f2e30fbc52d6be - src/nvidia/inc/libraries/utils/nv_enum.h 357a7fd76af55cebcbc96a230064e23e50c03f57 - src/nvidia/inc/libraries/utils/nvprintf.h 1b265cb4fcc628862e4b27ae63a897871987eb76 - src/nvidia/inc/libraries/utils/nvassert.h 39113db75fdab5a42f9d8653ed1c90018b8b1df4 - src/nvidia/inc/libraries/containers/map.h 11ce1423312f4c34df19672e45678d0531cc299d - src/nvidia/inc/libraries/containers/ringbuf.h 5f116730f8b7a46e9875850e9b6ffb2a908ad6c2 - src/nvidia/inc/libraries/containers/btree.h fc211c8276ebcee194080140b5f3c30fba3dfe49 - src/nvidia/inc/libraries/containers/queue.h 661b551f4795f076d7d4c4dab8a2ae2f52b0af06 - src/nvidia/inc/libraries/containers/list.h 47c69b04f95664e742f1a0a02711eeb1fb71000b - src/nvidia/inc/libraries/containers/eheap_old.h 5da20ecad3ff8405dea782792c6397d21ba76f7c - src/nvidia/inc/libraries/containers/vector.h bcfc41a04576a4244c9dc3fe2a32c8e582f16c3e - src/nvidia/inc/libraries/containers/type_safety.h 5cabf8b70c3bb188022db16f6ff96bcae7d7fe21 - src/nvidia/inc/libraries/containers/multimap.h 4e26106c9c758c9e48418451ac01cf591ed74a31 - src/nvidia/inc/libraries/nvlog/nvlog_printf.h 41843197a5c11abc93df89b8f10a5f815e7fe6af - src/nvidia/inc/libraries/nvlog/nvlog.h 13aedc8ccf6acdd71be71b2219f79cd1af411273 - src/nvidia/inc/libraries/nvlog/internal/nvlog_printf_internal.h 7c9c9456aaacbeffa11a9af54fe2250095ebbb00 - src/nvidia/inc/libraries/tls/tls.h 87a130551593551380ac3e408f8044cc0423c01a - src/nvidia/inc/libraries/nvport/nvport.h 2487ffc1eb1e50b27ba07e0581da543d80bdaa72 - src/nvidia/inc/libraries/nvport/safe.h 4bf45849bc1c6b89d7a79d761cce84a1d5026eac - src/nvidia/inc/libraries/nvport/debug.h 147d47ef4bd860394d1d8ae82c68d97887e2898b - src/nvidia/inc/libraries/nvport/core.h 6d698ca4fc5e48c525f214a57e1de0cc4aa9e36b - src/nvidia/inc/libraries/nvport/thread.h 6065fa9a525d80f9b61acb19e476066823df0700 - src/nvidia/inc/libraries/nvport/sync.h a1d93b6ec8ff01a3c2651e772a826ee11a7781d7 - src/nvidia/inc/libraries/nvport/util.h fb5a011275328b7c1edc55abc62e604462b37673 - src/nvidia/inc/libraries/nvport/atomic.h 16a35b2b6fd6eb855acd64d72480b285795f54b2 - src/nvidia/inc/libraries/nvport/memory.h f31ed19d0588861b8c2b1489dd4e70d430110db5 - src/nvidia/inc/libraries/nvport/crypto.h 96c7c30c9f6503675f0903a16207a0ac06a6963d - src/nvidia/inc/libraries/nvport/cpu.h 53d843988669f61528cd45099ced749defa4cf7e - src/nvidia/inc/libraries/nvport/string.h d1863efe7b8a63f1c5a7f47856b95ad31fd1a561 - src/nvidia/inc/libraries/nvport/inline/debug_unix_kernel_os.h 9596b274389ea56acff6ca81db8201f41f2dd39d - src/nvidia/inc/libraries/nvport/inline/atomic_clang.h a8c9b83169aceb5f97d9f7a411db449496dc18f6 - src/nvidia/inc/libraries/nvport/inline/util_generic.h bbece45965ffbc85fbd383a8a7c30890c6074b21 - src/nvidia/inc/libraries/nvport/inline/util_gcc_clang.h a7cb79bf7ac48e0f5642ecfd2e430bb85587dddf - src/nvidia/inc/libraries/nvport/inline/memory_tracking.h 1d6a239ed6c8dab1397f056a81ff456141ec7f9c - src/nvidia/inc/libraries/nvport/inline/util_valist.h f267235fd8690e1b1d7485d3a815841607683671 - src/nvidia/inc/libraries/nvport/inline/safe_generic.h 645734ed505a4d977490e54b26cdf49657e20506 - src/nvidia/inc/libraries/nvport/inline/sync_tracking.h a902e0f4265bd3dbd251afefa8ceb0389464d886 - src/nvidia/inc/libraries/nvport/inline/atomic_gcc.h 2dec1c73507f66736674d203cc4a00813ccb11bc - src/nvidia/inc/libraries/resserv/rs_domain.h fa5a5d8fa07cae6b8ef9d9135dc5d7e7624533d2 - src/nvidia/inc/libraries/resserv/resserv.h 972165721958839bc1d510fda9409d35ff89ec21 - src/nvidia/inc/libraries/resserv/rs_server.h 883bf7295d707014278e035f670d151275975d18 - src/nvidia/inc/libraries/resserv/rs_resource.h 2ad85ddca7cd230cea917e249871277ef1e59db1 - src/nvidia/inc/libraries/resserv/rs_client.h cd033fe116a41285a979e629a2ee7b11ec99369f - src/nvidia/inc/libraries/resserv/rs_access_rights.h df174d6b4f718ef699ca6f38c16aaeffa111ad3c - src/nvidia/inc/libraries/resserv/rs_access_map.h 5fd1da24ae8263c43dc5dada4702564b6f0ca3d9 - src/nvidia/inc/os/dce_rm_client_ipc.h 4aa45a3755ef172aa35279e87dd5cd83cab1bc2e - src/nvidia/inc/kernel/vgpu/rpc_hal_stubs.h f2fd94a00e5debf1dc7f7ad4c00d417552fb0554 - src/nvidia/inc/kernel/vgpu/rpc.h 37598b6c25aac1a07cbc2bc5c76ebecdbca56eb6 - src/nvidia/inc/kernel/vgpu/rm_plugin_shared_code.h fea4bbeb739723d3b80b5b3d8943e746e58fae07 - src/nvidia/inc/kernel/vgpu/dev_vgpu.h f64d3723d0c475558bed799da8d2c5ec32a7d3a8 - src/nvidia/inc/kernel/vgpu/vgpuapi.h 8bf8282ce6112a2afb2e7f64d138d6ce90cf37c0 - src/nvidia/inc/kernel/vgpu/rpc_global_enums.h 69360faa428e157580fac445bcf601f44f7646c0 - src/nvidia/inc/kernel/vgpu/rpc_headers.h b9af629ab29b527f7830b78f52b55b8535b8dbfd - src/nvidia/inc/kernel/vgpu/vgpu_util.h e33b5b8c324c23d28e91324a87b47a24823dc5f5 - src/nvidia/inc/kernel/vgpu/rpc_vgpu.h af9d17b204fdddc6f97280fdafd5a414ee8274dc - src/nvidia/inc/kernel/diagnostics/code_coverage_mgr.h c6efd51b8b8447829a0867cd7fb7a5a5a2fb1e3d - src/nvidia/inc/kernel/diagnostics/traceable.h fd780f85cb1cd0fd3914fa31d1bd4933437b791d - src/nvidia/inc/kernel/diagnostics/tracer.h 7e75b5d99376fba058b31996d49449f8fe62d3f0 - src/nvidia/inc/kernel/diagnostics/profiler.h 7615ac3a83d0ad23b2160ff8ad90bec9eb1f3c6c - src/nvidia/inc/kernel/diagnostics/journal.h b259f23312abe56d34a8f0da36ef549ef60ba5b0 - src/nvidia/inc/kernel/diagnostics/nv_debug_dump.h 7f3f19ed69089ba05f5cac44982547718dbf4662 - src/nvidia/inc/kernel/diagnostics/xid_context.h 3a28bf1692efb34d2161907c3781401951cc2d4f - src/nvidia/inc/kernel/diagnostics/journal_structs.h 8ef620afdf720259cead00d20fae73d31e59c2f7 - src/nvidia/inc/kernel/virtualization/hypervisor/hypervisor.h 701375e96d771b4105f5fe4949ed4a542be4f3d7 - src/nvidia/inc/kernel/os/os_stub.h 408c0340350b813c3cba17fd36171075e156df72 - src/nvidia/inc/kernel/os/os.h c8496199cd808ed4c79d8e149961e721ad96714e - src/nvidia/inc/kernel/os/capability.h cda75171ca7d8bf920aab6d56ef9aadec16fd15d - src/nvidia/inc/kernel/os/nv_memory_type.h 70b67003fda6bdb8a01fa1e41c3b0e25136a856c - src/nvidia/inc/kernel/os/nv_memory_area.h 497492340cea19a93b62da69ca2000b811c8f5d6 - src/nvidia/inc/kernel/rmapi/event_buffer.h 499c3d0d76276ee9441d57948ea97877c48b1daa - src/nvidia/inc/kernel/rmapi/rmapi.h b4bae9ea958b4d014908459e08c93319784c47dd - src/nvidia/inc/kernel/rmapi/event.h 0500c41247fdecd66f25428d279c6dab72bab13e - src/nvidia/inc/kernel/rmapi/binary_api.h 61e3704cd51161c9804cb168d5ce4553b7311973 - src/nvidia/inc/kernel/rmapi/resource.h 2baec15f4c68a9c59dd107a0db288e39914e6737 - src/nvidia/inc/kernel/rmapi/client.h ac9288d75555180c1d5dd6dd7e0e11fb57a967f2 - src/nvidia/inc/kernel/rmapi/exports.h 835f193521f216d29c678a6018cd9791914b6c01 - src/nvidia/inc/kernel/rmapi/lock_stress.h b9ff9b201bf2df8651f0c408158aa617638868f6 - src/nvidia/inc/kernel/rmapi/rmapi_specific.h 20adc296ffe79f27d5c24c70716c972a2e0c9a5d - src/nvidia/inc/kernel/rmapi/control.h deed1715907c1dab8e3304bd4f63b688b72104b7 - src/nvidia/inc/kernel/rmapi/mapping_list.h 4453fe6463e3155063f2bdbf36f44697606a80a5 - src/nvidia/inc/kernel/rmapi/client_resource.h 6cc2de07b21fb21cef1b5b87fb2f1c935782262c - src/nvidia/inc/kernel/rmapi/rs_utils.h 35a65c31c6dcc2824011245ff6e2d5a30f95525c - src/nvidia/inc/kernel/rmapi/rmapi_utils.h a92dbf2870fe0df245ea8967f2f6a68f5075ecaf - src/nvidia/inc/kernel/rmapi/resource_fwd_decls.h 23e243f9abcb2a4f2d10d141303cd55677b04436 - src/nvidia/inc/kernel/rmapi/rmapi_cache_handlers.h 2724476b61b1790f1b7c293cc86e8a268125e11c - src/nvidia/inc/kernel/rmapi/param_copy.h 15f788614e08d805e963653460858cf013fe0178 - src/nvidia/inc/kernel/rmapi/lock_test.h 2b23f2dbd8f3f63a17a1b63ebb40a2fd7fd8801a - src/nvidia/inc/kernel/rmapi/alloc_size.h 893ec596aab365c2ff393bf2b96aea57f37d01f8 - src/nvidia/inc/kernel/platform/nvpcf.h 5e9928552086947b10092792db4a8c4c57a84adf - src/nvidia/inc/kernel/platform/acpi_common.h e762205698aff945603324331b443bb2f20cf778 - src/nvidia/inc/kernel/platform/sli/sli.h 15754215ec49815f547dd999b2262a34670dde0b - src/nvidia/inc/kernel/core/locks.h bdc4ab675c6f6c4bd77c3aaf08aa5c865b186802 - src/nvidia/inc/kernel/core/hal.h ad378b09a277fba0efd3291d167e1d21071bdf1b - src/nvidia/inc/kernel/core/printf.h a054be86a4476ba7b9a97052dfcfa4155e059cb9 - src/nvidia/inc/kernel/core/info_block.h bffae4da6a1f9b7dc7c879587fd674b49b46dac1 - src/nvidia/inc/kernel/core/core.h 37f267155ddfc3db38f110dbb0397f0463d055ff - src/nvidia/inc/kernel/core/strict.h b00302aec7e4f4e3b89a2f699f8b1f18fc17b1ba - src/nvidia/inc/kernel/core/hal_mgr.h 2d741243a6ae800052ddd478cc6aa7ad0b18f112 - src/nvidia/inc/kernel/core/prelude.h ebc7c06d9e94218af4cf6b0c03e83650e391e5bc - src/nvidia/inc/kernel/core/thread_state.h b5859c7862fb3eeb266f7213845885789801194a - src/nvidia/inc/kernel/core/system.h 07f45cd5fab5814e21b9e84425564b43776118fd - src/nvidia/inc/kernel/gpu/gpu_resource_desc.h 7010ff346c27b6453c091f5577672b8b1821808d - src/nvidia/inc/kernel/gpu/gpu_access.h 10ba0b9d4c67c8027b391073dab8dc4388f32fd7 - src/nvidia/inc/kernel/gpu/nvbitmask.h 59f72837997cb0c8ffc491d9a61c61e61b9dca94 - src/nvidia/inc/kernel/gpu/gpu_shared_data_map.h bca121fb72d54afd714654f1a50eb7192da3135f - src/nvidia/inc/kernel/gpu/gpu_uuid.h 3f0f23a15201105779f3d25dc7628b42990c4b7e - src/nvidia/inc/kernel/gpu/gpu_timeout.h 1ac9c8bf155d1f25f790032b2b6306223199d9ff - src/nvidia/inc/kernel/gpu/gpu_arch.h f17b704f2489ffedcc057d4a6da77c42ece42923 - src/nvidia/inc/kernel/gpu/gpu_resource.h 28d0d82b58ef13662e8896d3bbc42d340836294e - src/nvidia/inc/kernel/gpu/gpu_user_shared_data.h e33e4d1537839e41898ff0fab8949e90ee1aed46 - src/nvidia/inc/kernel/gpu/gpu_device_mapping.h 426c6ab6cecc3b1ba540b01309d1603301a86db1 - src/nvidia/inc/kernel/gpu/eng_desc.h 5f5677bee452c64a1b890c3eb65e81fda66ddbaa - src/nvidia/inc/kernel/gpu/error_cont.h d624e0c45cc8ad24e8c0b2fb5281c0c8a1c7a6d3 - src/nvidia/inc/kernel/gpu/gpu_engine_type.h c33ab6494c9423c327707fce2bcb771328984a3c - src/nvidia/inc/kernel/gpu/gpu_halspec.h 145b1bc37e6c36b466ea33dd0579d22b530d8dd3 - src/nvidia/inc/kernel/gpu/kern_gpu_power.h c771936af1de030194894db1312d847038ddb0cb - src/nvidia/inc/kernel/gpu/gpu_child_list.h 0e8353854e837f0ef0fbf0d5ff5d7a25aa1eef7c - src/nvidia/inc/kernel/gpu/eng_state.h 76b24227c65570898c19e16bf35b2cad143f3d05 - src/nvidia/inc/kernel/gpu/gpu.h 0a0c9a8f27feec3e90e15ce9879532ec77450de5 - src/nvidia/inc/kernel/gpu/gpu_acpi_data.h 9ed922ffed4454a10c5e2d8b3123ed653ec653e4 - src/nvidia/inc/kernel/gpu/gpu_ecc.h f2947fefcaf0611cd80c2c88ce3fdea70953c1ed - src/nvidia/inc/kernel/gpu/gpu_child_class_defs.h efc50bb2ff6ccf1b7715fd413ca680034920758e - src/nvidia/inc/kernel/gpu/subdevice/generic_engine.h 24d01769b39a6dd62574a95fad64443b05872151 - src/nvidia/inc/kernel/gpu/subdevice/subdevice.h 576216219d27aa887beeccefc22bcead4d1234d7 - src/nvidia/inc/kernel/gpu/disp/kern_disp.h 277a2719f8c063037c6a9ed55ade2b1cb17f48ae - src/nvidia/inc/kernel/gpu/disp/disp_capabilities.h 51a209575d3e3fe8feb7269ece7df0846e18ca2a - src/nvidia/inc/kernel/gpu/disp/kern_disp_type.h d0899f0e55e6675e267d4c72577be52e39b66121 - src/nvidia/inc/kernel/gpu/disp/kern_disp_max.h be7da8d1106ee14ff808d86abffb86794299b2df - src/nvidia/inc/kernel/gpu/disp/disp_objs.h 74bc902cd00b17da3a1dfa7fd3ebc058de439b76 - src/nvidia/inc/kernel/gpu/disp/disp_channel.h b39826404d84e0850aa3385691d8dde6e30d70d4 - src/nvidia/inc/kernel/gpu/disp/disp_sf_user.h 24397d051c941427e54cefc1062d8cd977a8725e - src/nvidia/inc/kernel/gpu/disp/vblank_callback/vblank.h 9a33a37c6cea9bad513aa14c942c689f28f7c0d8 - src/nvidia/inc/kernel/gpu/disp/head/kernel_head.h 5179f01acf7e9e251552dc17c0dcd84f7d341d82 - src/nvidia/inc/kernel/gpu/disp/inst_mem/disp_inst_mem.h 22fc153d91a3917ac8e3f2aa94f0d52bfb11f7c2 - src/nvidia/inc/kernel/gpu/hfrp/kern_hfrp_commands_responses.h 173e9ecd2224a5259c79f2491302ba4415e82f70 - src/nvidia/inc/kernel/gpu/hfrp/kernel_hfrp.h 3118f2e9b47cfac98a92d195ce67ea63e50bf3ab - src/nvidia/inc/kernel/gpu/hfrp/kern_hfrp_common.h 1feab39692ea8796ac7675f4780dfd51e6e16326 - src/nvidia/inc/kernel/gpu/timer/objtmr.h 0cff83f4fdcc8d025cd68e0a12faaeead09fa03b - src/nvidia/inc/kernel/gpu/timer/tmr.h 71dd4fccd3b601508230a2b8b720aaf531a160ff - src/nvidia/inc/kernel/gpu/gsp/gsp_trace_rats_macro.h e1979c71f3d5ffc92bf2306f9360b70bca0edf1f - src/nvidia/inc/kernel/gpu/gsp/message_queue.h 23d38dc3e66affac9342a839f5ba0d79a40f63ba - src/nvidia/inc/kernel/gpu/gsp/kernel_gsp_trace_rats.h bb9b8ec9840109b15c174da02e7ac85c1e2c0c70 - src/nvidia/inc/kernel/gpu/rpc/objrpc.h 1cc21ad9136024f7437ef745db6652343588c50a - src/nvidia/inc/kernel/gpu/rpc/objrpcstructurecopy.h 7b7cf3b6459711065d1b849bf5acaea10b6400ca - src/nvidia/inc/kernel/gpu/intr/intr_common.h 1e3bebe46b7f2f542eedace554a4156b3afb51f1 - src/nvidia/inc/kernel/gpu/audio/hda_codec_api.h 97d0a067e89251672f191788abe81cf26dcb335f - src/nvidia/inc/kernel/gpu/device/device.h 889ba18a43cc2b5c5e970a90ddcb770ce873b785 - src/nvidia/inc/kernel/gpu/mem_mgr/mem_desc.h 6756126ddd616d6393037bebf371fceacaf3a9f1 - src/nvidia/inc/kernel/gpu/mem_mgr/context_dma.h e4c67260b5cb693d695ad3d8aa96aaed45688322 - src/nvidia/inc/kernel/gpu/mem_mgr/virt_mem_allocator_common.h 20416f7239833dcaa743bbf988702610e9251289 - src/nvidia/inc/kernel/gpu/mem_mgr/mem_mgr.h 407cad27681bde8235305464150e275a4a93b5d5 - src/nvidia/inc/kernel/gpu/mem_mgr/mem_utils.h 5be45f3abdbb65a8eea959d98499ea8ff9a79de9 - src/nvidia/inc/kernel/gpu/mem_mgr/rm_page_size.h 76de30ac7b722cc5d59fc834d6b9c795ec14d7a5 - src/nvidia/inc/kernel/gpu/mem_mgr/heap_base.h ce4e0f7177f46f4fc507a68b635e5395a3f7dde6 - src/nvidia/inc/kernel/gpu/dce_client/dce_client.h 2c48d7335bdb0b7ea88b78216c0aeab2e11e00c1 - src/nvidia/inc/kernel/gpu_mgr/gpu_mgmt_api.h 5b151d0d97b83c9fb76b76c476947f9e15e774ad - src/nvidia/inc/kernel/gpu_mgr/gpu_mgr.h e188d9f2d042ffe029b96d8fbb16c79a0fc0fb01 - src/nvidia/inc/kernel/gpu_mgr/gpu_db.h ea32018e3464bb1ac792e39227badf482fa2dc67 - src/nvidia/inc/kernel/gpu_mgr/gpu_group.h 02d6a37ef1bb057604cb98a905fa02429f200c96 - src/nvidia/inc/kernel/mem_mgr/mem.h a5f49a031db4171228a27482d091283e84632ace - src/nvidia/inc/kernel/mem_mgr/system_mem.h d15991bc770c5ab41fe746995294c5213efa056b - src/nvidia/inc/kernel/mem_mgr/io_vaspace.h 5ae08b2077506cbc41e40e1b3672e615ce9d910f - src/nvidia/inc/kernel/mem_mgr/vaspace.h 0ce5d6370c086d2944b2e8d31ff72a510d98dc8f - src/nvidia/inc/kernel/mem_mgr/virt_mem_mgr.h 4c386104eaead66c66df11258c3f1182b46e96ee - src/nvidia/inc/kernel/mem_mgr/syncpoint_mem.h 1a08e83fd6f0a072d6887c60c529e29211bcd007 - src/nvidia/inc/kernel/mem_mgr/os_desc_mem.h 2d4afabd63699feec3aea5e89601db009fc51a08 - src/nvidia/inc/kernel/mem_mgr/standard_mem.h 24928c8b4e8b238f1921a1699f3af59bcff994ed - src/nvidia/src/lib/base_utils.c a6134d6f5f3e3b0b4c274eb3b2d0a146644c842b - src/nvidia/src/lib/zlib/inflate.c 2e57601af217d0d8c4986abb593e8864e53e7e0b - src/nvidia/src/libraries/nvoc/src/runtime.c 9ea8bf51c44e500c9963a12a1e2a71ebffe6c4e8 - src/nvidia/src/libraries/nvbitvector/nvbitvector.c 0e7a9b9c697f260438ca5fda8527b0f4edc2de13 - src/nvidia/src/libraries/prereq_tracker/prereq_tracker.c e5ead344020dfc973ee7c7383e0f687a29642683 - src/nvidia/src/libraries/mapping_reuse/mapping_reuse.c 3c885d2c0e6cfb3f8585bddcba128b02e0196167 - src/nvidia/src/libraries/eventbuffer/eventbufferproducer.c ee7ea17829dfbbf9e6cd8d6c6fb2ada086b5d36e - src/nvidia/src/libraries/ioaccess/ioaccess.c ca2ba7f19b705e39dbb8890a84ce84d34fbd8aa4 - src/nvidia/src/libraries/utils/nvassert.c 864bd314450490b687a652335a44fb407835152c - src/nvidia/src/libraries/containers/ringbuf.c eb919a9e8711830c1c3f7fe71273e0a39862292e - src/nvidia/src/libraries/containers/vector.c 53aa343682f721f57058c7a17b1e872ca6fe7cea - src/nvidia/src/libraries/containers/map.c 7f58f03ec069ad5f5c64fedf4a484cc93473bd04 - src/nvidia/src/libraries/containers/queue.c 23c328fc27ad0317efe6ccd2da71cfd9db9da236 - src/nvidia/src/libraries/containers/multimap.c ae669a466f1fecf67746a9fafc8c1119294c93d7 - src/nvidia/src/libraries/containers/list.c 9c80df385a47834da4f92dc11053ca40a37a7fe7 - src/nvidia/src/libraries/containers/btree/btree.c a0e23ad69d805a7de439f0fbf79241c6466efdc2 - src/nvidia/src/libraries/containers/eheap/eheap_old.c cccb1fedee02a240692688090e00ac1e289dec9e - src/nvidia/src/libraries/tls/tls.c a045a19d750d48387640ab659bb30f724c34b8c8 - src/nvidia/src/libraries/nvport/util/util_unix_kernel_os.c d047abe66dd8a459c15224cc056fc6f2176b0c6a - src/nvidia/src/libraries/nvport/util/util_gcc_clang.c f0c486c1ad0f7d9516b13a02d52b4d857d8865b1 - src/nvidia/src/libraries/nvport/util/util_compiler_switch.c 9b69fbf3efea6ba58f9ba7cb0189c9264c994657 - src/nvidia/src/libraries/nvport/sync/sync_common.h eb8b5fcab51c47f58a37958ddb38ff90991bcbbe - src/nvidia/src/libraries/nvport/sync/sync_unix_kernel_os.c b2ae1406c94779f575d3e2233a7ab248ac10e74f - src/nvidia/src/libraries/nvport/sync/inc/sync_unix_kernel_os_def.h e2fec1a305dfec07456faec8ea5e75f601d76b5e - src/nvidia/src/libraries/nvport/memory/memory_tracking.c c5a16e5bb7d304ffe5e83d7b27226cbecdbc7ce1 - src/nvidia/src/libraries/nvport/memory/memory_unix_kernel_os.c db01179ad5e6333844bd3e31b62d0dc262c98875 - src/nvidia/src/libraries/nvport/memory/memory_generic.h 2c00bd224d17c0cc5469b5140f3be3d23b494922 - src/nvidia/src/libraries/nvport/string/string_generic.c b387005657f81538fab5962d4aabbc5dc681aa1b - src/nvidia/src/libraries/nvport/core/core.c 702c73446bba35f88249cfe609ac0ca39dbd80ff - src/nvidia/src/libraries/nvport/crypto/crypto_random_xorshift.c 9ca28a5af5663dec54b4cd35f48a8a3d8e52e25f - src/nvidia/src/libraries/nvport/cpu/cpu_common.c a305654bafc883ad28a134a04e83bbd409e0fc06 - src/nvidia/src/libraries/nvport/cpu/cpu_common.h 099c17e5931d5d881d8248ec68041fa0bbc2a9bc - src/nvidia/src/libraries/nvport/thread/thread_unix_kernel_os.c 1f2e9d09e658474b36d0b0ecd9380d0d2bcc86b2 - src/nvidia/src/libraries/resserv/src/rs_domain.c f9cb28c60e7063ddb5b2a2af4a053a477c95c74b - src/nvidia/src/libraries/resserv/src/rs_server.c dac54d97b38ad722198ec918668f175dc5122e4e - src/nvidia/src/libraries/resserv/src/rs_access_map.c ede517ff5f53666a23ad2edec7e9fcd85c6ef7d1 - src/nvidia/src/libraries/resserv/src/rs_client.c 26d872a8495e38065af34aed9a60ab9a08898d40 - src/nvidia/src/libraries/resserv/src/rs_resource.c 408e1e5430e5e507e7e59adc292175150e50b825 - src/nvidia/src/libraries/resserv/src/rs_access_rights.c 304e2fb9bbf6d37358779d4e321f33ac76efcd39 - src/nvidia/src/kernel/diagnostics/nvlog.c b3a29311cc22e2dae686f8ed2df6bc828aa826cf - src/nvidia/src/kernel/diagnostics/profiler.c 439543a41a36b0959b5f4c099f4adaa379b9f912 - src/nvidia/src/kernel/diagnostics/code_coverage_mgr.c c1e5733847085bede6eb128eff3bad14549a31db - src/nvidia/src/kernel/diagnostics/nvlog_printf.c d10c5031c3bc00ae1243729c39496df38d2c9ae3 - src/nvidia/src/kernel/os/os_init.c 2255d1ae2d942c3fed9a4b0a41020d0e49cb8648 - src/nvidia/src/kernel/os/os_timer.c b887b661ffbe6c223c60f544b1fab32690cd8c75 - src/nvidia/src/kernel/os/os_sanity.c f228bc86fd9149675cb554d6f596d81fdd4c3770 - src/nvidia/src/kernel/os/os_stubs.c 8800bf3ec679a1c3d36b89992b3f2f95365ec834 - src/nvidia/src/kernel/rmapi/entry_points.c 348c34e13f006f1320536876cb7393d8232e61de - src/nvidia/src/kernel/rmapi/rpc_common.c 8f033323f3ae264a79f779abb163442deb17e88a - src/nvidia/src/kernel/rmapi/rmapi.c bc7c0b5bd06a1c58714b782d85f740632c6e152f - src/nvidia/src/kernel/rmapi/rmapi_cache_handlers.c ac6a5b3adf15eac4a7bd9ae24981f6f5fc727097 - src/nvidia/src/kernel/rmapi/deprecated_context.h b1e57ee17d6641412a4065317be3b81e5db94824 - src/nvidia/src/kernel/rmapi/event_notification.c a965c5f028c1d47d7da0dd03dabbf8aebc817523 - src/nvidia/src/kernel/rmapi/rs_utils.c a2ad052692006f70e97fd3d186f19c7ddfe80c4c - src/nvidia/src/kernel/rmapi/deprecated_context.c 7a0a8914b407f836627d8262de2de6cab2dd691d - src/nvidia/src/kernel/rmapi/rmapi_specific.c d915b65380b59e557e5043f839c42d4105caa111 - src/nvidia/src/kernel/rmapi/rmapi_utils.c 2c5b12d5eb17c313138262cd1e42eb940a4d9ed8 - src/nvidia/src/kernel/rmapi/client.c ab24efdee819d113fe72ec12c0e359c514151336 - src/nvidia/src/kernel/rmapi/resource_desc_flags.h 1745523e56fc0ff5a45d4b2473e13f0cc6f2afb1 - src/nvidia/src/kernel/rmapi/event_buffer.c f70b6d7e8f21bf26d9c8171d62cbdf934fe3a30e - src/nvidia/src/kernel/rmapi/rmapi_stubs.c 09fc97bd7daa74a0b2e55fc5632b2f25464412dc - src/nvidia/src/kernel/rmapi/client_resource.c c21223701bd7afd09e706616105f3f5f365afa5d - src/nvidia/src/kernel/rmapi/rmapi_finn.c 433c6091b3b986151e27ea952cef1dc83ff3095c - src/nvidia/src/kernel/rmapi/lock_test.c 682977753c878ccee6279e539cf11bee2b548752 - src/nvidia/src/kernel/rmapi/resource_desc.c 6dc3f6642c450043cc9b361037f4cb2091e7cb58 - src/nvidia/src/kernel/rmapi/sharing.c 00a6ef509ed8484d038c54b47642bc1a00125077 - src/nvidia/src/kernel/rmapi/lock_stress.c 3b53d6b8ef183702327b4bc3a96aa06f67475ddc - src/nvidia/src/kernel/rmapi/param_copy.c 1c9b26108c6b7f27c5f4fe84e10d83cfb32c9b5b - src/nvidia/src/kernel/rmapi/resource_list.h 3b9809740d88ab4b5b9c9d1adbd3ec304f6f6c7e - src/nvidia/src/kernel/rmapi/resource.c 41c397e2cc8c8b1c9c734c435d2d4c17cf709e63 - src/nvidia/src/kernel/rmapi/mapping_cpu.c 58ed3486109a54829f1afdf214c15529eaed678b - src/nvidia/src/kernel/rmapi/mapping.c 0172aa3770ca55bbfbd5e66f48f4e4820a4d5576 - src/nvidia/src/kernel/rmapi/event.c e26021985ccfa2fb94c96310d9700df405817889 - src/nvidia/src/kernel/rmapi/control.c 6ee3cc915f68b5b70274eec219b7fd6799479459 - src/nvidia/src/kernel/rmapi/rmapi_cache.c 7a4abc27bdbcbb758545783f4182f200587ae3bd - src/nvidia/src/kernel/rmapi/binary_api.c f821719c449e0300a3c27ebeaa3f4d6791ddaf60 - src/nvidia/src/kernel/rmapi/alloc_free.c b7561ece996380512992736f947ddea0ba7f075e - src/nvidia/src/kernel/rmapi/resource_desc.h 72a6ae5bcae8eb4197047aaa5c1780b689544c87 - src/nvidia/src/kernel/rmapi/entry_points.h 4fbbb955e617d7b014e201a5263915939c87f884 - src/nvidia/src/kernel/rmapi/resource_list_required_includes.h a16bffcad38862470b4424fa9a1b0d4013304600 - src/nvidia/src/kernel/core/hal_mgr.c 4d3f32dbc4cbe3d4d1301079eaf21005f74dea90 - src/nvidia/src/kernel/core/locks_common.c e7195ca43692b6fbf6a3533437650c596cee88db - src/nvidia/src/kernel/core/locks_minimal.c ee0bf4f81d33e9a7b6bbb2be27bb3973c8cb5b18 - src/nvidia/src/kernel/core/system.c 905a0f08067503374c757ed34d1ea87379ab4a71 - src/nvidia/src/kernel/core/thread_state.c afa03f17393b28b9fc791bf09c4d35833447808d - src/nvidia/src/kernel/core/hal/hal.c d3922085d63a7edf02b582fe0b6e3acba6124c25 - src/nvidia/src/kernel/core/hal/hals_all.c 8eac3ea49f9a53063f7106211e5236372d87bdaf - src/nvidia/src/kernel/core/hal/info_block.c 1f258d22d361a8902c27a4329e553a73b3fbe6e9 - src/nvidia/src/kernel/gpu/device.c f520afc43afd9e40f779d2bdf3acc48ff7419625 - src/nvidia/src/kernel/gpu/eng_state.c 7ed54a614b756e32a61366d2009db26d1ef5fcc4 - src/nvidia/src/kernel/gpu/gpu_arch.c 1b2a50c873087a28cc4edd4a65945bcafc84bcf0 - src/nvidia/src/kernel/gpu/gpu_uuid.c 5bbac8b7323fe7f048e54b2ebc3ebe4f30655181 - src/nvidia/src/kernel/gpu/gpu.c c7f5b73c217a181f5ff28886bf691ec7d528cb86 - src/nvidia/src/kernel/gpu/gpu_resource.c 2408846a2a5c24a102df13919f384c6675f56f29 - src/nvidia/src/kernel/gpu/device_ctrl.c 2b40a86a112c7643a69b094194c2ee1dd294f16a - src/nvidia/src/kernel/gpu/gpu_gspclient.c 261a5b014b3869c3ce5e830cf8b9529fa0b8a09d - src/nvidia/src/kernel/gpu/gpu_resource_desc.c 4e1be780ac696a61f056933e5550040a2d42c6bd - src/nvidia/src/kernel/gpu/gpu_device_mapping.c 57941830e179d534a7329608658c82fd91ff4a57 - src/nvidia/src/kernel/gpu/gpu_timeout.c 89a6229720a7d5276d73ad51a210ce6f60cedb08 - src/nvidia/src/kernel/gpu/gpu_user_shared_data.c bc508781e640dbf756d9c9e43e75227d05b413c7 - src/nvidia/src/kernel/gpu/device_share.c 84c2c6a59313d36aa70c8a01cfedf1d1e7a3d931 - src/nvidia/src/kernel/gpu/gpu_access.c d0d744c416a52404a52c35ede015629990934003 - src/nvidia/src/kernel/gpu/gpu_engine_type.c 12c1f9494317c34b1b9bfcc58bf7bee81b08c98e - src/nvidia/src/kernel/gpu/gpu_t234d_kernel.c f4b1e5dfefeae6021e6ca20e73d0fcaec1b5e95e - src/nvidia/src/kernel/gpu/gpu_rmapi.c 099da8d641fb4481f9a4c625588dd4aa4ce20bcd - src/nvidia/src/kernel/gpu/subdevice/subdevice.c 6fab19f1f68bdb8d2b969efc6f030e2066bc6b5e - src/nvidia/src/kernel/gpu/subdevice/subdevice_ctrl_gpu_kernel.c b4e503b320119fecdb22dfda1268ce31e1a7ecd7 - src/nvidia/src/kernel/gpu/subdevice/generic_engine.c 9afe5cedd5e7d535ee56f4f5b3cc549f154d8be2 - src/nvidia/src/kernel/gpu/subdevice/subdevice_ctrl_event_kernel.c 796d1368584a9318a39ed313dcb86bbcca40ad83 - src/nvidia/src/kernel/gpu/subdevice/subdevice_ctrl_timer_kernel.c 4c363a34fe12b9bb0d428c3d90974d7085d0366f - src/nvidia/src/kernel/gpu/subdevice/subdevice_ctrl_internal_kernel.c fcf79cf10019193a9e57f8d19b5a37bac6120365 - src/nvidia/src/kernel/gpu/arch/t25x/kern_gpu_t256d.c 095d4a87b067038bd2d80a1c4b2d9407810b0e66 - src/nvidia/src/kernel/gpu/arch/t26x/kern_gpu_t264d.c c20ed8bd9fda88b036c6ff677b7c25ebd171434f - src/nvidia/src/kernel/gpu/arch/t23x/kern_gpu_arch_t234d.c b09af17437a01e63e960414a4534074da240dc59 - src/nvidia/src/kernel/gpu/arch/t23x/kern_gpu_t234d.c ceb516c8064e1df2d18897f98f5c8ea58e907973 - src/nvidia/src/kernel/gpu/disp/disp_capabilities.c c67baeb5df33080d99f322786759fc3f5436301d - src/nvidia/src/kernel/gpu/disp/disp_channel.c 8fafebf746bfcde2c53435be386a8a0846973b0c - src/nvidia/src/kernel/gpu/disp/disp_object_kern_ctrl_minimal.c 6437dd659a38c62cd81fb59f229bd94e59f37e71 - src/nvidia/src/kernel/gpu/disp/disp_sf_user.c 0fbfb9dd91147f04bea1060788efc1121078c159 - src/nvidia/src/kernel/gpu/disp/kern_disp.c 5aa67b54fcd16f648d7a72b9c2c4ff3fb6d3a5be - src/nvidia/src/kernel/gpu/disp/disp_common_kern_ctrl_minimal.c 56027ec220553e1febe42f37fd70757cbb034dcb - src/nvidia/src/kernel/gpu/disp/disp_objs.c b95080033ecc8736a0cdf9476cec7563c4a2af0f - src/nvidia/src/kernel/gpu/disp/vblank_callback/vblank.c caba45a10f43e7817f491e7856ef30dd49782f6e - src/nvidia/src/kernel/gpu/disp/head/kernel_head.c f59763139d9993ae545ded8057706cc4d65afc0c - src/nvidia/src/kernel/gpu/disp/head/arch/v04/kernel_head_0401.c eb00ffa5a892558d39db15f473e2c308acfd86d9 - src/nvidia/src/kernel/gpu/disp/arch/v04/kern_disp_0404.c 2b19caf7def14190c99dc4e41983b4a3e3334f22 - src/nvidia/src/kernel/gpu/disp/arch/v04/kern_disp_0401.c 6d99d644a8294d08b0fdebf183306bbdadf819e3 - src/nvidia/src/kernel/gpu/disp/arch/v04/kern_disp_0402.c 57fec208154cd0d25838a688f6457598baf2de7a - src/nvidia/src/kernel/gpu/disp/arch/v02/kern_disp_0204.c 64aa574198449e9556328d1c08f08b3bde5bfad0 - src/nvidia/src/kernel/gpu/disp/arch/v05/kern_disp_0501.c d911e6ae9f7b96e6f441208d38701a8d833e7455 - src/nvidia/src/kernel/gpu/disp/arch/v03/kern_disp_0300.c ae5ef73d6e74026e0b847977c41b92cbf0f30a62 - src/nvidia/src/kernel/gpu/disp/inst_mem/disp_inst_mem.c 4cfab589176c432463859f148ad32c7dac2c83d3 - src/nvidia/src/kernel/gpu/disp/inst_mem/arch/v03/disp_inst_mem_0300.c 60e8d1fa9cd375be783c4575baa2e99ac2b22a88 - src/nvidia/src/kernel/gpu/timer/timer.c f6e518524581b772f8fdbc80418a2018570940ca - src/nvidia/src/kernel/gpu/timer/timer_ostimer.c 1f4d15f959df38f4f6ea48c7b10fc859c6e04b12 - src/nvidia/src/kernel/gpu/audio/hda_codec_api.c 10a8bfd47ce609763c07a0d61be2f71f9f91889e - src/nvidia/src/kernel/gpu/mem_mgr/mem_ctrl.c bfc82499a8b9b8ce10411f6c391b0e575dc7c0d6 - src/nvidia/src/kernel/gpu/mem_mgr/context_dma.c a62f423d6cf69e96b0523a233ec00353d63ee8bd - src/nvidia/src/kernel/gpu/mem_mgr/mem_utils.c 92611eb4f3bed31064a9efbb54a1ece7ffcfc2af - src/nvidia/src/kernel/gpu/mem_mgr/mem_desc.c 4a95b73f744807d96510b0ad7181eae5b12839ce - src/nvidia/src/kernel/gpu/mem_mgr/arch/turing/mem_mgr_tu102_base.c ce09583697a98a2d0e8466dd45764f15945f55c2 - src/nvidia/src/kernel/gpu/dce_client/dce_client_rpc.c cebb9eee63e23bb934881b3313e422b50fb38abb - src/nvidia/src/kernel/gpu/dce_client/dce_client.c d5d8ff429d3bda7103bafcb2dca94678efc8ddd8 - src/nvidia/src/kernel/gpu_mgr/gpu_group.c 2b49d8a3413a1731bc4fb0bab3f32ff272a71a8c - src/nvidia/src/kernel/gpu_mgr/gpu_db.c 37d1e3dd86e6409b8e461f90386e013194c9e4d1 - src/nvidia/src/kernel/gpu_mgr/gpu_mgmt_api.c fe618e428d9a172a0fd9412f5a20df64d7270418 - src/nvidia/src/kernel/gpu_mgr/gpu_mgr.c 593bbc5b93b620019144fadf1281a180ec050012 - src/nvidia/src/kernel/mem_mgr/syncpoint_mem.c 54c1d1a44474a7027c5290551e60f13678226301 - src/nvidia/src/kernel/mem_mgr/standard_mem.c 44069d6ebbd94a11267e6cc0179ab167f91faec4 - src/nvidia/src/kernel/mem_mgr/virt_mem_mgr.c 5a5e689cf264134ae8c4300d986c209c04167743 - src/nvidia/src/kernel/mem_mgr/vaspace.c 5b9048e62581a3fbb0227d1a46c4ee8d8397bf5b - src/nvidia/src/kernel/mem_mgr/mem_mgr_internal.h 630200d06b6588d7fa8c5b1ea16146e8281163d7 - src/nvidia/src/kernel/mem_mgr/io_vaspace.c 04876ed2dedf0ac3228ec6261a0f3f79609e44a5 - src/nvidia/src/kernel/mem_mgr/system_mem.c 873de51b330501a86ec7656fcf3f615034c49f8e - src/nvidia/src/kernel/mem_mgr/os_desc_mem.c ed8376f04af08af8da7d47c6340ff38a8910de87 - src/nvidia/src/kernel/mem_mgr/mem.c 08762b3172f6309f1aeab895761193fa19cb176f - src/nvidia/interface/nv_sriov_defines.h 024b112ea410ee1b1badb585b03fdbabb64ade34 - src/nvidia/interface/nvrm_registry.h 3f7b20e27e6576ee1f2f0557d269697a0b8af7ec - src/nvidia/interface/nv-firmware-registry.h d02ee5bb3f19dffd8b5c30dc852cea243bcdf399 - src/nvidia/interface/acpidsmguids.h 60c7cafce7bd5240e8409e3c5b71214262347efc - src/nvidia/interface/acpigenfuncs.h bff92c9767308a13df1d0858d5f9c82af155679a - src/nvidia/interface/nvacpitypes.h 7790849d0d261e84d04ab5a481bb57309de6409a - src/nvidia/interface/deprecated/rmapi_deprecated_utils.c 82f65de514ef7e2204cfb618d398cf3af8c12778 - src/nvidia/interface/deprecated/rmapi_deprecated.h 49e299b7257e179b701747e061b6b0214d5565f0 - src/nvidia/interface/rmapi/src/g_finn_rm_api.c 7b8431767b7c4b3861582ddab27a079568bf0660 - src/nvidia-modeset/Makefile 7e1249c1d187aec5891eabe5bacae2189d33dc55 - src/nvidia-modeset/lib/nvkms-sync.c c3ab6005d7083e90145cac66addf815c4f93d9a0 - src/nvidia-modeset/lib/nvkms-format.c f69ac0ec080036b8abc7f1ae7b857989f5c9df4a - src/nvidia-modeset/include/nvkms-headsurface-3d.h b8854261256a801af52d1201081afa9c17486a96 - src/nvidia-modeset/include/nvkms-3dvision.h 3212e81bcde5a5dcec5dbba4155a41ca52dd2304 - src/nvidia-modeset/include/nvkms-prealloc.h 24aaf3a4cb16be7a5aaa8317090142743e3dd797 - src/nvidia-modeset/include/nvkms-flip-workarea.h be6cff078fcf66221762a4af1515e01d294dd2f6 - src/nvidia-modeset/include/nvkms-push.h 4361f10ff446c401c3f52bf36aed52ca24706d49 - src/nvidia-modeset/include/nvkms-vrr.h 08aa0dd2f18a8cf74539ea8b25ef3f3646567a0c - src/nvidia-modeset/include/nvkms-evo1.h 9bfb2d12ecdaecaba7eaaffa3040ab142d37f892 - src/nvidia-modeset/include/nvkms-prealloc-types.h 0bd9cf097cfa373f0bed7be8fe5299e2ea4bf669 - src/nvidia-modeset/include/g_nvkms-evo-states.h 708e037052ea0b3d6309fa44a205282b7a69a331 - src/nvidia-modeset/include/nvkms-difr.h 412d8028a548e67e9ef85cb7d3f88385e70c56f9 - src/nvidia-modeset/include/nvkms-console-restore.h 52b6d1a1a6793d232571e6366709436b018ae3b7 - src/nvidia-modeset/include/nvkms-dpy.h 81fcc817dfb8ae1f98b63d2c1acacc303fedb554 - src/nvidia-modeset/include/nvkms-dpy-override.h 0f251b41b076bb80eeebf7d54e6fd6c764404c28 - src/nvidia-modeset/include/nvkms-evo-states.h 70d9251f331bbf28f5c5bbdf939ebad94db9362d - src/nvidia-modeset/include/nvkms-softfloat.h 6e3681d5caa36312804c91630eaaf510eda897d2 - src/nvidia-modeset/include/nvkms-dma.h eb5248c4b0b51e7aecd2de87e496253b3b235c70 - src/nvidia-modeset/include/nvkms-utils-flip.h 377dd4a29b2ea5937a9b8fc3fba0c9e4ef92992e - src/nvidia-modeset/include/nvkms-cursor.h e1225d674a0e6e58110750868c45a4655110a4d8 - src/nvidia-modeset/include/nvkms-headsurface-swapgroup.h 9e3d50761d3a27c1db3085ff82b7d194ff47bf34 - src/nvidia-modeset/include/nvkms-rm.h fd9fa6da0fc28b00be524b0bed25a68c56278363 - src/nvidia-modeset/include/nvkms-modeset.h be6e0e97c1e7ffc0daa2f14ef7b05b9f9c11dc16 - src/nvidia-modeset/include/nvkms-attributes.h e30d9c286263051d14a1862f0c630295a78abde7 - src/nvidia-modeset/include/nvkms-headsurface-priv.h 3fd0822b8b44d13685ecde9d02300e6cfbb123db - src/nvidia-modeset/include/nvkms-hdmi.h 6b21a68e254becdd2641bc456f194f54c23abe51 - src/nvidia-modeset/include/nvkms-framelock.h 53122264a19ea00ef26e6accde3a3a7570e46b15 - src/nvidia-modeset/include/nvkms-vblank-sem-control.h 1b21352fd9d0b1c5708cb8512acf20ba2e13955d - src/nvidia-modeset/include/nvkms-headsurface.h 59d20eff40e4e488eb3ab7c97b5e171142dcdbcf - src/nvidia-modeset/include/nvkms-modeset-workarea.h 933f9b359a1c3807771e2719c6dd80d71beff3c8 - src/nvidia-modeset/include/nvkms-utils.h f5f3b11c78a8b0eef40c09e1751615a47f516edb - src/nvidia-modeset/include/nvkms-hal.h 03f3fd4c2fb7db83441805a5c350b121bd3117b4 - src/nvidia-modeset/include/nvkms-setlut-workarea.h 31acf6af2a4c82e3429efa77d110cb346c11905f - src/nvidia-modeset/include/nvkms-lut.h e4bae9a0df729119071902f7ad59704c97adee0e - src/nvidia-modeset/include/nvkms-private.h fbe2cbfd32b40d8188c6b25716fb360720ab5760 - src/nvidia-modeset/include/nvkms-evo.h 04f2e01c7f798a615319accc2dd713f617a81172 - src/nvidia-modeset/include/nvkms-headsurface-config.h 4a94381bd8c24b09193577d3f05d6d61f178e1cf - src/nvidia-modeset/include/nvkms-ctxdma.h b4d53599736b03ee1bc149abe7b602336f40295c - src/nvidia-modeset/include/nvkms-flip.h 46fc0e138ba7be5fa3ea0ada3ee0a78656950c80 - src/nvidia-modeset/include/nvkms-modeset-types.h 260b6ef87c755e55a803adad4ce49f2d57315f9a - src/nvidia-modeset/include/nvkms-event.h 35fa1444c57f7adbbddddc612237f3ad38cdd78f - src/nvidia-modeset/include/nvkms-rmapi.h 8782df838ea3d2617e9842c89389f51137b19a73 - src/nvidia-modeset/include/nvkms-headsurface-matrix.h 881d7e4187ff9c7e9d02672aedafc1605f3055ec - src/nvidia-modeset/include/nvkms-modepool.h 60c01e29aa91aa80bf3750a1b11fe61a6cdfde58 - src/nvidia-modeset/include/nvkms-types.h cc3dc4021b76782434efd2aa81d3ffdd1f3b1f0a - src/nvidia-modeset/include/nvkms-headsurface-ioctl.h 3dc2113c55970fa70b7afb4fd30f2f1e777ebc12 - src/nvidia-modeset/include/nvkms-surface.h aa43ad7f970331c56378b7797f66b0a77d8e99dd - src/nvidia-modeset/include/nvkms-evo3.h 8c7e0e15c1038fe518e98d8f86fafb250b10a1d2 - src/nvidia-modeset/include/nvkms-stereo.h 9deeeae9081fd828a14f3b0df5fbf17a81161786 - src/nvidia-modeset/include/nvkms-hw-flip.h 6460f8427fdb375d659975c7f6eaadaca0ed2b2c - src/nvidia-modeset/include/dp/nvdp-device.h 1912d523f567c4fc36075942cf8acaf5d5478232 - src/nvidia-modeset/include/dp/nvdp-connector-event-sink.h a233bdcd5daa0582acf2cd5b0f339ad54d09bf13 - src/nvidia-modeset/include/dp/nvdp-timer.h 2b91423ff88ca398324088d4f910e81f6944123a - src/nvidia-modeset/include/dp/nvdp-connector.h aa8aa13c6fc48ff5ef621f243e94dcc01a46dea3 - src/nvidia-modeset/kapi/include/nvkms-kapi-notifiers.h c0de6efe1d5c57da324118f108ea0570a6923036 - src/nvidia-modeset/kapi/include/nvkms-kapi-internal.h 1ec3df41f465a332cae8d3bb97e575c9a2b936f4 - src/nvidia-modeset/kapi/src/nvkms-kapi.c a4d52bb238ce94f3427f25bd169e58d5d5f4abd1 - src/nvidia-modeset/kapi/src/nvkms-kapi-notifiers.c ce42ceac4c4cf9d249d66ab57ae2f435cd9623fc - src/nvidia-modeset/kapi/src/nvkms-kapi-sync.c 80c2c9a2a05beb0202239db8b0dd7080ff21c194 - src/nvidia-modeset/kapi/interface/nvkms-kapi-private.h 29309411e2bf1c2e6492a104dcb9f53705c2e9aa - src/nvidia-modeset/kapi/interface/nvkms-kapi.h 11af2aeea97398b58f628fe4685b5dfcfda5791b - src/nvidia-modeset/src/nvkms-modeset.c 016fd1b111731c6d323425d52bfe1a04d8bcade7 - src/nvidia-modeset/src/nvkms-headsurface-swapgroup.c 37a6d00e8721a9c4134810f8be3e7168f8cbb226 - src/nvidia-modeset/src/nvkms-evo.c 4758c601621603597bd2387c4f08b3fdc17e375d - src/nvidia-modeset/src/nvkms-hw-flip.c 5e3188c2d9b580ff69e45842f841f5c92c0c6edb - src/nvidia-modeset/src/nvkms-headsurface-ioctl.c e1a3c31638416a0132c5301fe5dd4b1c93f14376 - src/nvidia-modeset/src/nvkms-cursor3.c d48ff2da5fac6f8cd0522a25b947b5b8c01812ba - src/nvidia-modeset/src/nvkms-rm.c 30ad7839985dea46e6b6d43499210a3056da51ad - src/nvidia-modeset/src/nvkms-utils-flip.c 2c24667a18374ae967917df219f3775d9a79ae04 - src/nvidia-modeset/src/nvkms-headsurface-3d.c fb8b4aa1e36f23e1927be3dbd351ab0357aeb735 - src/nvidia-modeset/src/nvkms-evo3.c 9ce404d122bbdcd5f626f2c2b7ff08a9bfcf4045 - src/nvidia-modeset/src/nvkms-flip.c e5c96eb6b9884daf4a8d0d467b009008a45065b9 - src/nvidia-modeset/src/g_nvkms-evo-states.c 094c2169412cb577a6e9db9420da084264119284 - src/nvidia-modeset/src/nvkms-hal.c 1e0bf57319954911ddd2fe87b0cd05e257f1439e - src/nvidia-modeset/src/nvkms-surface.c bd2e4a6102432d4ac1faf92b5d3db29e9e3cfafc - src/nvidia-modeset/src/nvkms-utils.c 6d41c9f84cc9ce2d16812e94a3fba055b3fc7308 - src/nvidia-modeset/src/nvkms-conf.c 05bfe67d8cb956a666804b8f27e507bbd35e2c2d - src/nvidia-modeset/src/nvkms-difr.c 9a8746ee4a4e772b8ac13f06dc0de8a250fdb4c7 - src/nvidia-modeset/src/nvkms-ctxdma.c 382141f251ce64e2d33add3b89225c373da9ea7d - src/nvidia-modeset/src/nvkms-hdmi.c 2e1644a912e7a27ec04288e000c3fa5439eecb60 - src/nvidia-modeset/src/nvkms-headsurface-matrix.c 127a3f77febf09d56b6fe3534bc62ff0ffa535d8 - src/nvidia-modeset/src/nvkms-dpy.c e0756f45732035b1000a03bd8a995a46041904ae - src/nvidia-modeset/src/nvkms-vblank-sem-control.c e4044bb85de59d662d0d579771c076cbe9b10bbb - src/nvidia-modeset/src/nvkms.c 12cbc57714f458b5673115bb5c4d380509d05277 - src/nvidia-modeset/src/nvkms-cursor.c 5c93bc35d8f93330dd7a1f7808e39c6001ee83e8 - src/nvidia-modeset/src/nvkms-headsurface-config.c ed78249de63139ec2629bde58b616cef649281f1 - src/nvidia-modeset/src/nvkms-evo2.c c51c4f2e3ac11bf86d4549ce5e9d9010199e37dd - src/nvidia-modeset/src/nvkms-prealloc.c 9d38d5147d06a293a272087d78d0b96b6003f11e - src/nvidia-modeset/src/nvkms-attributes.c 65b02b48caff2a9100b8c5614f91d42fb20da9c0 - src/nvidia-modeset/src/nvkms-dpy-override.c a62b617aa5c89056c19a5f3c91402df8cfcc1103 - src/nvidia-modeset/src/nvkms-push.c 9fea40b7b55d6ebf3f73b5d469751c873ffbe7c0 - src/nvidia-modeset/src/nvkms-dma.c da726d20eea99a96af4c10aace88f419e8ee2a34 - src/nvidia-modeset/src/nvkms-event.c a1c7c3c1191762c0a1038674dee0075d532ccd2d - src/nvidia-modeset/src/nvkms-headsurface.c 2fabe1c14116a2b07f24d01710394ee84a6e3914 - src/nvidia-modeset/src/nvkms-3dvision.c 89b58b1e67ff7ed43c889fe7d85329d7f4762b91 - src/nvidia-modeset/src/nvkms-hw-states.c c799d52bdc792efc377fb5cd307b0eb445c44d6a - src/nvidia-modeset/src/nvkms-cursor2.c dd6c86b5557b02dd15a8ea0f10bde9770d90874e - src/nvidia-modeset/src/nvkms-evo4.c be49ea18102a44914e0d7686c51430df18336383 - src/nvidia-modeset/src/nvkms-framelock.c 6bdb90474b5d31c53104f7b29b447b3f798aaa0e - src/nvidia-modeset/src/nvkms-vrr.c 05ca4acdfeb9b99eccc7e222846fc688473322ae - src/nvidia-modeset/src/nvkms-rmapi-dgpu.c f754a27436fd1e1fa103de6110224c21ad7ea9f4 - src/nvidia-modeset/src/nvkms-pow.c e8c6d2eedfba19f8f06dd57f629588615cf1a2e9 - src/nvidia-modeset/src/nvkms-evo1.c d15f314bea66574e0ffc72966b86bae8366412f5 - src/nvidia-modeset/src/nvkms-console-restore.c 0699860902369359e5ff1a0ef46b87e955d4bb7a - src/nvidia-modeset/src/nvkms-modepool.c 403e6dbff0a607c2aecf3204c56633bd7b612ae2 - src/nvidia-modeset/src/nvkms-stereo.c fd6ecacc4f273c88960148c070dd17d93f49909b - src/nvidia-modeset/src/nvkms-lut.c 771fee54d1123871e380db6f3227b4946b6be647 - src/nvidia-modeset/src/dp/nvdp-timer.cpp 6b985fc50b5040ce1a81418bed73a60edb5d3289 - src/nvidia-modeset/src/dp/nvdp-timer.hpp dcf9f99e79a13b109a8665597f0fc7c00ec37957 - src/nvidia-modeset/src/dp/nvdp-connector.cpp e0e50fc1c526ecf0fe2f60689a25adda1257e2b3 - src/nvidia-modeset/src/dp/nvdp-evo-interface.cpp 16081091156a813977dfdd0718d55ea4a66a0686 - src/nvidia-modeset/src/dp/nvdp-device.cpp 6e17f81da1b94414c1cbf18c3ea92f25352d8bf5 - src/nvidia-modeset/src/dp/nvdp-connector-event-sink.cpp 81065db63fda6468fdf56d853781fca8af610798 - src/nvidia-modeset/src/dp/nvdp-evo-interface.hpp e1f003a64cec57f299e65567d29e69951a62f44a - src/nvidia-modeset/src/dp/nvdp-host.cpp ca07b8e8f507de47694ac7b3b1719b0931da02c6 - src/nvidia-modeset/src/dp/nvdp-connector-event-sink.hpp 2b49249a135293d01e82ef11ee520596c9825875 - src/nvidia-modeset/src/shaders/g_pascal_shaders 09cb78322cc8465d42a4be6a1c3682566c66462d - src/nvidia-modeset/src/shaders/g_maxwell_shaders a62c80e00077041d38d84e06c5834dca527e8a55 - src/nvidia-modeset/src/shaders/g_volta_shader_info.h 21cf709a8717d43c4abc6b66c8faad141592b7ce - src/nvidia-modeset/src/shaders/g_nvidia-headsurface-shader-info.h fec9074463a5505e300f9feb77b60ec77b781bb7 - src/nvidia-modeset/src/shaders/g_turing_shader_info.h cad54ab33c1132ba7453f54e9a02d34504e4fd5c - src/nvidia-modeset/src/shaders/g_pascal_shader_info.h f3bdeb7d46fdc9c31940ea799ce4a0d328fe1844 - src/nvidia-modeset/src/shaders/g_ampere_shaders 0ba4739302e0938b5599afb7e7ad281b21e25cec - src/nvidia-modeset/src/shaders/g_maxwell_shader_info.h 1c02043d31faf4f79c4a54dd5a622e87ee276be8 - src/nvidia-modeset/src/shaders/g_volta_shaders f540d144503d00941a1b32fb1a3d13061065b24e - src/nvidia-modeset/src/shaders/g_hopper_shader_info.h 74824b796722071bc3d90e4dacfed245dcda28cd - src/nvidia-modeset/src/shaders/g_turing_shaders ce728856b76bfa428b199fd3b97e0cbc24ef54cd - src/nvidia-modeset/src/shaders/g_hopper_shaders 02bb8bc0f5d228d4a9a383d797daffd8936c4ad7 - src/nvidia-modeset/src/shaders/g_ampere_shader_info.h 9f35175e44247d4facb26a60614d40fcdb74416f - src/nvidia-modeset/src/shaders/g_shader_names.h ca86fee8bd52e6c84e376199c5f3890078bc2031 - src/nvidia-modeset/os-interface/include/nvidia-modeset-os-interface.h 885370cd7fc5f4d9d685d9d8d3e21460fd30cb38 - src/nvidia-modeset/os-interface/include/nvkms.h 51b367a6e289cc8957388745988315024f97506e - src/nvidia-modeset/interface/nvkms-api.h b986bc6591ba17a74ad81ec4c93347564c6d5165 - src/nvidia-modeset/interface/nvkms-format.h 2ea1436104463c5e3d177e8574c3b4298976d37e - src/nvidia-modeset/interface/nvkms-ioctl.h 3bf4a2d1fec120ef5313c8bf119bc22fb3cf0cc5 - src/nvidia-modeset/interface/nvkms-modetimings.h c54c62de441828282db9a4f5b35c2fa5c97d94f1 - src/nvidia-modeset/interface/nvkms-api-types.h 8e3e74d2b3f45381e7b0012d930cf451cbd1728f - src/nvidia-modeset/interface/nvkms-sync.h Change-Id: Ifb2180253a3f7d7b847ae6067701eddc8c1acc85
This commit is contained in:
288
src/common/displayport/inc/dp_address.h
Normal file
288
src/common/displayport/inc/dp_address.h
Normal file
@@ -0,0 +1,288 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_address.h *
|
||||
* Basic class for AUX Address *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_ADDRESS_H
|
||||
#define INCLUDED_DP_ADDRESS_H
|
||||
|
||||
#include "dp_internal.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class Address
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
maxHops = 15, // update DP_MAX_ADDRESS_HOPS when changed (in displayportCommon.h)
|
||||
maxHopsHDCP = 7,
|
||||
maxPortCount = 15
|
||||
};
|
||||
|
||||
Address()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
Address(unsigned hop0)
|
||||
{
|
||||
clear();
|
||||
hop[hops++] = hop0;
|
||||
}
|
||||
|
||||
Address(unsigned hop0, unsigned hop1)
|
||||
{
|
||||
clear();
|
||||
hop[hops++] = hop0;
|
||||
hop[hops++] = hop1;
|
||||
}
|
||||
|
||||
Address(const Address & other)
|
||||
{
|
||||
clear();
|
||||
for(unsigned i = 0; i < other.size(); i++)
|
||||
{
|
||||
append(other[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
hops = 0;
|
||||
for (unsigned i = 0; i < maxHops; i++)
|
||||
{
|
||||
hop[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Address parent() const
|
||||
{
|
||||
if (hops == 0)
|
||||
{
|
||||
DP_ASSERT(hops != 0);
|
||||
return 0;
|
||||
}
|
||||
Address addr = *this;
|
||||
addr.hops --;
|
||||
return addr;
|
||||
}
|
||||
|
||||
unsigned tail() const
|
||||
{
|
||||
if (hops == 0)
|
||||
{
|
||||
DP_ASSERT(hops != 0);
|
||||
return 0;
|
||||
}
|
||||
return hop[hops-1];
|
||||
}
|
||||
|
||||
void append(unsigned port)
|
||||
{
|
||||
if (hops >= maxHops)
|
||||
{
|
||||
DP_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
hop[hops++] = port;
|
||||
}
|
||||
|
||||
void prepend(unsigned port)
|
||||
{
|
||||
if (hops >= maxHops)
|
||||
{
|
||||
DP_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
hops++;
|
||||
for (unsigned i = hops - 1; i > 0; i--)
|
||||
hop[i] = hop[i-1];
|
||||
hop[0] = port;
|
||||
}
|
||||
|
||||
void pop()
|
||||
{
|
||||
if (hops == 0)
|
||||
{
|
||||
DP_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
hops--;
|
||||
}
|
||||
|
||||
// Just to keep clear copy
|
||||
Address & operator = (const Address & other)
|
||||
{
|
||||
clear();
|
||||
for(unsigned i = 0; i < other.size(); i++)
|
||||
{
|
||||
append(other[i]);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator == (const Address & other) const
|
||||
{
|
||||
if (other.size() != size())
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < hops; i++)
|
||||
if (other[i] != (*this)[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Sort by size first, then "alphabetically" (lexicographical see wikipedia)
|
||||
//
|
||||
bool operator > (const Address & other) const
|
||||
{
|
||||
if (size() > other.size())
|
||||
return true;
|
||||
else if (size() < other.size())
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < hops; i++)
|
||||
{
|
||||
if ((*this)[i] > other[i])
|
||||
return true;
|
||||
else if ((*this)[i] < other[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Sort by size first, then "alphabetically" (lexicographical see wikipedia)
|
||||
//
|
||||
bool operator < (const Address & other) const
|
||||
{
|
||||
if (size() < other.size())
|
||||
return true;
|
||||
else if (size() > other.size())
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < hops; i++)
|
||||
{
|
||||
if ((*this)[i] < other[i])
|
||||
return true;
|
||||
else if ((*this)[i] > other[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator >= (const Address & other) const
|
||||
{
|
||||
return !((*this) < other);
|
||||
}
|
||||
|
||||
bool operator <= (const Address & other) const
|
||||
{
|
||||
return !((*this) > other);
|
||||
}
|
||||
|
||||
bool operator != (const Address & other) const
|
||||
{
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
unsigned size() const
|
||||
{
|
||||
return hops;
|
||||
}
|
||||
|
||||
unsigned & operator [](unsigned index)
|
||||
{
|
||||
DP_ASSERT(index < hops);
|
||||
return hop[index];
|
||||
}
|
||||
|
||||
const unsigned & operator [](unsigned index) const
|
||||
{
|
||||
DP_ASSERT(index < hops);
|
||||
return hop[index];
|
||||
}
|
||||
|
||||
bool under(const Address & root) const
|
||||
{
|
||||
if (size() < root.size())
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < root.size(); i++)
|
||||
if ((*this)[i] != root[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef char StringBuffer[maxHops*3+1];
|
||||
char * toString(StringBuffer & buffer, bool removeLeadingZero = false) const
|
||||
{
|
||||
char * p = &buffer[0];
|
||||
int hopsWritten = 0;
|
||||
for (unsigned i = 0; i < hops; i++)
|
||||
{
|
||||
if (i == 0 && hop[0] == 0 && removeLeadingZero)
|
||||
continue;
|
||||
if (hopsWritten > 0)
|
||||
*p++ = '.';
|
||||
if (hop[i] >= 10)
|
||||
*p++ = (char)(hop[i] / 10 +'0');
|
||||
*p++ = (char)(hop[i] % 10 + '0');
|
||||
hopsWritten++;
|
||||
}
|
||||
|
||||
*p++= 0;
|
||||
return (char *)&buffer[0];
|
||||
}
|
||||
|
||||
// Large enough to fit 4 hops into every NvU32
|
||||
typedef NvU32 NvU32Buffer[(maxHops-1)/4+1 < 4 ? 4 : (maxHops-1)/4+1];
|
||||
NvU32 * toNvU32Buffer(NvU32Buffer & buffer) const
|
||||
{
|
||||
for (unsigned i = 0; i < hops; i++)
|
||||
{
|
||||
buffer[i/4] |= ((NvU8) hop[i]) << (i % 4) * 8;
|
||||
}
|
||||
|
||||
return (NvU32 *)&buffer[0];
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned hop[maxHops];
|
||||
unsigned hops;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_ADDRESS_H
|
||||
80
src/common/displayport/inc/dp_auxbus.h
Normal file
80
src/common/displayport/inc/dp_auxbus.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_auxbus.h *
|
||||
* Interface for low level access to the aux bus. *
|
||||
* This is the synchronous version of the interface. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_AUXBUS_H
|
||||
#define INCLUDED_DP_AUXBUS_H
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class AuxBus : virtual public Object
|
||||
{
|
||||
public:
|
||||
enum status
|
||||
{
|
||||
success,
|
||||
defer,
|
||||
nack,
|
||||
unSupported,
|
||||
};
|
||||
|
||||
enum Action
|
||||
{
|
||||
read,
|
||||
write,
|
||||
writeStatusUpdateRequest, // I2C only
|
||||
};
|
||||
|
||||
enum Type
|
||||
{
|
||||
native,
|
||||
i2c,
|
||||
i2cMot
|
||||
};
|
||||
|
||||
virtual status transaction(Action action, Type type, int address,
|
||||
NvU8 * buffer, unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned * pNakReason = NULL,
|
||||
NvU8 offset = 0, NvU8 nWriteTransactions = 0) = 0;
|
||||
|
||||
virtual unsigned transactionSize() = 0;
|
||||
virtual status fecTransaction(NvU8 *fecStatus, NvU16 **fecErrorCount, NvU32 flags) { return nack; }
|
||||
virtual void setDevicePlugged(bool) {}
|
||||
virtual ~AuxBus() {}
|
||||
};
|
||||
|
||||
//
|
||||
// Wraps an auxbus interface with one that prints all the input and output
|
||||
//
|
||||
AuxBus * CreateAuxLogger(AuxBus * auxBus);
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_AUXBUS_H
|
||||
96
src/common/displayport/inc/dp_auxdefs.h
Normal file
96
src/common/displayport/inc/dp_auxdefs.h
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_auxdefs.h *
|
||||
* Definitions for DPCD AUX offsets *
|
||||
* Should be used sparingly (DPCD HAL preferred) *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef __DP_AUXDEFS_H__
|
||||
#define __DP_AUXDEFS_H__
|
||||
|
||||
#define DPCD_MESSAGEBOX_SIZE 48
|
||||
|
||||
//
|
||||
// If a message is outstanding for at least 4 seconds
|
||||
// assume no reply is coming through
|
||||
//
|
||||
#define DPCD_MESSAGE_REPLY_TIMEOUT 4000
|
||||
|
||||
#define DPCD_LINK_ADDRESS_MESSAGE_RETRIES 20 // 20 retries
|
||||
#define DPCD_LINK_ADDRESS_MESSAGE_COOLDOWN 10 // 10ms between attempts
|
||||
|
||||
// pointing to the defaults for LAM settings to start with
|
||||
#define DPCD_REMOTE_DPCD_WRITE_MESSAGE_RETRIES DPCD_LINK_ADDRESS_MESSAGE_RETRIES
|
||||
#define DPCD_REMOTE_DPCD_WRITE_MESSAGE_COOLDOWN DPCD_LINK_ADDRESS_MESSAGE_COOLDOWN
|
||||
|
||||
#define DPCD_REMOTE_DPCD_READ_MESSAGE_RETRIES 7 // 7 retries
|
||||
#define DPCD_REMOTE_DPCD_READ_MESSAGE_COOLDOWN DPCD_LINK_ADDRESS_MESSAGE_COOLDOWN
|
||||
#define DPCD_REMOTE_DPCD_READ_MESSAGE_COOLDOWN_BKSV 20 // 20ms between attempts
|
||||
|
||||
#define DPCD_QUERY_STREAM_MESSAGE_RETRIES 7 // 7 retries
|
||||
#define DPCD_QUERY_STREAM_MESSAGE_COOLDOWN 20 // 20ms between attempts
|
||||
|
||||
#define MST_EDID_RETRIES 20
|
||||
#define MST_EDID_COOLDOWN 10
|
||||
|
||||
#define MST_ALLOCATE_RETRIES 10
|
||||
#define MST_ALLOCATE_COOLDOWN 10
|
||||
|
||||
#define HDCP_AUTHENTICATION_RETRIES 6 // 6 retries
|
||||
#define HDCP_CPIRQ_RXSTAUS_RETRIES 3
|
||||
#define HDCP_AUTHENTICATION_COOLDOWN 1000// 1 sec between attempts
|
||||
#define HDCP22_AUTHENTICATION_COOLDOWN 30000// 30 sec between attempts
|
||||
#define HDCP_AUTHENTICATION_COOLDOWN_HPD 3000// 3 sec for first stream Add
|
||||
#define HDCP_CPIRQ_RXSTATUS_COOLDOWN 20 // 20ms between attempts
|
||||
|
||||
#define HDCP_QSEANDSETECF_RETRIES 6 // 6 retries as authentication retires
|
||||
#define HDCP_QSEANDSETECF_COOLDOWN 3000// 3 sec between attempts as authentication period
|
||||
|
||||
// Need to re-submit Stream Validation request to falcon microcontroller after 1 sec if current request fails
|
||||
#define HDCP_STREAM_VALIDATION_RESUBMIT_COOLDOWN 1000
|
||||
|
||||
//
|
||||
// Wait till 8secs for completion of the KSV and Stream Validation, if that doesn't complete
|
||||
// then timeout.
|
||||
//
|
||||
#define HDCP_STREAM_VALIDATION_REQUEST_COOLDOWN 8000
|
||||
|
||||
//
|
||||
// Wait till 1 sec to check if still have active QSE message then send QSE message or queue
|
||||
// to check next time. 1sec should be enough that sink reply QSE request.
|
||||
//
|
||||
#define HDCP_SEND_QSE_MESSAGE_COOLDOWN 1000
|
||||
|
||||
#define DPCD_OUI_NVIDIA 0x00044B
|
||||
|
||||
//
|
||||
// Define maximum retry count that checking Payload ID table updated before
|
||||
// trigger ACT sequence.
|
||||
//
|
||||
#define PAYLOADIDTABLE_UPDATED_CHECK_RETRIES 300
|
||||
|
||||
#endif // __DP_AUXDEFS_H__
|
||||
181
src/common/displayport/inc/dp_auxretry.h
Normal file
181
src/common/displayport/inc/dp_auxretry.h
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_auxretry.h *
|
||||
* Adapter interface for friendlier AuxBus *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_AUXRETRY_H
|
||||
#define INCLUDED_DP_AUXRETRY_H
|
||||
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_timeout.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
enum
|
||||
{
|
||||
minimumRetriesOnDefer = 7
|
||||
};
|
||||
|
||||
class AuxRetry
|
||||
{
|
||||
AuxBus * aux;
|
||||
public:
|
||||
AuxRetry(AuxBus * aux = 0)
|
||||
: aux(aux)
|
||||
{
|
||||
}
|
||||
|
||||
AuxBus * getDirect()
|
||||
{
|
||||
return aux;
|
||||
}
|
||||
|
||||
enum status
|
||||
{
|
||||
ack,
|
||||
nack,
|
||||
unsupportedRegister,
|
||||
defer
|
||||
};
|
||||
|
||||
//
|
||||
// Perform an aux read transaction.
|
||||
// - Automatically handles defers up to retry limit
|
||||
// - Retries on partial read
|
||||
//
|
||||
virtual status readTransaction(int address, NvU8 * buffer, unsigned size, unsigned retries = minimumRetriesOnDefer);
|
||||
|
||||
//
|
||||
// Similar to readTransaction except that it supports reading
|
||||
// larger spans than AuxBus::transactionSize()
|
||||
//
|
||||
virtual status read(int address, NvU8 * buffer, unsigned size, unsigned retries = minimumRetriesOnDefer);
|
||||
|
||||
//
|
||||
// Perform an aux write transaction.
|
||||
// - Automatically handles defers up to retry limit
|
||||
// - Retries on partial write
|
||||
//
|
||||
virtual status writeTransaction(int address, NvU8 * buffer, unsigned size, unsigned retries = minimumRetriesOnDefer);
|
||||
|
||||
//
|
||||
// Similar to writeTransaction except that it supports writin
|
||||
// larger spans than AuxBus::transactionSize()
|
||||
//
|
||||
virtual status write(int address, NvU8 * buffer, unsigned size, unsigned retries = minimumRetriesOnDefer);
|
||||
};
|
||||
|
||||
class AuxLogger : public AuxBus
|
||||
{
|
||||
AuxBus * bus;
|
||||
char hex[256];
|
||||
char hex_body[256];
|
||||
char hint[128];
|
||||
|
||||
public:
|
||||
AuxLogger(AuxBus * bus) : bus(bus)
|
||||
{
|
||||
}
|
||||
|
||||
const char * getAction(Action action)
|
||||
{
|
||||
if (action == read)
|
||||
return "rd ";
|
||||
else if (action == write)
|
||||
return "wr ";
|
||||
else if (action == writeStatusUpdateRequest)
|
||||
return "writeStatusUpdateRequest ";
|
||||
else
|
||||
DP_ASSERT(0);
|
||||
return "???";
|
||||
}
|
||||
|
||||
const char * getType(Type typ)
|
||||
{
|
||||
if (typ == native)
|
||||
return "";
|
||||
else if (typ == i2c)
|
||||
return "i2c ";
|
||||
else if (typ == i2cMot)
|
||||
return "i2cMot ";
|
||||
else
|
||||
DP_ASSERT(0);
|
||||
return "???";
|
||||
}
|
||||
|
||||
const char * getStatus(status stat)
|
||||
{
|
||||
if (stat == success)
|
||||
return "";
|
||||
else if (stat == nack)
|
||||
return "(nack) ";
|
||||
else if (stat == defer)
|
||||
return "(defer) ";
|
||||
else
|
||||
DP_ASSERT(0);
|
||||
return "???";
|
||||
}
|
||||
|
||||
const char * getRequestId(unsigned requestIdentifier)
|
||||
{
|
||||
switch(requestIdentifier)
|
||||
{
|
||||
case 0x1: return "LINK_ADDRESS";
|
||||
case 0x4: return "CLEAR_PAT";
|
||||
case 0x10: return "ENUM_PATH";
|
||||
case 0x11: return "ALLOCATE";
|
||||
case 0x12: return "QUERY";
|
||||
case 0x20: return "DPCD_READ";
|
||||
case 0x21: return "DPCD_WRITE";
|
||||
case 0x22: return "I2C_READ";
|
||||
case 0x23: return "I2C_WRITE";
|
||||
case 0x24: return "POWER_UP_PHY";
|
||||
case 0x25: return "POWER_DOWN_PHY";
|
||||
case 0x38: return "HDCP_STATUS";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
virtual status transaction(Action action, Type type, int address,
|
||||
NvU8 * buffer, unsigned sizeRequested,
|
||||
unsigned * sizeCompleted, unsigned * pNakReason,
|
||||
NvU8 offset, NvU8 nWriteTransactions);
|
||||
|
||||
virtual unsigned transactionSize()
|
||||
{
|
||||
return bus->transactionSize();
|
||||
}
|
||||
|
||||
virtual status fecTransaction(NvU8 *fecStatus, NvU16 **fecErrorCount, NvU32 flags)
|
||||
{
|
||||
return bus->fecTransaction(fecStatus, fecErrorCount, flags);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_AUXRETRY_H
|
||||
98
src/common/displayport/inc/dp_bitstream.h
Normal file
98
src/common/displayport/inc/dp_bitstream.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_bitstream.h *
|
||||
* This is an implementation of the big endian bit stream *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_BITSTREAM_H
|
||||
#define INCLUDED_DP_BITSTREAM_H
|
||||
|
||||
#include "dp_buffer.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// Bitstream reader interface
|
||||
// - reads a packed stream of bits in Big Endian format
|
||||
// - handles alignment, buffering, and buffer bounds checking
|
||||
//
|
||||
class BitStreamReader
|
||||
{
|
||||
Buffer * sourceBuffer;
|
||||
unsigned bitsOffset;
|
||||
unsigned bitsEnd;
|
||||
|
||||
public:
|
||||
// Read 1-32 bits from the stream into *value. Returns true on success
|
||||
bool read(unsigned * value, unsigned bits);
|
||||
|
||||
// Read 1-32 bits from stream. Returns 'default' on failure.
|
||||
unsigned readOrDefault(unsigned bits, unsigned defaultValue);
|
||||
|
||||
// Skip bits until we're aligned to the power of two alignment
|
||||
bool align(unsigned align);
|
||||
|
||||
unsigned offset();
|
||||
Buffer * buffer();
|
||||
BitStreamReader(Buffer * buffer, unsigned bitsOffset, unsigned bitsCount);
|
||||
};
|
||||
|
||||
//
|
||||
// Bitstream writer interface
|
||||
//
|
||||
class BitStreamWriter
|
||||
{
|
||||
Buffer * targetBuffer;
|
||||
unsigned bitsOffset;
|
||||
public:
|
||||
//
|
||||
// Create a bitstream writer at a specific bit offset
|
||||
// into an already existing buffer
|
||||
//
|
||||
BitStreamWriter(Buffer * buffer, unsigned bitsOffset = 0);
|
||||
|
||||
//
|
||||
// Write n bits to the buffer in big endian format.
|
||||
// No buffering is performed.
|
||||
//
|
||||
bool write(unsigned value, unsigned bits);
|
||||
|
||||
//
|
||||
// Emit zero's until the offset is divisible by align.
|
||||
// CAVEAT: align must be a power of 2 (eg 8)
|
||||
//
|
||||
bool align(unsigned align);
|
||||
|
||||
//
|
||||
// Get current offset and buffer target
|
||||
//
|
||||
unsigned offset();
|
||||
Buffer * buffer();
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_BITSTREAM_H
|
||||
97
src/common/displayport/inc/dp_buffer.h
Normal file
97
src/common/displayport/inc/dp_buffer.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_buffer.h *
|
||||
* Resizable byte buffer and stream classes *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_BUFFER_H
|
||||
#define INCLUDED_DP_BUFFER_H
|
||||
|
||||
#include "dp_internal.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class Buffer
|
||||
{
|
||||
public:
|
||||
NvU8 *data; // Data buffer
|
||||
unsigned length; // bytes used
|
||||
unsigned capacity; // size of allocation
|
||||
bool errorState; // did we lose a malloc in there?
|
||||
public:
|
||||
//
|
||||
// Write will only fail if we're unable to reallocate the buffer. In this case
|
||||
// the buffer will be reset to its empty state.
|
||||
//
|
||||
const NvU8 * getData() const { return data; }
|
||||
NvU8 * getData() { return data; }
|
||||
bool resize(unsigned newSize);
|
||||
void memZero();
|
||||
void reset();
|
||||
unsigned getLength() const { return length; }
|
||||
|
||||
// Is in error state? This happens if malloc fails. Error state is
|
||||
// held until reset is called.
|
||||
bool isError() const;
|
||||
|
||||
Buffer(const Buffer & other);
|
||||
Buffer(NvU8 * data, unsigned size);
|
||||
Buffer & operator = (const Buffer & other);
|
||||
Buffer();
|
||||
~Buffer();
|
||||
|
||||
void swap(Buffer & other) {
|
||||
swap_args(other.data, data);
|
||||
swap_args(other.length, length);
|
||||
swap_args(other.capacity, capacity);
|
||||
swap_args(other.errorState, errorState);
|
||||
}
|
||||
|
||||
bool operator== (const Buffer & other) const;
|
||||
};
|
||||
|
||||
class Stream
|
||||
{
|
||||
protected:
|
||||
Buffer * parent;
|
||||
unsigned byteOffset;
|
||||
public:
|
||||
Stream(Buffer * buffer);
|
||||
bool seek(unsigned where);
|
||||
bool read(NvU8 * buffer, unsigned size);
|
||||
bool write(NvU8 * buffer, unsigned size);
|
||||
|
||||
// returns error state of buffer
|
||||
bool isError() const;
|
||||
unsigned remaining();
|
||||
unsigned offset();
|
||||
};
|
||||
|
||||
void swapBuffers(Buffer & left, Buffer & right);
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_BUFFER_H
|
||||
1455
src/common/displayport/inc/dp_configcaps.h
Normal file
1455
src/common/displayport/inc/dp_configcaps.h
Normal file
File diff suppressed because it is too large
Load Diff
783
src/common/displayport/inc/dp_connector.h
Normal file
783
src/common/displayport/inc/dp_connector.h
Normal file
@@ -0,0 +1,783 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_connector.h *
|
||||
* This is the primary client interface. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_CONNECTOR_H
|
||||
#define INCLUDED_DP_CONNECTOR_H
|
||||
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_object.h"
|
||||
#include "dp_mainlink.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_address.h"
|
||||
#include "dp_guid.h"
|
||||
#include "dp_evoadapter.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_auxretry.h"
|
||||
#include "displayport.h"
|
||||
#include "dp_vrr.h"
|
||||
#include "../../modeset/timing/nvt_dsc_pps.h"
|
||||
#include "ctrl/ctrl0073/ctrl0073dp.h"
|
||||
#include "nvcfg_sdk.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class EvoInterface;
|
||||
|
||||
#define SET_DP_IMP_ERROR(pErrorCode, errorCode) \
|
||||
if (pErrorCode && *pErrorCode == DP_IMP_ERROR_NONE) *pErrorCode = errorCode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_IMP_ERROR_NONE,
|
||||
DP_IMP_ERROR_ZERO_VALUE_PARAMS,
|
||||
DP_IMP_ERROR_AUDIO_BEYOND_48K,
|
||||
DP_IMP_ERROR_DSC_SYNAPTICS_COLOR_FORMAT,
|
||||
DP_IMP_ERROR_PPS_DSC_DUAL_FORCE,
|
||||
DP_IMP_ERROR_DSC_PCON_FRL_BANDWIDTH,
|
||||
DP_IMP_ERROR_DSC_PCON_HDMI2_BANDWIDTH,
|
||||
DP_IMP_ERROR_DSC_LAST_HOP_BANDWIDTH,
|
||||
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH,
|
||||
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH_DSC,
|
||||
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH_NO_DSC,
|
||||
DP_IMP_ERROR_INSUFFICIENT_DP_TUNNELING_BANDWIDTH,
|
||||
DP_IMP_ERROR_WATERMARK_BLANKING,
|
||||
DP_IMP_ERROR_PPS_COLOR_FORMAT_NOT_SUPPORTED,
|
||||
DP_IMP_ERROR_PPS_INVALID_HBLANK,
|
||||
DP_IMP_ERROR_PPS_INVALID_BPC,
|
||||
DP_IMP_ERROR_PPS_MAX_LINE_BUFFER_ERROR,
|
||||
DP_IMP_ERROR_PPS_OVERALL_THROUGHPUT_ERROR,
|
||||
DP_IMP_ERROR_PPS_DSC_SLICE_ERROR,
|
||||
DP_IMP_ERROR_PPS_PPS_SLICE_COUNT_ERROR,
|
||||
DP_IMP_ERROR_PPS_PPS_SLICE_HEIGHT_ERROR,
|
||||
DP_IMP_ERROR_PPS_PPS_SLICE_WIDTH_ERROR,
|
||||
DP_IMP_ERROR_PPS_INVALID_PEAK_THROUGHPUT,
|
||||
DP_IMP_ERROR_PPS_MIN_SLICE_COUNT_ERROR,
|
||||
DP_IMP_ERROR_PPS_GENERIC_ERROR,
|
||||
} DP_IMP_ERROR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_TESTMESSAGE_STATUS_SUCCESS = 0,
|
||||
DP_TESTMESSAGE_STATUS_ERROR = 0xDEADBEEF,
|
||||
DP_TESTMESSAGE_STATUS_ERROR_INSUFFICIENT_INPUT_BUFFER = 0xDEADBEED,
|
||||
DP_TESTMESSAGE_STATUS_ERROR_INVALID_PARAM = 0xDEADBEEC
|
||||
// new error code should be here
|
||||
} DP_TESTMESSAGE_STATUS;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
False = 0,
|
||||
True = 1,
|
||||
Indeterminate = 2
|
||||
} TriState;
|
||||
|
||||
enum ConnectorType
|
||||
{
|
||||
connectorDisplayPort,
|
||||
connectorHDMI,
|
||||
connectorDVI,
|
||||
connectorVGA
|
||||
};
|
||||
|
||||
typedef struct portMap
|
||||
{
|
||||
NvU16 validMap; // port i is valid = bit i is high
|
||||
NvU16 inputMap; // port i is input port = bit i is high && validMap bit i is high
|
||||
NvU16 internalMap; // port i is internal = bit i is high && validMap bit i is high
|
||||
} PortMap;
|
||||
|
||||
enum ForceDsc
|
||||
{
|
||||
DSC_DEFAULT,
|
||||
DSC_FORCE_ENABLE,
|
||||
DSC_FORCE_DISABLE
|
||||
};
|
||||
|
||||
struct DpModesetParams
|
||||
{
|
||||
unsigned headIndex;
|
||||
ModesetInfo modesetInfo;
|
||||
DP_COLORFORMAT colorFormat;
|
||||
NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS msaparams;
|
||||
|
||||
DpModesetParams() : headIndex(0), modesetInfo(), colorFormat(dpColorFormat_Unknown), msaparams() {}
|
||||
|
||||
DpModesetParams(unsigned newHeadIndex,
|
||||
ModesetInfo newModesetInfo,
|
||||
DP_COLORFORMAT newColorFormat = dpColorFormat_Unknown) :
|
||||
headIndex(newHeadIndex),
|
||||
modesetInfo(newModesetInfo),
|
||||
colorFormat(newColorFormat),
|
||||
msaparams() {}
|
||||
|
||||
DpModesetParams(unsigned newHeadIndex,
|
||||
ModesetInfo *newModesetInfo,
|
||||
DP_COLORFORMAT newColorFormat = dpColorFormat_Unknown) :
|
||||
headIndex(newHeadIndex),
|
||||
modesetInfo(*newModesetInfo),
|
||||
colorFormat(newColorFormat),
|
||||
msaparams() {}
|
||||
|
||||
};
|
||||
|
||||
struct DscOutParams
|
||||
{
|
||||
unsigned PPS[DSC_MAX_PPS_SIZE_DWORD]; // Out - PPS SDP data
|
||||
};
|
||||
|
||||
struct DscParams
|
||||
{
|
||||
bool bCheckWithDsc; // [IN] - Client telling DP Library to check with DSC.
|
||||
ForceDsc forceDsc; // [IN] - Client telling DP Library to force enable/disable DSC
|
||||
DSC_INFO::FORCED_DSC_PARAMS* forcedParams; // [IN] - Client telling DP Library to force certain DSC params.
|
||||
bool bEnableDsc; // [OUT] - DP Library telling client that DSC is needed for this mode.
|
||||
NvU32 sliceCountMask; // [OUT] - DP Library telling client what all slice counts can be used for the mode.
|
||||
unsigned bitsPerPixelX16; // [IN/OUT] - Bits per pixel value multiplied by 16
|
||||
DscOutParams *pDscOutParams; // [OUT] - DSC parameters
|
||||
|
||||
DscParams() : bCheckWithDsc(false), forceDsc(DSC_DEFAULT), forcedParams(NULL), bEnableDsc(false), sliceCountMask(0), bitsPerPixelX16(0), pDscOutParams(NULL) {}
|
||||
};
|
||||
|
||||
class Group;
|
||||
|
||||
struct DpLinkIsModePossibleParams
|
||||
{
|
||||
struct
|
||||
{
|
||||
Group * pTarget;
|
||||
DpModesetParams *pModesetParams;
|
||||
DP_IMP_ERROR *pErrorStatus;
|
||||
DscParams *pDscParams;
|
||||
} head[NV_MAX_HEADS];
|
||||
};
|
||||
|
||||
struct DpPreModesetParams
|
||||
{
|
||||
struct
|
||||
{
|
||||
Group *pTarget;
|
||||
const DpModesetParams *pModesetParams;
|
||||
} head[NV_MAX_HEADS];
|
||||
NvU32 headMask;
|
||||
};
|
||||
|
||||
bool SetConfigSingleHeadMultiStreamMode(Group **targets, // Array of group pointers given for getting configured in single head multistream mode.
|
||||
NvU32 displayIDs[], // Array of displayIDs given for getting configured in single head multistream mode.
|
||||
NvU32 numStreams, // Number of streams driven out from single head.
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE mode, // Configuration mode : SST or MST
|
||||
bool bSetConfig, // Set or clear the configuration.
|
||||
NvU8 vbiosPrimaryDispIdIndex = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY, // VBIOS primary display ID index in displayIDs[] array
|
||||
bool bEnableAudioOverRightPanel = false); // Audio MUX config : right or left panel
|
||||
|
||||
//
|
||||
// Device object
|
||||
// This object represents a displayport device. Devices are not reported
|
||||
// to clients until the EDID is already on file.
|
||||
//
|
||||
class Device : virtual public Object
|
||||
{
|
||||
public:
|
||||
|
||||
virtual bool isPlugged() = 0;
|
||||
virtual bool isVideoSink() = 0; // Invariant: won't change once reported
|
||||
virtual bool isAudioSink() = 0; // Invariant
|
||||
|
||||
virtual bool isLoop() = 0; // the address starts and ends at th same device
|
||||
virtual bool isRedundant() = 0;
|
||||
virtual bool isMustDisconnect() = 0; // Is this monitor's head being attach preventing
|
||||
// us from enumerating other panels?
|
||||
virtual bool isZombie() = 0; // Head is attached but we're not connected
|
||||
virtual bool isCableOk() = 0; // cable can be not ok, whenwe saw hpd, device connected, but can't talk over aux
|
||||
|
||||
virtual bool isLogical() = 0; // Is device connected to logical port
|
||||
|
||||
virtual Address getTopologyAddress() const = 0; // Invariant
|
||||
virtual bool isMultistream() = 0;
|
||||
|
||||
virtual ConnectorType getConnectorType() = 0; // Invariant
|
||||
|
||||
virtual unsigned getEDIDSize() const= 0; // Invariant
|
||||
// Copies EDID into client buffer. Fails if the buffer is too small
|
||||
virtual bool getEDID(char * buffer, unsigned size) const = 0;
|
||||
|
||||
virtual unsigned getRawEDIDSize() const= 0;
|
||||
// Copies RawEDID into client buffer. Fails if the buffer is too small
|
||||
virtual bool getRawEDID(char * buffer, unsigned size) const = 0;
|
||||
|
||||
virtual bool getPCONCaps(PCONCaps *pPCONCaps) = 0;
|
||||
|
||||
virtual bool isFallbackEdid() = 0; // is the device edid a fallback one?
|
||||
virtual GUID getGUID() const = 0; // Returns the GUID for the device
|
||||
virtual bool isPowerSuspended() = 0;
|
||||
virtual bool isActive() = 0; // Whether the device has a head attached to it
|
||||
virtual TriState hdcpAvailableHop() = 0; // Whether the device support HDCP,
|
||||
// regardless of whether the path leading to it supports HDCP.
|
||||
virtual TriState hdcpAvailable() = 0; // Whether HDCP can be enabled.
|
||||
// Note this checks that the entire path to the node support HDCP.
|
||||
|
||||
virtual PortMap getPortMap() const = 0;
|
||||
|
||||
virtual void setPanelPowerParams(bool bSinkPowerStateD0, bool bPanelPowerStateOn) = 0;
|
||||
virtual Group * getOwningGroup() = 0; // Return the group this device is currently a member of
|
||||
|
||||
virtual AuxBus * getRawAuxChannel() = 0; // No automatic retry on DEFER. See limitations in dp_auxbus.h
|
||||
virtual AuxRetry * getAuxChannel() = 0; // User friendly AUX interface
|
||||
|
||||
virtual Device * getParent() = 0;
|
||||
virtual Device * getChild(unsigned portNumber) = 0;
|
||||
|
||||
virtual void dpcdOverrides() = 0; // Apply DPCD overrides if required
|
||||
|
||||
virtual bool getDpcdRevision(unsigned * major, unsigned * minor) = 0; // get the dpcd revision (maybe cached)
|
||||
|
||||
virtual bool getSDPExtnForColorimetrySupported() = 0;
|
||||
virtual bool getAsyncSDPSupported() = 0;
|
||||
|
||||
virtual bool getPanelFwRevision(NvU16 *revision) = 0;
|
||||
|
||||
virtual bool getIgnoreMSACap() = 0;
|
||||
|
||||
virtual AuxRetry::status setIgnoreMSAEnable(bool msaTimingParamIgnoreEn) = 0;
|
||||
|
||||
virtual NvBool isDSCPossible() = 0;
|
||||
|
||||
virtual NvBool isDSCSupported() = 0;
|
||||
|
||||
virtual NvBool isDSCDecompressionSupported() = 0;
|
||||
|
||||
virtual NvBool isDSCPassThroughSupported() = 0;
|
||||
|
||||
virtual DscCaps getDscCaps() = 0;
|
||||
|
||||
virtual NvBool isDynamicPPSSupported() = 0;
|
||||
|
||||
virtual NvBool isDynamicDscToggleSupported() = 0;
|
||||
|
||||
//
|
||||
// This function returns the device itself or its parent device that is doing
|
||||
// DSC decompression for it.
|
||||
//
|
||||
virtual Device* getDevDoingDscDecompression() = 0;
|
||||
virtual void markDeviceForDeletion() = 0;
|
||||
|
||||
virtual bool getRawDscCaps(NvU8 *buffer, NvU32 bufferSize) = 0;
|
||||
virtual bool setRawDscCaps(const NvU8 *buffer, NvU32 bufferSize) = 0;
|
||||
virtual bool setValidatedRawDscCaps(NvU8 *buffer, NvU32 bufferSize) = 0;
|
||||
virtual bool validatePPSData(DSCPPSDATA *pPps) = 0;
|
||||
virtual bool readAndParseDSCCaps() = 0;
|
||||
|
||||
// This interface is still nascent. Please don't use it. Read size limit is 16 bytes.
|
||||
virtual AuxBus::status getDpcdData(unsigned offset, NvU8 * buffer,
|
||||
unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned * pNakReason = NULL) = 0;
|
||||
|
||||
virtual AuxBus::status setDpcdData(unsigned offset, NvU8 * buffer,
|
||||
unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned * pNakReason = NULL) = 0;
|
||||
|
||||
virtual AuxBus::status dscCrcControl(NvBool bEnable, gpuDscCrc *gpuData, sinkDscCrc *sinkData) = 0;
|
||||
virtual AuxBus::status queryFecData(NvU8 *fecStatus, NvU16 **fecErrorCount, NvU32 flags) = 0;
|
||||
|
||||
//
|
||||
// The address send here will be right shifted by the library. DD should
|
||||
// send the DDC address without the shift.
|
||||
// Parameter bForceMot in both getI2cData and setI2cData is used to forfully set
|
||||
// the MOT bit. It is needed for some special cases where the MOT bit shouldn't
|
||||
// be set but some customers need it to please their monitors.
|
||||
//
|
||||
virtual bool getI2cData(unsigned offset, NvU8 * buffer, unsigned sizeRequested, unsigned * sizeCompleted, bool bForceMot = false) = 0;
|
||||
virtual bool setI2cData(unsigned offset, NvU8 * buffer, unsigned sizeRequested, unsigned * sizeCompleted, bool bForceMot = false) = 0;
|
||||
|
||||
//
|
||||
// Calls VRR enablement implementation in dp_vrr.cpp.
|
||||
// The enablement steps include interaction over DPAux in the vendor specific
|
||||
// DPCD space.
|
||||
//
|
||||
virtual bool startVrrEnablement() = 0; // VF: calls actual enablement code.
|
||||
virtual void resetVrrEnablement() = 0; // VF: resets enablement state.
|
||||
virtual bool isVrrMonitorEnabled() = 0; // VF: gets monitor enablement state.
|
||||
virtual bool isVrrDriverEnabled() = 0; // VF: gets driver enablement state.
|
||||
|
||||
// If the sink support MSA override in MST environment.
|
||||
virtual bool isMSAOverMSTCapable() = 0;
|
||||
virtual bool isFakedMuxDevice() = 0;
|
||||
virtual bool setPanelReplayConfig(panelReplayConfig prcfg) = 0;
|
||||
virtual bool getPanelReplayConfig(panelReplayConfig *pPrcfg) = 0;
|
||||
virtual bool isPanelReplaySupported() = 0;
|
||||
virtual bool getPanelReplayStatus(PanelReplayStatus *pPrStatus) = 0;
|
||||
virtual bool getDeviceSpecificData(NvU8 *oui, NvU8 *deviceIdString,
|
||||
NvU8 *hwRevision, NvU8 *swMajorRevision,
|
||||
NvU8 *swMinorRevision) = 0;
|
||||
virtual bool getParentSpecificData(NvU8 *oui, NvU8 *deviceIdString,
|
||||
NvU8 *hwRevision, NvU8 *swMajorRevision,
|
||||
NvU8 *swMinorRevision) = 0;
|
||||
|
||||
virtual bool setModeList(DisplayPort::DpModesetParams *pModeList, unsigned numModes) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~Device() {}
|
||||
|
||||
};
|
||||
|
||||
class Group : virtual public Object
|
||||
{
|
||||
public:
|
||||
|
||||
//
|
||||
// Routines for changing which panels are in a group. To move a stream to a new
|
||||
// monitor without a modeset:
|
||||
// remove(old_panel)
|
||||
// insert(new_panel)
|
||||
// The library will automatically switch over to the new configuration
|
||||
//
|
||||
virtual void insert(Device * dev) = 0;
|
||||
virtual void remove(Device * dev) = 0;
|
||||
|
||||
//
|
||||
// group->enumDevices(0) - Get first element
|
||||
// group->enumDevices(i) - Get next element
|
||||
//
|
||||
// for (Device * i = group->enumDevices(0); i; i = group->enumDevices(i))
|
||||
//
|
||||
virtual Device * enumDevices(Device * previousDevice) = 0;
|
||||
|
||||
virtual void destroy() = 0; // Destroy the group object
|
||||
|
||||
// Toggles the encryption status for the stream.
|
||||
virtual bool hdcpSetEncrypted(bool encrypted, NvU8 streamType = NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NvBool bForceClear = NV_FALSE, NvBool bAddStreamBack = NV_FALSE) = 0;
|
||||
// Returns whether encryption is currently enabled.
|
||||
virtual bool hdcpGetEncrypted() = 0;
|
||||
|
||||
protected:
|
||||
virtual ~Group() {}
|
||||
|
||||
};
|
||||
|
||||
class Connector : virtual public Object
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Normally the Connector::EventSink callsback can occur in response to the following
|
||||
// 1. Timer callbacks
|
||||
// 2. notifyLongPulse/notifyShortPulse
|
||||
//
|
||||
class EventSink
|
||||
{
|
||||
public:
|
||||
virtual void newDevice(Device * dev) = 0; // New device appears in topology
|
||||
virtual void lostDevice(Device * dev) = 0; // Lost device from topology
|
||||
// Device object ceases to exist after this call
|
||||
|
||||
virtual void notifyMustDisconnect(Group * grp) = 0; // Notification that an attached head is preventing
|
||||
// us from completing detection of a newly connected device
|
||||
|
||||
virtual void notifyDetectComplete() = 0; // Rolling call. Happens every time we've done another full
|
||||
// detect on the topology
|
||||
|
||||
virtual void bandwidthChangeNotification(Device * dev, bool isComplianceMode) = 0; // Available bandwidth to panel has changed, or panel has
|
||||
// become a zombie
|
||||
|
||||
virtual void notifyZombieStateChange(Device * dev, bool zombied) = 0; // Notification that zombie device was attached or dettached
|
||||
virtual void notifyCableOkStateChange(Device * dev, bool cableOk) = 0; // Notification that device got cable state chagne (true - cable is good, false - cables is bad)
|
||||
virtual void notifyHDCPCapDone(Device * dev, bool hdcpCap) = 0; // Notification that device's HDCP cap detection is done and get state change.
|
||||
virtual void notifyMCCSEvent(Device * dev) = 0; // Notification that an MCCS event is coming
|
||||
};
|
||||
|
||||
// Query current Device topology
|
||||
virtual Device * enumDevices(Device * previousDevice) = 0;
|
||||
|
||||
// Called before system enters an S3 state
|
||||
virtual void pause() = 0;
|
||||
|
||||
// Get maximum link configuration
|
||||
virtual LinkConfiguration getMaxLinkConfig() = 0;
|
||||
|
||||
// Get currently active link configuration
|
||||
virtual LinkConfiguration getActiveLinkConfig() = 0;
|
||||
|
||||
// Get Current link configuration
|
||||
virtual void getCurrentLinkConfig(unsigned &laneCount, NvU64 &linkRate) = 0;
|
||||
|
||||
// Get the clock calculation supported by the panel
|
||||
virtual unsigned getPanelDataClockMultiplier() = 0;
|
||||
|
||||
// Get the clock calculation supported by the GPU
|
||||
virtual unsigned getGpuDataClockMultiplier() = 0;
|
||||
|
||||
// Power Down the link
|
||||
virtual void powerdownLink(bool bPowerdownPanel = false) = 0;
|
||||
|
||||
// Resume from standby/initial boot notification
|
||||
// The library is considered to start up in the suspended state. You must make this
|
||||
// API call to enable the library. None of the library APIs are functional before
|
||||
// this call.
|
||||
//
|
||||
// Returns the group representing the firmware panel if any is active.
|
||||
//
|
||||
// plugged Does RM report the root-port DisplayId in
|
||||
// its plugged connector mask
|
||||
//
|
||||
// firmwareLinkHandsOff RM does NOT report the rootport displayId as active,
|
||||
// but one of the active panels shares the same SOR.
|
||||
//
|
||||
// firmwareDPActive RM reports the rootport displayId in the active device list
|
||||
// but display-driver hasn't yet performed its first modeset.
|
||||
//
|
||||
// isUefiSystem DD tells the library whether this system is a UEFI based
|
||||
// one so that the library can get the current and max link config
|
||||
// from RM/UEFI instead of trying to determine them on its own.
|
||||
//
|
||||
// firmwareHead Head being used to drive the firmware
|
||||
// display, if firmwareDPActive is true.
|
||||
//
|
||||
// bFirmwareLinkUseMultistream
|
||||
// Specifies whether the firmware connector is being driven in SST
|
||||
// (false) or MST (true) mode.
|
||||
//
|
||||
// bDisableVbiosScratchRegisterUpdate
|
||||
// Disables update of
|
||||
// NV_PDISP_SOR_DP_SCRATCH_RAD/MISC scratch
|
||||
// pad registers with last lit up display
|
||||
// address. This address is used by VBIOS in
|
||||
// case of driver unload or BSOD.
|
||||
//
|
||||
// bAllowMST Allow/Disallow Multi-streaming
|
||||
//
|
||||
virtual Group * resume(bool firmwareLinkHandsOff,
|
||||
bool firmwareDPActive,
|
||||
bool plugged,
|
||||
bool isUefiSystem = false,
|
||||
unsigned firmwareHead = 0,
|
||||
bool bFirmwareLinkUseMultistream = false,
|
||||
bool bDisableVbiosScratchRegisterUpdate = false,
|
||||
bool bAllowMST = true) = 0;
|
||||
|
||||
// The display-driver should enable hands off mode when attempting
|
||||
// to use a shared resource (such as the SOR) in a non-DP configuration.
|
||||
virtual void enableLinkHandsOff() = 0;
|
||||
virtual void releaseLinkHandsOff() = 0;
|
||||
|
||||
// Usage scenario:
|
||||
// beginCompoundQuery()
|
||||
// compoundQueryAttach(1280x1024)
|
||||
// compoundQueryAttach(1920x1080)
|
||||
// .endCompoundQuery()
|
||||
// Will tell you if you have sufficient bandwidth to operate
|
||||
// two panels at 1920x1080 and 1280x1024 assuming all currently
|
||||
// attached panels are detached.
|
||||
virtual void beginCompoundQuery(const bool bForceEnableFEC = false) = 0;
|
||||
|
||||
//
|
||||
// twoChannelAudioHz
|
||||
// If you need 192khz stereo specify 192000 here.
|
||||
//
|
||||
// eightChannelAudioHz
|
||||
// Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
//
|
||||
// pixelClockHz
|
||||
// Requested pixel clock for the mode
|
||||
//
|
||||
// depth
|
||||
// Requested color depth
|
||||
//
|
||||
virtual bool compoundQueryAttach(Group * target,
|
||||
unsigned twoChannelAudioHz,
|
||||
unsigned eightChannelAudioHz,
|
||||
NvU64 pixelClockHz,
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth,
|
||||
DP_IMP_ERROR *errorStatus = NULL) = 0;
|
||||
|
||||
virtual bool compoundQueryAttach(Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
DscParams *pDscParams, // DSC parameters
|
||||
DP_IMP_ERROR *errorStatus = NULL) = 0; // Error Status code
|
||||
|
||||
virtual bool endCompoundQuery() = 0;
|
||||
|
||||
virtual bool dpLinkIsModePossible(const DpLinkIsModePossibleParams ¶ms) = 0;
|
||||
|
||||
// Interface to indicate if clients need to perform a head shutdown before a modeset
|
||||
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz, // Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz, // Requested pixel clock for the mode
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth) = 0;
|
||||
|
||||
// Interface to indicate if clients need to perform a head shutdown before a modeset
|
||||
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
ModesetInfo modesetInfo) = 0; // Modeset info relevant DSC data
|
||||
|
||||
//
|
||||
// Interface for clients to query library if the link is going to be trained during notifyAttachBegin(modeset).
|
||||
// Note: This API is not intended to know if a link training will be performed during assessment of the link.
|
||||
// This API is added to see if library can avoid link training during modeset so that client can take necessary decision
|
||||
// to avoid a destructive modeset from UEFI mode at post to a GPU driver detected mode
|
||||
// (thus prevent a visible glitch - i.e. Smooth Transition)
|
||||
//
|
||||
// How isLinkTrainingNeededForModeset API is different from isHeadShutDownNeeded API -
|
||||
// In case of MST : we always shutdown head and link train if link is inactive, so both APIs return TRUE
|
||||
// In case of SST :
|
||||
// - If requested link config < active link config, we shutdown head to prevent overflow
|
||||
// as head will still be driving at higher mode during link training to lower mode
|
||||
// So both APIs return TRUE
|
||||
// - If requested link config >= active link config, we don't need a head shutdown since
|
||||
// SOR clocks can be changed by entering flush mode but will need to link train for mode change
|
||||
// So isHeadShutDownNeeded returns FALSE and isLinkTrainingNeededForModeset returns TRUE
|
||||
//
|
||||
virtual bool isLinkTrainingNeededForModeset (ModesetInfo modesetInfo) = 0;
|
||||
|
||||
// Notify library before/after modeset (update)
|
||||
virtual bool notifyAttachBegin(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz, // Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz, // Requested pixel clock for the mode
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth) = 0;
|
||||
|
||||
// Group of panels we're attaching to this head
|
||||
virtual bool notifyAttachBegin(Group * target, const DpModesetParams &modesetParams) = 0;
|
||||
|
||||
virtual void dpPreModeset(const DpPreModesetParams &modesetParams) = 0;
|
||||
virtual void dpPostModeset(void) = 0;
|
||||
|
||||
virtual void readRemoteHdcpCaps() = 0;
|
||||
|
||||
// modeset might be cancelled when NAB failed
|
||||
virtual void notifyAttachEnd(bool modesetCancelled) = 0;
|
||||
|
||||
//
|
||||
// Client needs to be notified about the SST<->MST transition,
|
||||
// based on which null modeset will be sent.
|
||||
//
|
||||
virtual bool isLinkAwaitingTransition() = 0;
|
||||
|
||||
virtual void resetLinkTrainingCounter() = 0;
|
||||
|
||||
// Notify library before/after shutdown (update)
|
||||
virtual void notifyDetachBegin(Group * target) = 0;
|
||||
virtual void notifyDetachEnd(bool bKeepOdAlive = false) = 0;
|
||||
|
||||
// Notify library to assess PCON link capability
|
||||
virtual bool assessPCONLinkCapability(PCONLinkControl *params) = 0;
|
||||
|
||||
// Notify library of hotplug/IRQ
|
||||
virtual void notifyLongPulse(bool statusConnected) = 0;
|
||||
virtual void notifyShortPulse() = 0;
|
||||
|
||||
// Notify Library when ACPI initialization is done
|
||||
virtual void notifyAcpiInitDone() = 0;
|
||||
|
||||
// Notify Library when GPU capability changes. Usually because power event.
|
||||
virtual void notifyGPUCapabilityChange() = 0;
|
||||
virtual void notifyHBR2WAREngage() = 0;
|
||||
|
||||
virtual bool dpUpdateDscStream(Group *target, NvU32 dscBpp) = 0;
|
||||
|
||||
// Create a new Group. Note that if you wish to do a modeset but send the
|
||||
// stream nowhere, you may do a modeset with an EMPTY group. This is expected
|
||||
// to be the mechanism by which monitor faking is implemented.
|
||||
virtual Group * newGroup() = 0;
|
||||
|
||||
// Shutdown and the destroy the connector manager
|
||||
virtual void destroy() = 0;
|
||||
|
||||
virtual void createFakeMuxDevice(const NvU8 *buffer, NvU32 bufferSize) = 0;
|
||||
virtual void deleteFakeMuxDevice() = 0;
|
||||
virtual bool getRawDscCaps(NvU8 *buffer, NvU32 bufferSize) = 0;
|
||||
|
||||
//
|
||||
// OS Modeset Order mitigation causes the library to delay the reporting
|
||||
// of new devices until they can be safely turned on.
|
||||
// When enabled the library client will not see connection events until
|
||||
// MustDisconnect messages are processed.
|
||||
//
|
||||
// Policy state should be set before the library is brought out of
|
||||
// the suspended state.
|
||||
//
|
||||
// Important Note: This option changes the definition of QueryMode.
|
||||
// Without OS order mitigation query mode assumes that you will
|
||||
// deatach all of the heads from any zombied monitors *before*
|
||||
// activating the new panel. If your driver cannot guarantee
|
||||
// this invariant, then it must enable order mitigation.
|
||||
//
|
||||
virtual void setPolicyModesetOrderMitigation(bool enabled) = 0;
|
||||
|
||||
//
|
||||
// force LT at NAB for compliance test (Power Management) in Win10 RS2+ (WDDM 2.2)
|
||||
//
|
||||
// RS2 no longer sends an explicit call for setPanelPowerParams during the Resume.
|
||||
// It does that by specifying an additional flag during the call to SetTimings. Due to
|
||||
// this DP lib doesn't get chance to perform this transition from setPanelPowerParams
|
||||
// and since it was already skipping LT in NAB/modeswitch, so LT get missed out on the
|
||||
// compliance device during resume from S3/S4.
|
||||
//
|
||||
virtual void setPolicyForceLTAtNAB(bool enabled) = 0;
|
||||
|
||||
//
|
||||
// There are cases where OS does not detach heads from connector immediately after hot-unplug,
|
||||
// on next hot-plug there is no guarantee that newly connected sink is capable to drive existing
|
||||
// raster timings. Flush mode has following restriction
|
||||
// When exiting flush mode S/W should ensure that the final
|
||||
// link clock & lane count should be able to support existing raster.
|
||||
// If we run into this situation and use flush mode then that will cause display engine to hang.
|
||||
// This variable ensures to assess link safely in this situation and instead of using flush mode ask
|
||||
// DD to detach/reattach heads for link training.
|
||||
//
|
||||
virtual void setPolicyAssessLinkSafely(bool enabled) = 0;
|
||||
|
||||
//
|
||||
// These interfaces are meant to be used *ONLY* for tool purposes.
|
||||
// Clients should *NOT* use them for their own implementation.
|
||||
//
|
||||
// Sets the preferred link config which the tool has requested to train to.
|
||||
// Each set call should be paired with a reset call. Also, preferred link configs won't persist across HPDs.
|
||||
// It is advisable to do compound queries before setting a mode on a preferred config.
|
||||
// Compound queries and notify attaches(link train) would use the preferred link config unless it is reset again.
|
||||
// (not advisable to leave a preferred link config always ON).
|
||||
//
|
||||
virtual bool setPreferredLinkConfig(LinkConfiguration &lc, bool commit,
|
||||
bool force = false,
|
||||
LinkTrainingType forceTrainType = NORMAL_LINK_TRAINING,
|
||||
bool forcePreferredLinkConfig = false) = 0;
|
||||
|
||||
//
|
||||
// Resets the preferred link config and lets the library go back to default LT policy.
|
||||
// Should follow a previous set call.
|
||||
//
|
||||
virtual bool resetPreferredLinkConfig(bool force=false) = 0;
|
||||
|
||||
//
|
||||
// These interfaces are used by client to allow/disallow
|
||||
// Multi-streaming.
|
||||
//
|
||||
// If connected sink is MST capable then:
|
||||
// Client should detach all active MST video/audio streams before
|
||||
// disallowing MST, vise-versa client should detach active SST
|
||||
// stream before allowing MST.
|
||||
//
|
||||
virtual void setAllowMultiStreaming(bool bAllowMST) = 0;
|
||||
virtual bool getAllowMultiStreaming(void) = 0;
|
||||
|
||||
// This function reads sink MST capability from DPCD register(s).
|
||||
virtual bool getSinkMultiStreamCap(void) = 0;
|
||||
|
||||
// These interfaces are Deprecated, use setAllowMultiStreaming()
|
||||
virtual void setDp11ProtocolForced() = 0;
|
||||
virtual void resetDp11ProtocolForced() = 0;
|
||||
virtual bool isDp11ProtocolForced() = 0;
|
||||
|
||||
// Operates at the Link Level. Causes reauthentication of the entire link.
|
||||
virtual void hdcpRenegotiate(NvU64 cN, NvU64 cKsv) = 0;
|
||||
virtual bool getHDCPAbortCodesDP12(NvU32 &hdcpAbortCodesDP12) = 0;
|
||||
|
||||
virtual bool getOuiSink(unsigned &ouiId, unsigned char * modelName,
|
||||
size_t modelNameBufferSize, NvU8 &chipRevision) = 0;
|
||||
|
||||
virtual bool getIgnoreSourceOuiHandshake() = 0;
|
||||
virtual void setIgnoreSourceOuiHandshake(bool bIgnore) = 0;
|
||||
|
||||
//
|
||||
// The following function is to be used to get the capability bit that tells the client whether the connector
|
||||
// can do multistream.
|
||||
//
|
||||
virtual bool isMultiStreamCapable() = 0;
|
||||
virtual bool isFlushSupported() = 0;
|
||||
virtual bool isStreamCloningEnabled() = 0;
|
||||
virtual NvU32 maxLinkRateSupported() = 0;
|
||||
virtual bool isFECSupported() = 0;
|
||||
virtual bool isFECCapable() = 0;
|
||||
|
||||
// Following APIs are for link test/config for DP Test Utility
|
||||
virtual bool getTestPattern(NV0073_CTRL_DP_TESTPATTERN *pTestPattern) = 0;
|
||||
virtual bool setTestPattern(NV0073_CTRL_DP_TESTPATTERN testPattern,
|
||||
NvU8 laneMask, NV0073_CTRL_DP_CSTM cstm,
|
||||
NvBool bIsHBR2, NvBool bSkipLaneDataOverride) = 0;
|
||||
|
||||
// "data" is an array of NV0073_CTRL_MAX_LANES unsigned ints
|
||||
virtual bool getLaneConfig(NvU32 *numLanes, NvU32 *data) = 0;
|
||||
// "data" is an array of NV0073_CTRL_MAX_LANES unsigned ints
|
||||
virtual bool setLaneConfig(NvU32 numLanes, NvU32 *data) = 0;
|
||||
|
||||
virtual DP_TESTMESSAGE_STATUS sendDPTestMessage(void *pBuffer,
|
||||
NvU32 requestSize,
|
||||
NvU32 *pDpStatus) = 0;
|
||||
|
||||
virtual DP_TESTMESSAGE_STATUS getStreamIDs(NvU32 *pStreamIDs, NvU32 *pCount) = 0;
|
||||
// Function to configure power up/down for DP Main Link
|
||||
virtual void configurePowerState(bool bPowerUp) = 0;
|
||||
|
||||
virtual void readPsrCapabilities(vesaPsrSinkCaps *caps) = 0;
|
||||
virtual bool updatePsrConfiguration(vesaPsrConfig config) = 0;
|
||||
virtual bool readPsrConfiguration(vesaPsrConfig *config) = 0;
|
||||
virtual bool readPsrState(vesaPsrState *psrState) = 0;
|
||||
virtual bool readPsrDebugInfo(vesaPsrDebugStatus *psrDbgState) = 0;
|
||||
virtual bool writePsrErrorStatus(vesaPsrErrorStatus psrErr) = 0;
|
||||
virtual bool readPsrErrorStatus(vesaPsrErrorStatus *psrErr) = 0;
|
||||
virtual bool writePsrEvtIndicator(vesaPsrEventIndicator psrErr) = 0;
|
||||
virtual bool readPsrEvtIndicator(vesaPsrEventIndicator *psrErr) = 0;
|
||||
virtual bool updatePsrLinkState(bool bTurnOnLink) = 0;
|
||||
|
||||
virtual bool readPrSinkDebugInfo(panelReplaySinkDebugInfo *prDbgInfo) = 0;
|
||||
virtual void enableDpTunnelingBwAllocationSupport() = 0;
|
||||
virtual bool willLinkSupportModeSST(const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
const DscParams *pDscParams = NULL) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~Connector() {}
|
||||
};
|
||||
|
||||
//
|
||||
// Library routine to create primary port interface
|
||||
// (Not intended to be used by display driver)
|
||||
Connector * createConnector(MainLink * mainInterface, // DisplayDriver implemented MainLink object
|
||||
AuxBus * auxInterface, // DisplayDriver implemented AuxRetry wrapper
|
||||
Timer * timerInterface, // DisplayDriver provided Timer services
|
||||
Connector::EventSink * sink); // Interface to notify DisplayDriver of events
|
||||
}
|
||||
#endif //INCLUDED_DP_CONNECTOR_H
|
||||
811
src/common/displayport/inc/dp_connectorimpl.h
Normal file
811
src/common/displayport/inc/dp_connectorimpl.h
Normal file
@@ -0,0 +1,811 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_connectorimpl.cpp *
|
||||
* DP connector implementation *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_CONNECTORIMPL_H
|
||||
#define INCLUDED_DP_CONNECTORIMPL_H
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_guid.h"
|
||||
#include "dp_connector.h"
|
||||
#include "dp_configcaps.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_buffer.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_watermark.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_discovery.h"
|
||||
#include "dp_groupimpl.h"
|
||||
#include "dp_deviceimpl.h"
|
||||
#include "dp_qse.h"
|
||||
#include "./dptestutil/dp_testmessage.h"
|
||||
|
||||
// HDCP abort codes
|
||||
#define HDCP_FLAGS_ABORT_DEVICE_REVOKED 0x00000800 // Abort due to a revoked device in DP1.2 topology
|
||||
#define HDCP_FLAGS_ABORT_DEVICE_INVALID 0x00080000 // Abort due to an invalid device in DP1.2 topology
|
||||
#define HDCP_FLAGS_ABORT_HOP_LIMIT_EXCEEDED 0x80000000 // Abort, number of devices in DP1.2 topology exceeds supported limit
|
||||
|
||||
#define DP_TUNNEL_REQUEST_BW_MAX_TIME_MS (1000U)
|
||||
#define DP_TUNNEL_REQUEST_BW_POLLING_INTERVAL_MS (10U)
|
||||
|
||||
static inline unsigned getDataClockMultiplier(NvU64 linkRate, NvU64 laneCount)
|
||||
{
|
||||
//
|
||||
// To get the clock multiplier:
|
||||
// - Convert the linkRate from Hz to 10kHz by dividing it by 10000.
|
||||
// - Multiply the 10kHz linkRate by the laneCount.
|
||||
// - Multiply by 10.0/8, to account for the 8b/10b encoding overhead in the DP protocol layer.
|
||||
//
|
||||
// Avoid floating point in the arithmetic in the calculation
|
||||
// through the following conversions:
|
||||
// linkRate/10000.0 * laneCount * 10.0/8
|
||||
// (linkRate * laneCount * 10) / (10000 * 8)
|
||||
// (linkRate * laneCount) / (1000 * 8)
|
||||
//
|
||||
return (unsigned) DisplayPort::axb_div_c_64(linkRate, laneCount, 8000);
|
||||
}
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
|
||||
class QSENonceGenerator;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_TRANSPORT_MODE_INIT = 0,
|
||||
DP_TRANSPORT_MODE_SINGLE_STREAM = 1,
|
||||
DP_TRANSPORT_MODE_MULTI_STREAM = 2,
|
||||
} DP_TRANSPORT_MODE;
|
||||
|
||||
// Information required during compound query attach for MST
|
||||
typedef struct _CompoundQueryAttachMSTInfo
|
||||
{
|
||||
ModesetInfo localModesetInfo;
|
||||
LinkConfiguration lc;
|
||||
} CompoundQueryAttachMSTInfo;
|
||||
|
||||
struct ConnectorImpl : public Connector, DiscoveryManager::DiscoveryManagerEventSink, Timer::TimerCallback, MessageManager::MessageReceiver::MessageReceiverEventSink
|
||||
{
|
||||
// DPCD HAL Layer - We should use this in place of direct register accesses
|
||||
DPCDHAL * hal;
|
||||
|
||||
MainLink * main; // Main link controls
|
||||
AuxBus * auxBus;
|
||||
|
||||
TestMessage testMessage; // TestMessage instance
|
||||
|
||||
Timer * timer; // OS provided timer services
|
||||
Connector::EventSink * sink; // Event Sink
|
||||
|
||||
// Cached Source OUI for restoring eDP OUI when powering up
|
||||
unsigned cachedSourceOUI;
|
||||
char cachedSourceModelName[NV_DPCD_SOURCE_DEV_ID_STRING__SIZE + 1];
|
||||
NvU8 cachedSourceChipRevision;
|
||||
bool bOuiCached;
|
||||
|
||||
unsigned ouiId; // Sink ouiId
|
||||
unsigned char modelName[NV_DPCD_SOURCE_DEV_ID_STRING__SIZE + 1]; // Device Model-name
|
||||
bool bIgnoreSrcOuiHandshake; // Skip writing source OUI
|
||||
|
||||
LinkPolicy linkPolicy;
|
||||
|
||||
bool linkGuessed; // True when link was "guessed" during HPD in TMDS mode
|
||||
bool isLinkQuiesced; // True when link was set to quiet mode by TMDS modeset
|
||||
|
||||
bool bNoLtDoneAfterHeadDetach; // True when head is disconnected in NDE
|
||||
|
||||
bool isDP12AuthCap; // To tell whether this DP1.2 connector/ upmost device has the authentication Cap.
|
||||
bool isHDCPAuthOn; // To tell whether this connector has the authentication on.
|
||||
bool isHDCPReAuthPending; // To tell whether HDCP Auth is pending (at every stream addition and cleared at handler).
|
||||
bool isHDCPAuthTriggered; // To tell whether HDCP Auth is triggered and only cleared at unplug/device detach for MST.
|
||||
bool isHopLimitExceeded; // To tell the current topology is over limitation.
|
||||
bool bIsDiscoveryDetectActive; // To tell device discovery is active ( isDiscoveryDetectComplete is also used as DD notify and not want to impacts that. )
|
||||
bool isDiscoveryDetectComplete; // To tell device discovery is finished.
|
||||
bool bDeferNotifyLostDevice; // To tell if we should defer notify lost device event to client.
|
||||
|
||||
HDCPValidateData hdcpValidateData; // Cache the HDCP ValidateData.
|
||||
unsigned authRetries; // Retry counter for the authentication.
|
||||
unsigned retryLT; // Retry counter for link training in case of link lost in PostLQA
|
||||
unsigned hdcpCapsRetries; // Retry counter for Hdcp Caps read.
|
||||
unsigned hdcpCpIrqRxStatusRetries; // Retry counter for CPIRQ RxStatus read.
|
||||
bool bLTPhyRepeater; // Link Train PHY Repeaters between Source and Sink
|
||||
bool bFromResumeToNAB; // True if from resume to NAB, WAR flag for unblocking GA1.5
|
||||
bool bAttachOnResume; // True if notifyLongPulse is called for resume (reboot/S3/S4)
|
||||
bool bSkipAssessLinkForEDP; // Skip assessLink() for eDP. Assuming max is reachable.
|
||||
bool bPConConnected; // HDMI2.1-Protocol Converter (Support SRC control mode) connected.
|
||||
bool bSkipAssessLinkForPCon; // Skip assessLink() for PCON. DD will call assessFRLLink later.
|
||||
bool bHdcpAuthOnlyOnDemand; // True if only initiate Hdcp authentication on demand and MST won't auto-trigger authenticate at device attach.
|
||||
bool bHdcpStrmEncrEnblOnlyOnDemand; // True if only initiate Hdcp Stream Encryption Enable on demand and MST won't auto-trigger.
|
||||
bool bReassessMaxLink; // Retry assessLink() if the first assessed link config is lower than the panel max config.
|
||||
|
||||
bool constructorFailed;
|
||||
|
||||
//
|
||||
// OS Modeset Order mitigation causes the library to delay the reporting
|
||||
// of new devices until they can be safely turned on.
|
||||
// When enabled the library client will not see connection events until
|
||||
// MustDisconnect messages are processed.
|
||||
//
|
||||
// Policy state should be set before the library is brought out of
|
||||
// the suspended state.
|
||||
//
|
||||
bool policyModesetOrderMitigation;
|
||||
|
||||
//
|
||||
// force LT at NAB for compliance test (Power Management) in Win10 RS2+ (WDDM 2.2)
|
||||
//
|
||||
// RS2 no longer sends an explicit call for setPanelPowerParams during the Resume.
|
||||
// It does that by specifying an additional flag during the call to SetTimings. Due to
|
||||
// this DP lib doesn't get chance to perform this transition from setPanelPowerParams
|
||||
// and since it was already skipping LT in NAB/modeswitch, so LT get missed out on the
|
||||
// compliance device during resume from S3/S4.
|
||||
//
|
||||
bool policyForceLTAtNAB;
|
||||
|
||||
//
|
||||
// There are cases where OS does not detach heads from connector immediately after hot-unplug,
|
||||
// on next hot-plug there is no guarantee that newly connected sink is capable to drive existing
|
||||
// raster timings. Flush mode has following restriction
|
||||
// When exiting flush mode S/W should ensure that the final
|
||||
// link clock & lane count should be able to support existing raster.
|
||||
// If we run into this situation and use flush mode then that will cause display engine to hang.
|
||||
// This variable ensures to assess link safely in this situation: if newly connected sink is
|
||||
// not capable to drive existing raster then just restore link configuration which was there
|
||||
// before enabling flush mode, through fake link training.
|
||||
//
|
||||
bool policyAssessLinkSafely;
|
||||
|
||||
bool bDisableVbiosScratchRegisterUpdate;
|
||||
|
||||
// Only works when policyModesetOrderMitigation is true.
|
||||
// To record if we should report newDevice.
|
||||
bool modesetOrderMitigation;
|
||||
|
||||
List deviceList;
|
||||
List activeGroups;
|
||||
LinkedList<GroupImpl> intransitionGroups;
|
||||
LinkedList<GroupImpl> addStreamMSTIntransitionGroups;
|
||||
LinkedList<GroupImpl> hdcpEnableTransitionGroups;
|
||||
List inactiveGroups;
|
||||
|
||||
LinkedList<Device> dscEnabledDevices;
|
||||
|
||||
// Compound query
|
||||
bool compoundQueryActive;
|
||||
bool compoundQueryResult;
|
||||
unsigned compoundQueryCount;
|
||||
unsigned compoundQueryLocalLinkPBN;
|
||||
NvU64 compoundQueryUsedTunnelingBw;
|
||||
bool compoundQueryForceEnableFEC;
|
||||
bool bDP2XPreferNonDSCForLowPClk;
|
||||
|
||||
unsigned freeSlots;
|
||||
unsigned maximumSlots;
|
||||
int firstFreeSlot;
|
||||
|
||||
// Multistream messaging
|
||||
MessageManager * messageManager;
|
||||
DiscoveryManager * discoveryManager;
|
||||
|
||||
// Multistream timeslot management (on local link)
|
||||
LinkConfiguration highestAssessedLC; // As of last assess, the highest possible link configuration
|
||||
|
||||
LinkConfiguration activeLinkConfig; // Current link config.
|
||||
|
||||
// this is the link config requested by a client.
|
||||
// can be set and reset by the client for a given operation.
|
||||
LinkConfiguration preferredLinkConfig;
|
||||
bool forcePreferredLinkConfig;
|
||||
|
||||
//
|
||||
// Desired link configuration of single head multiple sst secondary connector.
|
||||
//
|
||||
LinkConfiguration oneHeadSSTSecPrefLnkCfg;
|
||||
|
||||
// All possible link configs
|
||||
LinkConfiguration * allPossibleLinkCfgs;
|
||||
unsigned numPossibleLnkCfg;
|
||||
|
||||
PCONLinkControl activePConLinkControl;
|
||||
|
||||
//
|
||||
// We're waiting for an MST<->SST transition
|
||||
// The transition cannot be made without the DD
|
||||
// disconnecting all heads. All devices are reported
|
||||
// as must_disconnect. Once the last device blocking
|
||||
// the transition is deattached from a head - we transition.
|
||||
//
|
||||
bool linkAwaitingTransition;
|
||||
|
||||
// Unless we're awaiting transition this is identical to hal->getSupportsMultistream()
|
||||
DP_TRANSPORT_MODE linkState;
|
||||
|
||||
bool bAudioOverRightPanel;
|
||||
|
||||
bool previousPlugged;
|
||||
bool connectorActive; // Keep track of if connector is active to serve any IRQ
|
||||
|
||||
Group * firmwareGroup; // The group used for book-keeping when we're in firmware mode
|
||||
|
||||
List pendingEdidReads; // List of DevicePendingEDIDRead structures.
|
||||
// This list tracks the currently in progress MST Edid Reads
|
||||
|
||||
Device * lastDeviceSetForVbios;
|
||||
|
||||
QSENonceGenerator * qseNonceGenerator;
|
||||
|
||||
// Tells whether requests made by library to Downstream Device (i.e QSE messages sent to Branch Device) and RM
|
||||
// (i.e KSV validation and Stream Validation requests sent by library to RM after getting QSE message reply from Downstream)
|
||||
// during querying stream status is valid or not.
|
||||
bool bValidQSERequest;
|
||||
ListElement * message; // Outstanding QSE message pointer for which Stream Validation submission failed.
|
||||
NvU8 * clientId; // ClientId of the group for which Stream Validation submission failed.
|
||||
|
||||
// Flag which gets set when ACPI init is done. DD calls notifyAcpiInitDone to tell client that ACPI init is completed
|
||||
// & client can now initiate DDC EDID read for a device which supports EDID through SBIOS
|
||||
bool bAcpiInitDone;
|
||||
|
||||
// Flag to check if the system is UEFI.
|
||||
bool bIsUefiSystem;
|
||||
|
||||
// Flag to check if LT should be skipped.
|
||||
bool bSkipLt;
|
||||
|
||||
// Flag to make sure that zombie gets triggred when a powerChange event happens
|
||||
bool bMitigateZombie;
|
||||
|
||||
//
|
||||
// HP Valor QHD+ N15P-Q3 EDP needs 50ms delay after D3
|
||||
// during trainLinkOptimized to come up on S4
|
||||
//
|
||||
bool bDelayAfterD3;
|
||||
|
||||
//
|
||||
// ASUS and Samsung monitors have inconsistent behavior when
|
||||
// DPCD 0x600 updated to D3. Skip D3 only in case these monitors
|
||||
// are driven in SST config
|
||||
//
|
||||
bool bKeepLinkAlive;
|
||||
|
||||
//
|
||||
// HP Trump dock link training is unstable during S4 resume, which causes
|
||||
// system to hang. Keep the link alive to increase stability.
|
||||
// See Bug 2109823.
|
||||
//
|
||||
bool bKeepLinkAliveMST;
|
||||
|
||||
// Keep the link alive when connector is in SST
|
||||
bool bKeepLinkAliveSST;
|
||||
|
||||
//
|
||||
// HTC Vive Link box is not happy when we power down the link
|
||||
// during link training when there is no stream present. It requests
|
||||
// for a link retraining pulse which is not required.
|
||||
// WAR to address this - NV Bug# 1793084
|
||||
//
|
||||
bool bKeepOptLinkAlive;
|
||||
|
||||
// Keep both DP and FRL link alive to save time.
|
||||
bool bKeepLinkAliveForPCON;
|
||||
|
||||
//
|
||||
// Remote HDCP DCPD access should be D0 but won't introduce extra Dx
|
||||
// state toggle. Use the counter to avoid powerdownlink when HDCP probe.
|
||||
//
|
||||
unsigned pendingRemoteHdcpDetections;
|
||||
|
||||
//
|
||||
// ASUS PQ 321 tiled monitor sometimes loses link while assessing link
|
||||
// or link training .So if we lower config from HBR2 to HBR and when
|
||||
// we retrain the link , we see black screen.
|
||||
// So WAR is to retry link training with same config for 3 times before
|
||||
// lowering link config. NV Bug #1846925
|
||||
//
|
||||
bool bNoFallbackInPostLQA;
|
||||
|
||||
//
|
||||
// Set to true when we do not want DSC to be limited
|
||||
// to 16 BPP for multitile on Blackwell++
|
||||
//
|
||||
bool bDisableDscMaxBppLimit;
|
||||
|
||||
//
|
||||
// Set to true when we want to force head shutdown
|
||||
// when DSC mode or bpc is changed but LT is still same
|
||||
//
|
||||
bool bForceHeadShutdownOnModeTransition;
|
||||
|
||||
// Flag to tell whether to send QSE after stream encryption on
|
||||
bool bIsEncryptionQseValid;
|
||||
|
||||
bool bReportDeviceLostBeforeNew;
|
||||
bool bDisableSSC;
|
||||
bool bEnableFastLT;
|
||||
NvU32 maxLinkRateFromRegkey;
|
||||
|
||||
//
|
||||
// Latency(ms) to apply between link-train and FEC enable for bug
|
||||
// 2561206.
|
||||
//
|
||||
NvU32 LT2FecLatencyMs;
|
||||
|
||||
// On eDP, do not cache the source OUI if it reads 0. See bug 4793112
|
||||
bool bSkipZeroOuiCache;
|
||||
|
||||
bool bForceHeadShutdownFromRegkey;
|
||||
|
||||
bool bForceHeadShutdownPerMonitor;
|
||||
|
||||
//
|
||||
// Dual SST Partner connector object pointer
|
||||
ConnectorImpl *pCoupledConnector;
|
||||
|
||||
// Set to true when a DSC mode is requested.
|
||||
bool bFECEnable;
|
||||
|
||||
// Save link config before entering PSR.
|
||||
LinkConfiguration psrLinkConfig;
|
||||
|
||||
//
|
||||
// Apply MST DSC caps WAR based on OUI ID of sink
|
||||
//
|
||||
bool bDscMstCapBug3143315;
|
||||
|
||||
//
|
||||
// Synaptics branch device doesn't support Virtual Peer Devices so DSC
|
||||
// capability of downstream device should be decided based on device's own
|
||||
// and its parent's DSC capability
|
||||
//
|
||||
bool bDscCapBasedOnParent;
|
||||
|
||||
//
|
||||
// MST device connnected to dock may issue IRQ for link lost.
|
||||
// Send PowerDown path msg to suppress that.
|
||||
//
|
||||
bool bPowerDownPhyBeforeD3;
|
||||
|
||||
//
|
||||
// Reset the MSTM_CTRL registers on branch device irrespective of
|
||||
// IRQ VECTOR register having stale message. Certain branch devices
|
||||
// need to reset the topology before issuing new discovery commands
|
||||
// as there can be case where previous is still in process and a
|
||||
// possibility that clearPendingMessage() might not be able to catch
|
||||
// the stale messages from previous discovery.
|
||||
//
|
||||
bool bForceClearPendingMsg;
|
||||
NvU64 allocatedDpTunnelBw;
|
||||
NvU64 allocatedDpTunnelBwShadow;
|
||||
bool bForceDisableTunnelBwAllocation;
|
||||
bool bDisableEffBppSST8b10b;
|
||||
|
||||
Group *perHeadAttachedGroup[NV_MAX_HEADS];
|
||||
NvU32 inTransitionHeadMask;
|
||||
|
||||
void sharedInit();
|
||||
ConnectorImpl(MainLink * main, AuxBus * auxBus, Timer * timer, Connector::EventSink * sink);
|
||||
void setPolicyModesetOrderMitigation(bool enabled);
|
||||
void setPolicyForceLTAtNAB(bool enabled);
|
||||
void setPolicyAssessLinkSafely(bool enabled);
|
||||
|
||||
void discoveryDetectComplete();
|
||||
void discoveryNewDevice(const DiscoveryManager::Device &device);
|
||||
void discoveryLostDevice(const Address &address);
|
||||
void processNewDevice(const DiscoveryManager::Device &device,
|
||||
const Edid &edid,
|
||||
bool isMultistream,
|
||||
DwnStreamPortType portType,
|
||||
DwnStreamPortAttribute portAttribute,
|
||||
bool isCompliance = false);
|
||||
|
||||
void applyEdidWARs(Edid &edid, DiscoveryManager::Device &device);
|
||||
virtual void handleEdidWARs(Edid &edid, DiscoveryManager::Device &device){};
|
||||
void applyRegkeyOverrides(const DP_REGKEY_DATABASE &dpRegkeyDatabase);
|
||||
|
||||
ResStatusNotifyMessage ResStatus;
|
||||
|
||||
void messageProcessed(MessageManager::MessageReceiver * from);
|
||||
|
||||
~ConnectorImpl();
|
||||
|
||||
//
|
||||
// Utility functions
|
||||
//
|
||||
virtual void hardwareWasReset();
|
||||
virtual LinkConfiguration getMaxLinkConfig();
|
||||
virtual LinkConfiguration getActiveLinkConfig();
|
||||
void powerdownLink(bool bPowerdownPanel = false);
|
||||
LinkConfiguration initMaxLinkConfig();
|
||||
|
||||
GroupImpl * getActiveGroupForSST();
|
||||
bool detectSinkCountChange();
|
||||
|
||||
virtual bool handlePhyPatternRequest();
|
||||
virtual bool handleTestLinkTrainRequest();
|
||||
virtual void applyOuiWARs();
|
||||
bool linkUseMultistream()
|
||||
{
|
||||
return (linkState == DP_TRANSPORT_MODE_MULTI_STREAM);
|
||||
}
|
||||
|
||||
virtual void populateAllDpConfigs();
|
||||
virtual LinkRates* importDpLinkRates();
|
||||
|
||||
//
|
||||
// Suspend resume API
|
||||
//
|
||||
virtual Group * resume(bool firmwareLinkHandsOff,
|
||||
bool firmwareDPActive,
|
||||
bool plugged,
|
||||
bool isUefiSystem = false,
|
||||
unsigned firmwareHead = 0,
|
||||
bool bFirmwareLinkUseMultistream = false,
|
||||
bool bDisableVbiosScratchRegisterUpdate = false,
|
||||
bool bAllowMST = true);
|
||||
virtual void pause();
|
||||
|
||||
virtual Device * enumDevices(Device * previousDevice) ;
|
||||
|
||||
|
||||
virtual void beginCompoundQuery(const bool bForceEnableFEC = false) ;
|
||||
virtual bool compoundQueryAttach(Group * target,
|
||||
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz, // Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz, // Requested pixel clock for the mode
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth,
|
||||
DP_IMP_ERROR *errorStatus = NULL);
|
||||
|
||||
virtual bool compoundQueryAttach(Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
DscParams *pDscParams = NULL, // DSC parameters
|
||||
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
|
||||
virtual bool compoundQueryAttachTunneling(const DpModesetParams &modesetParams,
|
||||
DscParams *pDscParams = NULL,
|
||||
DP_IMP_ERROR *pErrorCode = NULL);
|
||||
|
||||
virtual bool endCompoundQuery();
|
||||
|
||||
virtual bool dpLinkIsModePossible(const DpLinkIsModePossibleParams ¶ms);
|
||||
|
||||
virtual bool compoundQueryAttachMST(Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
DscParams *pDscParams = NULL, // DSC parameters
|
||||
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
|
||||
|
||||
virtual bool compoundQueryAttachMSTIsDscPossible
|
||||
(
|
||||
Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
DscParams *pDscParams = NULL // DSC parameters
|
||||
);
|
||||
|
||||
// Calculate and Configure SW state based on DSC
|
||||
virtual bool compoundQueryAttachMSTDsc
|
||||
(
|
||||
Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
CompoundQueryAttachMSTInfo * info, // local info to update for later use
|
||||
DscParams *pDscParams = NULL, // DSC parameters
|
||||
DP_IMP_ERROR *pErrorCode = NULL // Error Status code
|
||||
);
|
||||
|
||||
// General part of CQA MST for DSC/non-DSC
|
||||
virtual bool compoundQueryAttachMSTGeneric
|
||||
(
|
||||
Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
CompoundQueryAttachMSTInfo * info, // local info with updates for DSC
|
||||
DscParams *pDscParams = NULL, // DSC parameters
|
||||
DP_IMP_ERROR *pErrorCode = NULL // Error Status code
|
||||
);
|
||||
|
||||
virtual bool compoundQueryAttachSST(Group * target,
|
||||
const DpModesetParams &modesetParams, // Modeset info
|
||||
DscParams *pDscParams = NULL, // DSC parameters
|
||||
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
|
||||
|
||||
virtual bool compoundQueryAttachSSTIsDscPossible(const DpModesetParams &modesetParams,
|
||||
DscParams *pDscParams = NULL);
|
||||
|
||||
virtual bool compoundQueryAttachSSTDsc(const DpModesetParams &modesetParams,
|
||||
LinkConfiguration lc,
|
||||
DscParams *pDscParams = NULL,
|
||||
DP_IMP_ERROR *pErrorCode = NULL);
|
||||
|
||||
|
||||
//
|
||||
// Timer callback tags.
|
||||
// (we pass the address of these variables as context to ::expired)
|
||||
char tagFireEvents;
|
||||
char tagDelayedLinkTrain;
|
||||
char tagHDCPReauthentication;
|
||||
char tagDelayedHdcpCapRead;
|
||||
char tagDelayedHDCPCPIrqHandling;
|
||||
char tagSendQseMessage;
|
||||
char tagDpBwAllocationChanged;
|
||||
char tagHDCPStreamEncrEnable;
|
||||
|
||||
//
|
||||
// Enable disable TMDS mode
|
||||
//
|
||||
virtual void enableLinkHandsOff();
|
||||
virtual void releaseLinkHandsOff();
|
||||
|
||||
//
|
||||
// Timer callback for event management
|
||||
// Uses: fireEvents()
|
||||
virtual void expired(const void * tag);
|
||||
|
||||
// Generate Events.
|
||||
// useTimer specifies whether we fire the events on the timer
|
||||
// context, or this context.
|
||||
void fireEvents();
|
||||
|
||||
// returns the number of pending notifications.
|
||||
void fireEventsInternal();
|
||||
|
||||
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
ModesetInfo modesetInfo);
|
||||
|
||||
virtual bool isLinkTrainingNeededForModeset(ModesetInfo modesetInfo);
|
||||
|
||||
virtual bool notifyAttachBegin(Group * target, // Group of panels we're attaching to this head
|
||||
const DpModesetParams &modesetParams);
|
||||
|
||||
bool needToEnableFEC(const DpPreModesetParams ¶ms);
|
||||
|
||||
virtual void dpPreModeset(const DpPreModesetParams &modesetParams);
|
||||
virtual void dpPostModeset(void);
|
||||
|
||||
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz, // Same setting for multi channel audio. DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz, // Requested pixel clock for the mode
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth) ;
|
||||
|
||||
virtual bool notifyAttachBegin(Group * target, // Group of panels we're attaching to this head
|
||||
unsigned headIndex,
|
||||
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz, // Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz, // Requested pixel clock for the mode
|
||||
unsigned rasterWidth,
|
||||
unsigned rasterHeight,
|
||||
unsigned rasterBlankStartX,
|
||||
unsigned rasterBlankEndX,
|
||||
unsigned depth) ;
|
||||
|
||||
virtual void readRemoteHdcpCaps();
|
||||
virtual void notifyAttachEnd(bool modesetCancelled);
|
||||
virtual void notifyDetachBegin(Group * target);
|
||||
virtual void notifyDetachEnd(bool bKeepOdAlive = false);
|
||||
virtual bool willLinkSupportModeSST(const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
const DscParams *pDscParams = NULL);
|
||||
|
||||
bool performIeeeOuiHandshake();
|
||||
void setIgnoreSourceOuiHandshake(bool bIgnore);
|
||||
bool getIgnoreSourceOuiHandshake();
|
||||
void forceLinkTraining();
|
||||
|
||||
bool updateDpTunnelBwAllocation();
|
||||
TriState requestDpTunnelBw(NvU8 requestedBw);
|
||||
bool allocateDpTunnelBw(NvU64 bandwidth);
|
||||
bool allocateMaxDpTunnelBw();
|
||||
NvU64 getMaxTunnelBw();
|
||||
void enableDpTunnelingBwAllocationSupport();
|
||||
|
||||
void assessLink(LinkTrainingType trainType = NORMAL_LINK_TRAINING);
|
||||
|
||||
bool isLinkInD3();
|
||||
bool isLinkActive();
|
||||
bool isLinkLost();
|
||||
bool trainSingleHeadMultipleSSTLinkNotAlive(GroupImpl *pGroupAttached);
|
||||
bool isLinkAwaitingTransition();
|
||||
bool isNoActiveStreamAndPowerdown();
|
||||
void incPendingRemoteHdcpDetection()
|
||||
{
|
||||
pendingRemoteHdcpDetections++;
|
||||
}
|
||||
void decPendingRemoteHdcpDetection()
|
||||
{
|
||||
if (pendingRemoteHdcpDetections > 0)
|
||||
{
|
||||
pendingRemoteHdcpDetections--;
|
||||
}
|
||||
}
|
||||
bool trainLinkOptimized(LinkConfiguration lConfig);
|
||||
bool trainLinkOptimizedSingleHeadMultipleSST(GroupImpl * group);
|
||||
virtual bool getValidLowestLinkConfig(LinkConfiguration &lConfig, LinkConfiguration &lowestSelected,
|
||||
ModesetInfo queryModesetInfo, const DscParams *pDscParams = NULL);
|
||||
bool postLTAdjustment(const LinkConfiguration &, bool force);
|
||||
void populateUpdatedLaneSettings(NvU8* voltageSwingLane, NvU8* preemphasisLane, NvU32 *data);
|
||||
void populateDscCaps(DSC_INFO* dscInfo, DeviceImpl * dev, DSC_INFO::FORCED_DSC_PARAMS* forcedParams);
|
||||
void populateDscGpuCaps(DSC_INFO* dscInfo);
|
||||
void populateForcedDscParams(DSC_INFO* dscInfo, DSC_INFO::FORCED_DSC_PARAMS* forcedParams);
|
||||
void populateDscSinkCaps(DSC_INFO* dscInfo, DeviceImpl * dev);
|
||||
void populateDscBranchCaps(DSC_INFO* dscInfo, DeviceImpl * dev);
|
||||
void populateDscModesetInfo(MODESET_INFO * pModesetInfo, const DpModesetParams * pModesetParams);
|
||||
|
||||
virtual bool train(const LinkConfiguration &lConfig, bool force, LinkTrainingType trainType = NORMAL_LINK_TRAINING);
|
||||
virtual bool validateLinkConfiguration(const LinkConfiguration &lConfig);
|
||||
|
||||
virtual bool assessPCONLinkCapability(PCONLinkControl *params);
|
||||
bool trainPCONFrlLink(PCONLinkControl *pConControl);
|
||||
|
||||
// Set Device DSC state based on current DSC state of all active devices on this connector
|
||||
bool setDeviceDscState(Device * dev, bool bEnableDsc);
|
||||
|
||||
// the lowest level function(nearest to the hal) for the connector.
|
||||
bool rawTrain(const LinkConfiguration &lConfig, bool force, LinkTrainingType linkTrainingType);
|
||||
|
||||
virtual bool enableFlush();
|
||||
virtual bool beforeAddStream(GroupImpl * group, bool force=false, bool forFlushMode = false);
|
||||
virtual void afterAddStream(GroupImpl * group);
|
||||
virtual void beforeDeleteStream(GroupImpl * group, bool forFlushMode = false);
|
||||
virtual void afterDeleteStream(GroupImpl * group);
|
||||
virtual void disableFlush(bool test=false);
|
||||
|
||||
bool beforeAddStreamMST(GroupImpl * group, bool force = false, bool forFlushMode = false);
|
||||
|
||||
virtual bool checkIsModePossibleMST(GroupImpl * group);
|
||||
|
||||
bool deleteAllVirtualChannels();
|
||||
void clearTimeslices();
|
||||
virtual void applyTimeslotWAR(unsigned &slot_count){};
|
||||
virtual bool allocateTimeslice(GroupImpl * targetGroup);
|
||||
void freeTimeslice(GroupImpl * targetGroup);
|
||||
void flushTimeslotsToHardware();
|
||||
void hdcpRenegotiate(NvU64 cN, NvU64 cKsv);
|
||||
bool getHDCPAbortCodesDP12(NvU32 &hdcpAbortCodesDP12);
|
||||
bool getOuiSink(unsigned &ouiId, unsigned char * modelName, size_t modelNameBufferSize, NvU8 &chipRevision);
|
||||
bool hdcpValidateKsv(const NvU8 *ksv, NvU32 Size);
|
||||
void cancelHdcpCallbacks();
|
||||
bool handleCPIRQ();
|
||||
void handleSSC();
|
||||
void handleMCCSIRQ();
|
||||
void handleDpTunnelingIrq();
|
||||
void handleHdmiLinkStatusChanged();
|
||||
void sortActiveGroups(bool ascending);
|
||||
void handlePanelReplayError();
|
||||
|
||||
virtual void configInit();
|
||||
virtual DeviceImpl* findDeviceInList(const Address &address);
|
||||
virtual void disconnectDeviceList();
|
||||
void notifyLongPulseInternal(bool statusConnected);
|
||||
virtual void notifyLongPulse(bool status);
|
||||
virtual void notifyShortPulse();
|
||||
virtual Group * newGroup();
|
||||
virtual void destroy();
|
||||
virtual void createFakeMuxDevice(const NvU8 *buffer, NvU32 bufferSize);
|
||||
virtual void deleteFakeMuxDevice();
|
||||
virtual bool getRawDscCaps(NvU8 *buffer, NvU32 bufferSize);
|
||||
virtual bool isMultiStreamCapable();
|
||||
virtual bool isFlushSupported();
|
||||
virtual bool isStreamCloningEnabled();
|
||||
virtual bool isFECSupported();
|
||||
virtual bool isFECCapable();
|
||||
virtual NvU32 maxLinkRateSupported();
|
||||
bool setPreferredLinkConfig(LinkConfiguration &lc, bool commit,
|
||||
bool force = false,
|
||||
LinkTrainingType trainType = NORMAL_LINK_TRAINING,
|
||||
bool forcePreferredLinkConfig = false);
|
||||
virtual bool resetPreferredLinkConfig(bool force = false);
|
||||
virtual void setAllowMultiStreaming(bool bAllowMST);
|
||||
virtual bool getAllowMultiStreaming(void);
|
||||
virtual bool getSinkMultiStreamCap(void);
|
||||
virtual void setDp11ProtocolForced();
|
||||
virtual void resetDp11ProtocolForced();
|
||||
virtual bool isDp11ProtocolForced();
|
||||
|
||||
bool isAcpiInitDone();
|
||||
virtual void notifyAcpiInitDone();
|
||||
Group * createFirmwareGroup();
|
||||
virtual void notifyGPUCapabilityChange();
|
||||
virtual void notifyHBR2WAREngage();
|
||||
bool dpUpdateDscStream(Group *target, NvU32 dscBpp);
|
||||
|
||||
bool getTestPattern(NV0073_CTRL_DP_TESTPATTERN *testPattern);
|
||||
bool setTestPattern(NV0073_CTRL_DP_TESTPATTERN testPattern, NvU8 laneMask, NV0073_CTRL_DP_CSTM cstm, NvBool bIsHBR2, NvBool bSkipLaneDataOverride = false);
|
||||
bool getLaneConfig(NvU32 *numLanes, NvU32 *data); // "data" is an array of NV0073_CTRL_MAX_LANES unsigned ints
|
||||
bool setLaneConfig(NvU32 numLanes, NvU32 *data); // "data" is an array of NV0073_CTRL_MAX_LANES unsigned ints
|
||||
|
||||
virtual void setDisableDownspread(bool _bDisableDownspread)
|
||||
{
|
||||
return;
|
||||
}
|
||||
virtual bool getDownspreadDisabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void getCurrentLinkConfig(unsigned &laneCount, NvU64 &linkRate); // CurrentLink Configuration
|
||||
void getCurrentLinkConfigWithFEC(unsigned &laneCount, NvU64 &linkRate, bool &bFECEnabled);
|
||||
unsigned getPanelDataClockMultiplier();
|
||||
unsigned getGpuDataClockMultiplier();
|
||||
void configurePowerState(bool bPowerUp);
|
||||
virtual void readPsrCapabilities(vesaPsrSinkCaps *caps);
|
||||
virtual bool updatePsrConfiguration(vesaPsrConfig config);
|
||||
virtual bool readPsrConfiguration(vesaPsrConfig *config);
|
||||
virtual bool readPsrDebugInfo(vesaPsrDebugStatus *psrDbgState);
|
||||
virtual bool writePsrErrorStatus(vesaPsrErrorStatus psrErr);
|
||||
virtual bool readPsrErrorStatus(vesaPsrErrorStatus *psrErr);
|
||||
virtual bool writePsrEvtIndicator(vesaPsrEventIndicator psrErr);
|
||||
virtual bool readPsrEvtIndicator(vesaPsrEventIndicator *psrErr);
|
||||
virtual bool readPsrState(vesaPsrState *psrState);
|
||||
virtual bool updatePsrLinkState(bool bTurnOnLink);
|
||||
|
||||
virtual bool readPrSinkDebugInfo(panelReplaySinkDebugInfo *prDbgInfo);
|
||||
|
||||
// for dp test utility. pBuffer is the request buffer of type DP_STATUS_REQUEST_xxxx
|
||||
DP_TESTMESSAGE_STATUS sendDPTestMessage(void *pBuffer,
|
||||
NvU32 requestSize,
|
||||
NvU32 *pDpStatus);
|
||||
|
||||
DP_TESTMESSAGE_STATUS getStreamIDs(NvU32 *pStreamIDs, NvU32 *pCount); // for dp test utility, called by DD
|
||||
|
||||
// Reset link training counter for the active link configuration.
|
||||
virtual void resetLinkTrainingCounter()
|
||||
{
|
||||
activeLinkConfig.setLTCounter(0);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// New devices do not get a DeviceImpl created until after
|
||||
// the EDID read has completed. This object is used
|
||||
// to track the necessary state.
|
||||
//
|
||||
struct DevicePendingEDIDRead : protected EdidReadMultistream::EdidReadMultistreamEventSink, public ListElement
|
||||
{
|
||||
ConnectorImpl * parent;
|
||||
DiscoveryManager::Device device;
|
||||
EdidReadMultistream reader;
|
||||
|
||||
void mstEdidCompleted(EdidReadMultistream * from);
|
||||
void mstEdidReadFailed(EdidReadMultistream * from);
|
||||
|
||||
public:
|
||||
DevicePendingEDIDRead(ConnectorImpl * _parent, MessageManager * manager, DiscoveryManager::Device dev)
|
||||
: parent(_parent), device(dev), reader(_parent->timer, manager, this, dev.address)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_CONNECTORIMPL_H
|
||||
41
src/common/displayport/inc/dp_crc.h
Normal file
41
src/common/displayport/inc/dp_crc.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_crc.h *
|
||||
* CRC Algorithms for the messaging subsystem. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_CRC_H
|
||||
#define INCLUDED_DP_CRC_H
|
||||
|
||||
#include "dp_bitstream.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
unsigned dpCalculateHeaderCRC(BitStreamReader * reader);
|
||||
unsigned dpCalculateBodyCRC(BitStreamReader * writer);
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_CRC_H
|
||||
556
src/common/displayport/inc/dp_deviceimpl.h
Normal file
556
src/common/displayport/inc/dp_deviceimpl.h
Normal file
@@ -0,0 +1,556 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort*********************************\
|
||||
* *
|
||||
* Module: dp_connector.cpp *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_DEVICEIMPL_H
|
||||
#define INCLUDED_DP_DEVICEIMPL_H
|
||||
|
||||
#include "dp_connector.h"
|
||||
#include "dp_internal.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_qse.h"
|
||||
#include "dp_vrr.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
#define PREDEFINED_DSC_MST_BPPX16 160;
|
||||
#define MAX_DSC_COMPRESSION_BPPX16 128;
|
||||
#define HDCP_BCAPS_DDC_OFFSET 0x40
|
||||
#define HDCP_BCAPS_DDC_EN_BIT 0x80
|
||||
#define HDCP_BCAPS_DP_EN_BIT 0x01
|
||||
#define HDCP_I2C_CLIENT_ADDR 0x74
|
||||
#define DEVICE_OUI_SIZE 3
|
||||
#define DSC_CAPS_SIZE 16
|
||||
|
||||
struct GroupImpl;
|
||||
struct ConnectorImpl;
|
||||
class DeviceHDCPDetection;
|
||||
class VrrEnablement;
|
||||
|
||||
struct DeviceImpl : public Device,
|
||||
public AuxBus,
|
||||
public ListElement
|
||||
{
|
||||
//
|
||||
// Shadow state: This is the last state delivered to DD.
|
||||
// see the ConnectorImpl::fireEvents() function for handling.
|
||||
//
|
||||
// State is double buffered to allow for allow announces
|
||||
// to happen at the end of the state updates. We assume
|
||||
// the DD can call any Connector API in response to the
|
||||
// event.
|
||||
//
|
||||
struct Shadow
|
||||
{
|
||||
bool plugged;
|
||||
bool zombie;
|
||||
bool cableOk;
|
||||
bool mustDisconnect;
|
||||
bool hdcpCapDone;
|
||||
LinkConfiguration highestAssessedLC;
|
||||
} shadow;
|
||||
|
||||
struct BandWidth
|
||||
{
|
||||
struct _Enum_Path
|
||||
{
|
||||
unsigned availableStreams, total, free, dfpLinkAvailable;
|
||||
bool bPathFECCapable;
|
||||
bool dataValid; // Is the cache valid?
|
||||
bool availablePbnUpdated;
|
||||
} enum_path;
|
||||
|
||||
struct Compound_Query_State
|
||||
{
|
||||
unsigned totalTimeSlots; // Total timeslots available for allocation across this node
|
||||
|
||||
unsigned timeslots_used_by_query; // Timeslots accounted for.
|
||||
|
||||
unsigned bandwidthAllocatedForIndex; // Compound query is compromised of several
|
||||
// qeuery attaches. These query attaches
|
||||
// may have more than one device associated.
|
||||
// this mask keeps track of which queryAttach's
|
||||
// have already had the stream "rounted" past
|
||||
// this node.
|
||||
} compound_query_state;
|
||||
|
||||
LinkConfiguration lastHopLinkConfig; // inferred from enum_path.total
|
||||
|
||||
} bandwidth;
|
||||
|
||||
enum rawEprState
|
||||
{
|
||||
software,
|
||||
hardware
|
||||
};
|
||||
|
||||
void resetCacheInferredLink();
|
||||
LinkConfiguration * inferLeafLink(unsigned * totalLinkSlots);
|
||||
void inferPathConstraints();
|
||||
|
||||
|
||||
DeviceImpl * parent; // Upstream parent device
|
||||
DeviceImpl * children[16];
|
||||
PortMap portMap;
|
||||
|
||||
Edid rawEDID;
|
||||
Edid processedEdid;
|
||||
Edid ddcEdid;
|
||||
DPCDHAL * hal;
|
||||
GroupImpl * activeGroup;
|
||||
ConnectorImpl * connector;
|
||||
ConnectorType connectorType;
|
||||
Address address;
|
||||
GUID guid;
|
||||
GUID guid2;
|
||||
bool bVirtualPeerDevice;
|
||||
NvU8 peerDevice;
|
||||
NvU8 dpcdRevisionMajor;
|
||||
NvU8 dpcdRevisionMinor;
|
||||
bool multistream;
|
||||
bool videoSink, audioSink;
|
||||
bool plugged;
|
||||
bool bApplyPclkWarBug4949066;
|
||||
|
||||
AuxRetry friendlyAux;
|
||||
bool payloadAllocated; // did the allocate payload go through?
|
||||
|
||||
unsigned char BCAPS[HDCP_BCAPS_SIZE]; // Hdcp1.x bCaps raw data
|
||||
unsigned char BKSV[HDCP_KSV_SIZE]; // Hdcp1.x bKsv raw data
|
||||
unsigned char nvBCaps[HDCP_BCAPS_SIZE]; // NV generic HDCP BCAPS including 1.x, 2.2, ...
|
||||
NvU64 maxTmdsClkRate;
|
||||
|
||||
|
||||
bool isPendingNewDevice();
|
||||
bool isPendingLostDevice();
|
||||
bool isPendingZombie();
|
||||
bool isPendingCableOk();
|
||||
bool isPendingBandwidthChange();
|
||||
bool isPendingHDCPCapDone();
|
||||
|
||||
TriState isHDCPCap;
|
||||
bool isDeviceHDCPDetectionAlive;
|
||||
DeviceHDCPDetection * deviceHDCPDetection;
|
||||
|
||||
PCONCaps pconCaps;
|
||||
|
||||
// this flag signifies that the compliance device has requested EDID read test and may follow
|
||||
// hidden and lazy zombie policy.
|
||||
bool complianceDeviceEdidReadTest;
|
||||
|
||||
bool lazyExitNow;
|
||||
|
||||
// VRR Enablement structure
|
||||
VrrEnablement *vrrEnablement;
|
||||
|
||||
// DSC fields
|
||||
NvU8 rawDscCaps[16];
|
||||
DscCaps dscCaps;
|
||||
|
||||
// Panel replay Caps
|
||||
PanelReplayCaps prCaps;
|
||||
bool bIsFakedMuxDevice;
|
||||
bool bIsPreviouslyFakedMuxDevice;
|
||||
bool bisMarkedForDeletion;
|
||||
bool bIgnoreMsaCap;
|
||||
bool bIgnoreMsaCapCached;
|
||||
|
||||
//
|
||||
// Device doing the DSC decompression for this device. This could be device itself
|
||||
// or its parent
|
||||
//
|
||||
DeviceImpl* devDoingDscDecompression;
|
||||
//
|
||||
// If DSC stream can be sent to this device or not. Either device itself or it's
|
||||
// parent can do DSC decompression
|
||||
//
|
||||
bool bDSCPossible;
|
||||
|
||||
bool bFECSupported;
|
||||
bool bFECUncorrectedSupported;
|
||||
bool bFECCorrectedSupported;
|
||||
bool bFECBitSupported;
|
||||
bool bFECParityBlockSupported;
|
||||
bool bFECParitySupported;
|
||||
|
||||
TriState bSdpExtCapable;
|
||||
TriState bAsyncSDPCapable;
|
||||
bool bMSAOverMSTCapable;
|
||||
bool bDscPassThroughColorFormatWar;
|
||||
|
||||
NvU64 maxModeBwRequired;
|
||||
|
||||
DeviceImpl(DPCDHAL * hal, ConnectorImpl * connector, DeviceImpl * parent);
|
||||
~DeviceImpl();
|
||||
|
||||
virtual bool isCableOk();
|
||||
virtual bool isLogical();
|
||||
virtual bool isZombie();
|
||||
|
||||
virtual unsigned getEDIDSize() const;
|
||||
virtual bool getEDID(char * buffer, unsigned size) const;
|
||||
virtual unsigned getRawEDIDSize() const;
|
||||
virtual bool getRawEDID(char * buffer, unsigned size) const;
|
||||
|
||||
virtual bool getPCONCaps(PCONCaps *pPCONCaps);
|
||||
|
||||
virtual Group * getOwningGroup()
|
||||
{
|
||||
return (Group *)activeGroup;
|
||||
}
|
||||
|
||||
bool isActive();
|
||||
|
||||
void applyOUIOverrides();
|
||||
|
||||
virtual Device * getParent()
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
|
||||
virtual Device * getChild(unsigned portNumber)
|
||||
{
|
||||
return children[portNumber];
|
||||
}
|
||||
|
||||
virtual bool isMultistream() // Sink supports multistream, remember we can have 1.1 targets
|
||||
{
|
||||
return address.size() != 0;
|
||||
}
|
||||
|
||||
virtual bool isNativeDPCD()
|
||||
{
|
||||
return (address.size() < 2);
|
||||
}
|
||||
|
||||
virtual bool isVideoSink()
|
||||
{
|
||||
return videoSink;
|
||||
}
|
||||
|
||||
virtual bool isAudioSink()
|
||||
{
|
||||
return audioSink;
|
||||
}
|
||||
|
||||
virtual bool isLoop()
|
||||
{
|
||||
// implementation is pending (bug 791059)
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isRedundant()
|
||||
{
|
||||
// implementation is pending (bug 791059)
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isMustDisconnect();
|
||||
|
||||
virtual bool isPlugged()
|
||||
{
|
||||
return plugged;
|
||||
}
|
||||
|
||||
virtual Address getTopologyAddress() const
|
||||
{
|
||||
return address;
|
||||
}
|
||||
|
||||
virtual ConnectorType getConnectorType()
|
||||
{
|
||||
return connectorType;
|
||||
}
|
||||
|
||||
virtual bool isFallbackEdid()
|
||||
{
|
||||
return this->processedEdid.isFallbackEdid();
|
||||
}
|
||||
|
||||
virtual GUID getGUID() const
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
virtual PortMap getPortMap() const
|
||||
{
|
||||
return portMap;
|
||||
}
|
||||
|
||||
virtual TriState hdcpAvailableHop();
|
||||
virtual TriState hdcpAvailable();
|
||||
|
||||
virtual bool isMSAOverMSTCapable()
|
||||
{
|
||||
return bMSAOverMSTCapable;
|
||||
}
|
||||
|
||||
virtual bool isFakedMuxDevice();
|
||||
virtual bool isPreviouslyFakedMuxDevice();
|
||||
|
||||
bool bypassDpcdPowerOff()
|
||||
{
|
||||
return processedEdid.WARFlags.disableDpcdPowerOff;
|
||||
}
|
||||
|
||||
bool powerOnMonitorBeforeLt()
|
||||
{
|
||||
return processedEdid.WARFlags.powerOnBeforeLt;
|
||||
}
|
||||
|
||||
bool forceMaxLinkConfig()
|
||||
{
|
||||
return processedEdid.WARFlags.forceMaxLinkConfig;
|
||||
}
|
||||
|
||||
bool skipRedundantLt()
|
||||
{
|
||||
return processedEdid.WARFlags.skipRedundantLt;
|
||||
}
|
||||
|
||||
bool ignoreRedundantHotplug()
|
||||
{
|
||||
return processedEdid.WARFlags.ignoreRedundantHotplug;
|
||||
}
|
||||
|
||||
bool isOptimalLinkConfigOverridden()
|
||||
{
|
||||
return processedEdid.WARFlags.overrideOptimalLinkCfg;
|
||||
}
|
||||
|
||||
// Apply DPCD overrides if required
|
||||
void dpcdOverrides();
|
||||
|
||||
bool getDpcdRevision(unsigned * major, unsigned * minor)
|
||||
{
|
||||
if (!major || !minor)
|
||||
{
|
||||
DP_ASSERT(0 && "Null pointers passed in.");
|
||||
return false;
|
||||
}
|
||||
|
||||
*major = this->dpcdRevisionMajor;
|
||||
*minor = this->dpcdRevisionMinor;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool getIgnoreMSACap();
|
||||
|
||||
AuxRetry::status setIgnoreMSAEnable(bool msaTimingParamIgnoreEn);
|
||||
|
||||
bool isVirtualPeerDevice()
|
||||
{
|
||||
return bVirtualPeerDevice;
|
||||
}
|
||||
|
||||
bool isBranchDevice()
|
||||
{
|
||||
return !isVideoSink() && !isAudioSink();
|
||||
}
|
||||
|
||||
bool isAtLeastVersion(unsigned major, unsigned minor)
|
||||
{
|
||||
if (dpcdRevisionMajor > major)
|
||||
return true;
|
||||
|
||||
if (dpcdRevisionMajor < major)
|
||||
return false;
|
||||
|
||||
return dpcdRevisionMinor >= minor;
|
||||
}
|
||||
|
||||
NvU64 getMaxModeBwRequired()
|
||||
{
|
||||
return maxModeBwRequired;
|
||||
}
|
||||
|
||||
virtual void queryGUID2();
|
||||
|
||||
virtual bool getSDPExtnForColorimetrySupported();
|
||||
virtual bool getAsyncSDPSupported();
|
||||
|
||||
virtual bool getPanelFwRevision(NvU16 *revision);
|
||||
|
||||
virtual bool isPowerSuspended();
|
||||
|
||||
virtual void setPanelPowerParams(bool bSinkPowerStateD0, bool bPanelPowerStateOn);
|
||||
|
||||
virtual status transaction(Action action, Type type, int address,
|
||||
NvU8 * buffer, unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned *pNakReason= NULL,
|
||||
NvU8 offset= 0, NvU8 nWriteTransactions= 0);
|
||||
virtual unsigned transactionSize();
|
||||
// default behaviour is querying first three registers for every lane --> flags = 0x7
|
||||
virtual status fecTransaction(NvU8 *fecStatus, NvU16 **fecErrorCount, NvU32 flags = NV_DP_FEC_FLAGS_SELECT_ALL);
|
||||
virtual AuxBus * getRawAuxChannel() { return this; }
|
||||
virtual AuxRetry * getAuxChannel() { return &friendlyAux; }
|
||||
virtual AuxBus::status getDpcdData(unsigned offset, NvU8 * buffer,
|
||||
unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned * pNakReason=NULL);
|
||||
virtual AuxBus::status setDpcdData(unsigned offset, NvU8 * buffer,
|
||||
unsigned sizeRequested,
|
||||
unsigned * sizeCompleted,
|
||||
unsigned * pNakReason=NULL);
|
||||
virtual AuxBus::status queryFecData(NvU8 *fecStatus, NvU16 **fecErrorCount, NvU32 flags);
|
||||
|
||||
virtual DscCaps getDscCaps();
|
||||
|
||||
//
|
||||
// This function returns the device itself or its parent device that is doing
|
||||
// DSC decompression for it.
|
||||
//
|
||||
virtual Device* getDevDoingDscDecompression();
|
||||
virtual void markDeviceForDeletion() {bisMarkedForDeletion = true;};
|
||||
virtual bool isMarkedForDeletion() {return bisMarkedForDeletion;};
|
||||
virtual bool getRawDscCaps(NvU8 *buffer, NvU32 bufferSize);
|
||||
virtual bool setRawDscCaps(const NvU8 *buffer, NvU32 bufferSize);
|
||||
virtual bool setValidatedRawDscCaps(NvU8 *buffer, NvU32 bufferSize);
|
||||
virtual bool validatePPSData(DSCPPSDATA *pPps);
|
||||
|
||||
virtual AuxBus::status dscCrcControl(NvBool bEnable, gpuDscCrc *dataGpu, sinkDscCrc *dataSink);
|
||||
|
||||
//
|
||||
// Parameter bForceMot in both getI2cData and setI2cData is used to forfully set
|
||||
// the MOT bit. It is needed for some special cases where the MOT bit shouldn't
|
||||
// be set but some customers need it to please their monitors.
|
||||
//
|
||||
virtual bool getI2cData(unsigned offset, NvU8 * buffer, unsigned sizeRequested, unsigned * sizeCompleted, bool bForceMot = false);
|
||||
virtual bool setI2cData(unsigned offset, NvU8 * buffer, unsigned sizeRequested, unsigned * sizeCompleted, bool bForceMot = false);
|
||||
virtual bool getRawEpr(unsigned * totalEpr, unsigned * freeEpr, rawEprState eprState);
|
||||
|
||||
void switchToComplianceFallback();
|
||||
|
||||
// VRR Display Enablement Functions
|
||||
bool startVrrEnablement(void);
|
||||
void resetVrrEnablement(void);
|
||||
bool isVrrMonitorEnabled(void);
|
||||
bool isVrrDriverEnabled(void);
|
||||
|
||||
// Panel replay related functions
|
||||
bool isPanelReplaySupported(void);
|
||||
void getPanelReplayCaps(void);
|
||||
bool setPanelReplayConfig(panelReplayConfig prcfg);
|
||||
bool getPanelReplayConfig(panelReplayConfig *pPrcfg);
|
||||
bool getPanelReplayStatus(PanelReplayStatus *pPrStatus);
|
||||
|
||||
NvBool getDSCSupport();
|
||||
bool getFECSupport();
|
||||
NvBool isDSCPassThroughSupported();
|
||||
NvBool isDynamicPPSSupported();
|
||||
NvBool isDynamicDscToggleSupported();
|
||||
NvBool isDSCSupported();
|
||||
NvBool isDSCDecompressionSupported();
|
||||
NvBool isDSCPossible();
|
||||
bool isFECSupported();
|
||||
bool readAndParseDSCCaps();
|
||||
bool readAndParseBranchSpecificDSCCaps();
|
||||
bool parseDscCaps(const NvU8 *buffer, NvU32 bufferSize);
|
||||
bool parseBranchSpecificDscCaps(const NvU8 *buffer, NvU32 bufferSize);
|
||||
bool setDscEnable(bool enable);
|
||||
bool setDscEnableDPToHDMIPCON(bool bDscEnable, bool bEnablePassThroughForPCON);
|
||||
bool getDscEnable(bool *pEnable);
|
||||
unsigned getDscVersionMajor();
|
||||
unsigned getDscVersionMinor();
|
||||
unsigned getDscRcBufferSize();
|
||||
unsigned getDscRcBufferBlockSize();
|
||||
unsigned getDscMaxSlicesPerSink();
|
||||
unsigned getDscLineBufferBitDepth();
|
||||
NvBool isDscBlockPredictionSupported();
|
||||
unsigned getDscMaxBitsPerPixel();
|
||||
NvBool isDscRgbSupported();
|
||||
NvBool isDscYCbCr444Supported();
|
||||
NvBool isDscYCbCrSimple422Supported();
|
||||
NvBool isDscYCbCr422NativeSupported();
|
||||
NvBool isDscYCbCr420NativeSupported();
|
||||
unsigned getDscPeakThroughputMode0();
|
||||
unsigned getDscPeakThroughputModel();
|
||||
unsigned getDscMaxSliceWidth();
|
||||
unsigned getDscDecoderColorDepthSupportMask();
|
||||
void setDscDecompressionDevice(bool bDscCapBasedOnParent);
|
||||
virtual bool getDeviceSpecificData(NvU8 *oui, NvU8 *deviceIdString,
|
||||
NvU8 *hwRevision, NvU8 *swMajorRevision,
|
||||
NvU8 *swMinorRevision);
|
||||
virtual bool getParentSpecificData(NvU8 *oui, NvU8 *deviceIdString,
|
||||
NvU8 *hwRevision, NvU8 *swMajorRevision,
|
||||
NvU8 *swMinorRevision);
|
||||
|
||||
virtual bool setModeList(DisplayPort::DpModesetParams *pModeList, unsigned numModes);
|
||||
};
|
||||
class DeviceHDCPDetection : public Object, MessageManager::Message::MessageEventSink, Timer::TimerCallback
|
||||
{
|
||||
DeviceImpl* parent;
|
||||
RemoteDpcdReadMessage remoteBKSVReadMessage;
|
||||
RemoteDpcdReadMessage remoteBCapsReadMessage;
|
||||
RemoteDpcdReadMessage remote22BCapsReadMessage;
|
||||
MessageManager * messageManager; // For transmit and receive
|
||||
Timer * timer;
|
||||
bool bksvReadCompleted;
|
||||
bool bCapsReadCompleted;
|
||||
bool isValidBKSV;
|
||||
bool isBCapsHDCP;
|
||||
unsigned retriesRemoteBKSVReadMessage;
|
||||
unsigned retriesRemoteBCapsReadMessage;
|
||||
unsigned retriesRemote22BCapsReadMessage;
|
||||
bool retryRemoteBKSVReadMessage;
|
||||
bool retryRemoteBCapsReadMessage;
|
||||
bool retryRemote22BCapsReadMessage;
|
||||
bool bBKSVReadMessagePending;
|
||||
bool bBCapsReadMessagePending;
|
||||
|
||||
public:
|
||||
|
||||
DeviceHDCPDetection(DeviceImpl * parent, MessageManager * messageManager, Timer * timer)
|
||||
: bksvReadCompleted(false),bCapsReadCompleted(false),isValidBKSV(false),
|
||||
isBCapsHDCP(false), retriesRemoteBKSVReadMessage(0), retriesRemoteBCapsReadMessage(0),
|
||||
retriesRemote22BCapsReadMessage(0), retryRemoteBKSVReadMessage(false),
|
||||
retryRemoteBCapsReadMessage(false), retryRemote22BCapsReadMessage(false),
|
||||
bBKSVReadMessagePending(false), bBCapsReadMessagePending(false)
|
||||
|
||||
{
|
||||
this->parent = parent;
|
||||
this->messageManager = messageManager;
|
||||
this->timer = timer;
|
||||
}
|
||||
|
||||
~DeviceHDCPDetection();
|
||||
void expired(const void * tag);
|
||||
void start();
|
||||
void waivePendingHDCPCapDoneNotification();
|
||||
|
||||
bool hdcpValidateKsv(const NvU8 *ksv, NvU32 Size);
|
||||
void handleRemoteDpcdReadDownReply(MessageManager::Message * from);
|
||||
void messageFailed(MessageManager::Message * from, NakData * nakData);
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_DEVICEIMPL_H
|
||||
|
||||
329
src/common/displayport/inc/dp_discovery.h
Normal file
329
src/common/displayport/inc/dp_discovery.h
Normal file
@@ -0,0 +1,329 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_discovery.h *
|
||||
* Class definition for discovery manager. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_DISCOVERY_H
|
||||
#define INCLUDED_DP_DISCOVERY_H
|
||||
|
||||
#include "dp_address.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_messagecodings.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class DiscoveryManager : virtual public Object
|
||||
{
|
||||
public:
|
||||
struct Device
|
||||
{
|
||||
Address address; // direct topology address
|
||||
|
||||
bool legacy; // legacy (NON DP) device emulated on this port
|
||||
bool branch; // DP 1.2 style branching device
|
||||
PeerDevice peerDevice; // connector type of the device on this port
|
||||
unsigned dpcdRevisionMajor;
|
||||
unsigned dpcdRevisionMinor;
|
||||
GUID peerGuid; // device guid
|
||||
unsigned SDPStreams; // maximum number of audio streams supported
|
||||
unsigned SDPStreamSinks; // number of outputs to select from
|
||||
bool dirty; // got updates for the same device
|
||||
PortMap portMap;
|
||||
bool videoSink; // Should be true when a video sink is supported
|
||||
NvU64 maxTmdsClkRate;
|
||||
|
||||
Device():peerDevice(None),SDPStreams(0),SDPStreamSinks(0),dirty(false),videoSink(false),maxTmdsClkRate(0)
|
||||
{
|
||||
portMap.validMap = portMap.inputMap = portMap.internalMap = 0;
|
||||
}
|
||||
|
||||
~Device(){}
|
||||
|
||||
};
|
||||
|
||||
struct ReceiverSink :
|
||||
virtual public Object,
|
||||
public MessageManager::MessageReceiver::MessageReceiverEventSink
|
||||
{
|
||||
DiscoveryManager * parent;
|
||||
|
||||
// will handle CSN (up_req) and generate a up_reply for it.
|
||||
virtual void messageProcessed(MessageManager::MessageReceiver * from);
|
||||
void handleCSN(MessageManager::MessageReceiver * from);
|
||||
|
||||
ReceiverSink(DiscoveryManager * parent)
|
||||
:parent(parent)
|
||||
{}
|
||||
|
||||
virtual ~ReceiverSink()
|
||||
{}
|
||||
};
|
||||
|
||||
// This will account for upreplies and their failures/retries.
|
||||
struct CsnUpReplyContainer : ListElement, Timer::TimerCallback, MessageManager::Message::MessageEventSink
|
||||
{
|
||||
struct CsnUpReply: public GenericUpReplyMessage
|
||||
{
|
||||
CsnUpReplyContainer * container;
|
||||
|
||||
CsnUpReply(CsnUpReplyContainer * container, const Address & target)
|
||||
: GenericUpReplyMessage(target, 0x2), container(container)
|
||||
{}
|
||||
|
||||
~CsnUpReply()
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
DiscoveryManager * parent;
|
||||
CsnUpReply upReplyMessage;
|
||||
unsigned delayInUsec;
|
||||
unsigned retries;
|
||||
Address target;
|
||||
|
||||
virtual void messageFailed(MessageManager::Message * from, NakData * nakData)
|
||||
{
|
||||
// if reason of failure is not timeout or defer; just forget trying again.
|
||||
if (!(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
messageCompleted(from);
|
||||
return;
|
||||
}
|
||||
|
||||
// queue a callback to reset and send again
|
||||
queueUpReply();
|
||||
return;
|
||||
}
|
||||
|
||||
virtual void messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
// don't delete now. Queue callback to delete later
|
||||
retries = 0;
|
||||
parent->timer->queueCallback(this, "CSNF", 5000);
|
||||
}
|
||||
|
||||
void queueUpReply()
|
||||
{
|
||||
parent->timer->queueCallback(this, "CSNF", delayInUsec/1000);
|
||||
}
|
||||
|
||||
void postUpReply()
|
||||
{
|
||||
upReplyMessage.set(target);
|
||||
parent->messageManager->postReply(&this->upReplyMessage, this);
|
||||
}
|
||||
|
||||
virtual void expired(const void * tag)
|
||||
{
|
||||
if (retries)
|
||||
retries--;
|
||||
|
||||
if (retries)
|
||||
postUpReply();
|
||||
else
|
||||
{
|
||||
// enough retries. wrap up.
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
CsnUpReplyContainer(DiscoveryManager * parent)
|
||||
:parent(parent), upReplyMessage(this, target), delayInUsec(200000), retries(4), target(Address(0))
|
||||
{}
|
||||
|
||||
virtual ~CsnUpReplyContainer()
|
||||
{
|
||||
// remove self from queue and delete
|
||||
// cancel all pending callbacks
|
||||
parent->timer->cancelCallbacks(this);
|
||||
parent->pendingCsnUpReplies.remove(this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
ReceiverSink receiverSink;
|
||||
|
||||
ConnStatusNotifyMessage connectionStatusNotifyProcessor;
|
||||
|
||||
GUIDBuilder guidBuilder;
|
||||
|
||||
List pendingCsnUpReplies;
|
||||
|
||||
public:
|
||||
|
||||
struct DiscoveryManagerEventSink
|
||||
{
|
||||
virtual void discoveryDetectComplete() = 0; // reply to processDetect
|
||||
virtual void discoveryNewDevice(const DiscoveryManager::Device & device) = 0; // these can go out anytime
|
||||
virtual void discoveryLostDevice(const Address & address) = 0;
|
||||
};
|
||||
|
||||
enum {
|
||||
maximumTopologyNodes = 128
|
||||
};
|
||||
|
||||
Device currentDevices[maximumTopologyNodes];
|
||||
unsigned currentDevicesCount;
|
||||
|
||||
Device * findDevice(const Address & address);
|
||||
Device * findDevice(GUID & guid);
|
||||
void addDevice(const Device & device);
|
||||
void removeDevice(Device * device);
|
||||
void removeDeviceTree(const Address & prefix);
|
||||
Device * findChildDeviceForBranchWithGuid(GUID guid, unsigned port, Address & childAddr);
|
||||
|
||||
//
|
||||
// This is responsible for a "complete" detection of a sink. Specifically using remote dpcd reads and writes
|
||||
//
|
||||
struct SinkDetection : MessageManager::Message::MessageEventSink, ListElement, Timer::TimerCallback
|
||||
{
|
||||
Device device;
|
||||
Address address;
|
||||
RemoteDpcdWriteMessage remoteDpcdWriteMessage;
|
||||
RemoteDpcdReadMessage remoteDpcdReadMessage;
|
||||
PowerUpPhyMessage powerUpPhyMessage;
|
||||
LinkAddressMessage linkAddressMessage;
|
||||
DiscoveryManager * parent;
|
||||
bool completed;
|
||||
unsigned retriesRemoteDpcdWriteMessage;
|
||||
bool retryRemoteDpcdWriteMessage;
|
||||
unsigned retriesRemoteDpcdReadMessage;
|
||||
bool retryRemoteDpcdReadMessage;
|
||||
unsigned retriesLinkAddressMessage;
|
||||
bool retryLinkAddressMessage;
|
||||
|
||||
bool bFromCSN;
|
||||
|
||||
SinkDetection(DiscoveryManager * parent, const Device & device, bool bFromCSN)
|
||||
: device(device), address(device.address), parent(parent), completed(false),
|
||||
retriesRemoteDpcdWriteMessage(0), retryRemoteDpcdWriteMessage(false),
|
||||
retriesRemoteDpcdReadMessage(0), retryRemoteDpcdReadMessage(false),
|
||||
retriesLinkAddressMessage(0), retryLinkAddressMessage(false),
|
||||
bFromCSN(bFromCSN)
|
||||
{}
|
||||
|
||||
~SinkDetection();
|
||||
void expired(const void * tag);
|
||||
void start();
|
||||
|
||||
void detectCompleted(bool passed);
|
||||
void messageFailed(MessageManager::Message * from, NakData * nakData);
|
||||
void handleRemoteDpcdReadDownReply();
|
||||
void handleRemoteDpcdWriteDownReply();
|
||||
void handleLinkAddressDownReply();
|
||||
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// This object represents an address in some stage of detection
|
||||
//
|
||||
struct BranchDetection : MessageManager::Message::MessageEventSink, ListElement, Timer::TimerCallback
|
||||
{
|
||||
Device parentDevice;
|
||||
Address address;
|
||||
LinkAddressMessage::Result child[16];
|
||||
unsigned childCount;
|
||||
|
||||
LinkAddressMessage linkAddressMessage;
|
||||
RemoteDpcdWriteMessage remoteDpcdWriteMessage;
|
||||
|
||||
DiscoveryManager * parent;
|
||||
bool completed;
|
||||
bool retryLinkAddressMessage;
|
||||
unsigned retriesLinkAddressMessage;
|
||||
unsigned retriesRemoteDpcdWriteMessage;
|
||||
bool retryRemoteDpcdWriteMessage;
|
||||
|
||||
BranchDetection(DiscoveryManager * parent, const Device & device)
|
||||
: parentDevice(device), address(parentDevice.address),
|
||||
parent(parent), completed(false),
|
||||
retryLinkAddressMessage(false), retriesLinkAddressMessage(0),
|
||||
retriesRemoteDpcdWriteMessage(0), retryRemoteDpcdWriteMessage(false)
|
||||
{}
|
||||
|
||||
void expired(const void * tag);
|
||||
void start();
|
||||
~BranchDetection();
|
||||
|
||||
void detectCompleted(bool present);
|
||||
void messageFailed(MessageManager::Message * from, NakData * nakData) ;
|
||||
void handleLinkAddressDownReply();
|
||||
void handleRemoteDpcdReadDownReply();
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
};
|
||||
|
||||
void detect(const Address & address);
|
||||
void detectBranch(Device device);
|
||||
void detectSink(Device newDevice, bool bFromCSN);
|
||||
|
||||
public:
|
||||
|
||||
List outstandingBranchDetections;
|
||||
List outstandingSinkDetections;
|
||||
DiscoveryManagerEventSink * sink; // To call NotifyDetectComplete()
|
||||
MessageManager * messageManager; // For transmit and receive
|
||||
Timer * timer;
|
||||
DPCDHAL * hal;
|
||||
|
||||
DiscoveryManager(MessageManager * messageManager, DiscoveryManagerEventSink * sink, Timer * timer, DPCDHAL * hal)
|
||||
: receiverSink(this),
|
||||
connectionStatusNotifyProcessor(&receiverSink),
|
||||
guidBuilder(timer, 0x10DE9070),
|
||||
currentDevicesCount(0),
|
||||
sink(sink),
|
||||
messageManager(messageManager),
|
||||
timer(timer),
|
||||
hal(hal)
|
||||
{
|
||||
|
||||
//
|
||||
// Register to filter all the upmessages. We want to know when
|
||||
// connection status notify events are on their way.
|
||||
//
|
||||
messageManager->registerReceiver(&connectionStatusNotifyProcessor);
|
||||
}
|
||||
|
||||
~DiscoveryManager()
|
||||
{
|
||||
while (!this->outstandingBranchDetections.isEmpty())
|
||||
delete this->outstandingBranchDetections.front();
|
||||
|
||||
while (!this->outstandingSinkDetections.isEmpty())
|
||||
delete this->outstandingSinkDetections.front();
|
||||
|
||||
while (!this->pendingCsnUpReplies.isEmpty())
|
||||
delete this->pendingCsnUpReplies.front();
|
||||
}
|
||||
|
||||
void notifyLongPulse(bool status);
|
||||
|
||||
};
|
||||
}
|
||||
#endif //INCLUDED_DP_DISCOVERY_H
|
||||
308
src/common/displayport/inc/dp_edid.h
Normal file
308
src/common/displayport/inc/dp_edid.h
Normal file
@@ -0,0 +1,308 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_edid.h *
|
||||
* reading EDID from SST/MST Device *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_EDID_H
|
||||
#define INCLUDED_DP_EDID_H
|
||||
|
||||
#include "dp_buffer.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_address.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_messagecodings.h"
|
||||
#include "dp_timer.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class Edid;
|
||||
|
||||
//
|
||||
// Shared utility object for MST/SST edid reading.
|
||||
// This object handles the retry, CRC validating,
|
||||
// identification of EDID length, DDC ping, etc.
|
||||
//
|
||||
// It's designed as an asynchronous state machine
|
||||
// because of the way MST EDID reads are built.
|
||||
//
|
||||
class EdidAssembler
|
||||
{
|
||||
public:
|
||||
EdidAssembler(Edid * const edid, bool bPatchCrc = false);
|
||||
|
||||
//
|
||||
// returns false - when existing data in Edid is invalid
|
||||
// returns seg - segment from which to read next block
|
||||
// returns offset - offset within block from which to start reading next block
|
||||
//
|
||||
bool readNextRequest(NvU8 & seg, NvU8 & offset);
|
||||
|
||||
// returns false when Edid read is completed
|
||||
void postReply(const Buffer & buffer, unsigned sizeCompleted, bool success);
|
||||
void postReply(unsigned char * data, unsigned sizeCompleted, bool success);
|
||||
|
||||
// returns true when it read all the required blocks
|
||||
bool readIsComplete();
|
||||
void reset();
|
||||
private:
|
||||
Edid * edid;
|
||||
Stream stream;
|
||||
|
||||
NvU8 oldBlockChecksum;
|
||||
unsigned blocksRead;
|
||||
unsigned totalBlockCnt;
|
||||
unsigned retriesCount;
|
||||
bool bPatchCrc;
|
||||
};
|
||||
|
||||
//
|
||||
// EDID
|
||||
//
|
||||
class Edid
|
||||
{
|
||||
public:
|
||||
Edid();
|
||||
~Edid();
|
||||
|
||||
Buffer * getBuffer() const { return &buffer; }
|
||||
NvU8 getFirstPageChecksum(); // Get checksum byte
|
||||
NvU8 getLastPageChecksum(); // Get checksum byte for last block
|
||||
|
||||
bool verifyCRC();
|
||||
unsigned getEdidVersion();
|
||||
unsigned getBlockCount();
|
||||
const char * getName() const;
|
||||
unsigned getEdidSize() const;
|
||||
bool isChecksumValid() const;
|
||||
bool isJunkEdid() const;
|
||||
bool isFallbackEdid() const;
|
||||
void swap(Edid & right);
|
||||
void applyEdidWorkArounds(NvU32 warFlag, const DpMonitorDenylistData *pDenylistData);
|
||||
void patchCrc();
|
||||
void setForcedEdidChecksum(bool set)
|
||||
{
|
||||
this->forcedCheckSum = set;
|
||||
}
|
||||
|
||||
void setFallbackFlag(bool set)
|
||||
{
|
||||
this->fallbackEdid = set;
|
||||
}
|
||||
|
||||
void setPatchedChecksum(bool set)
|
||||
{
|
||||
this->patchedChecksum = set;
|
||||
}
|
||||
|
||||
bool isPatchedChecksum() const
|
||||
{
|
||||
return this->patchedChecksum;
|
||||
}
|
||||
|
||||
bool isValidHeader() const;
|
||||
|
||||
unsigned getManufId() const
|
||||
{
|
||||
if (buffer.getLength() < 0xa)
|
||||
return 0;
|
||||
|
||||
return ((buffer.data[0x9] << 8) | (buffer.data[0x8]));
|
||||
}
|
||||
|
||||
unsigned getProductId() const
|
||||
{
|
||||
if (buffer.getLength() < 0xc)
|
||||
return 0;
|
||||
|
||||
return ((buffer.data[0xb] << 8) | (buffer.data[0xa]));
|
||||
}
|
||||
|
||||
unsigned getYearWeek() const
|
||||
{
|
||||
if (buffer.getLength() < 0x12)
|
||||
return 0;
|
||||
|
||||
return ((buffer.data[0x11] << 8) | (buffer.data[0x10]));
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool extensionCountDisabled;
|
||||
bool dataForced;
|
||||
bool disableDpcdPowerOff;
|
||||
bool forceMaxLinkConfig;
|
||||
bool powerOnBeforeLt;
|
||||
bool skipRedundantLt;
|
||||
bool skipCableBWCheck;
|
||||
bool overrideOptimalLinkCfg;
|
||||
bool overrideMaxLaneCount;
|
||||
bool ignoreRedundantHotplug;
|
||||
bool delayAfterD3;
|
||||
bool keepLinkAlive;
|
||||
bool useLegacyAddress;
|
||||
bool bIgnoreDscCap; // Ignore DSC even if sink reports DSC capability
|
||||
bool bDisableDownspread;
|
||||
bool bForceHeadShutdown;
|
||||
bool bDisableDscMaxBppLimit;
|
||||
bool bForceHeadShutdownOnModeTransition;
|
||||
bool bDP2XPreferNonDSCForLowPClk;
|
||||
}_WARFlags;
|
||||
|
||||
_WARFlags WARFlags;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned maxLaneCount; // Max lane count value to override
|
||||
unsigned maxLaneAtHighRate; // Max lane count supported at HBR
|
||||
unsigned maxLaneAtLowRate; // Max lane count supported at RBR
|
||||
unsigned optimalLinkRate; // Optimal link rate value to override
|
||||
unsigned optimalLaneCount; // Optimal lane count value to override
|
||||
}_WARData;
|
||||
|
||||
_WARData WARData;
|
||||
|
||||
void resetData()
|
||||
{
|
||||
buffer.reset();
|
||||
checkSumValid = false;
|
||||
forcedCheckSum = false;
|
||||
fallbackEdid = false;
|
||||
// clear the WARFlags
|
||||
_WARFlags temp = {0};
|
||||
WARFlags = temp;
|
||||
}
|
||||
|
||||
bool operator== (const Edid & other)
|
||||
{
|
||||
return (buffer == other.buffer);
|
||||
}
|
||||
|
||||
bool operator!= (const Edid & other)
|
||||
{
|
||||
return !(buffer == other.buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
void validateCheckSum();
|
||||
|
||||
mutable Buffer buffer;
|
||||
bool checkSumValid;
|
||||
bool forcedCheckSum;
|
||||
bool fallbackEdid;
|
||||
bool patchedChecksum;
|
||||
};
|
||||
|
||||
//
|
||||
// SST EDID Read API
|
||||
//
|
||||
bool EdidReadSST(Edid & edid, AuxBus * aux, Timer * timer, bool pendingTestRequestEdidRead = false, bool bBypassAssembler = false, MainLink *main = NULL);
|
||||
|
||||
enum EDID_DDC
|
||||
{
|
||||
EDID_DDC_NONE = 0x00,
|
||||
EDID_DDC_ADR0 = 0xA0,
|
||||
EDID_DDC_ADR1 = 0xA2,
|
||||
EDID_DDC_ADR2 = 0xA6,
|
||||
EDID_SEG_SELECTOR_OFFSET = 0x60,
|
||||
};
|
||||
EDID_DDC sstDDCPing(AuxBus & dpAux);
|
||||
|
||||
//
|
||||
// MST EDID Read API
|
||||
//
|
||||
|
||||
class EdidReadMultistream : public Object, protected MessageManager::Message::MessageEventSink, Timer::TimerCallback
|
||||
{
|
||||
public:
|
||||
class EdidReadMultistreamEventSink // Connector will inherit from this
|
||||
{
|
||||
public:
|
||||
virtual void mstEdidCompleted(EdidReadMultistream * from) = 0;
|
||||
virtual void mstEdidReadFailed(EdidReadMultistream * from) = 0;
|
||||
};
|
||||
|
||||
EdidReadMultistream(Timer * timer, MessageManager * manager, EdidReadMultistream::EdidReadMultistreamEventSink * sink, Address topologyAddress)
|
||||
: topologyAddress(topologyAddress), manager(manager), edidReaderManager(&edid), ddcIndex(0),
|
||||
retries(0), timer(timer), sink(sink)
|
||||
{
|
||||
startReadingEdid();
|
||||
}
|
||||
|
||||
Edid edid;
|
||||
Address topologyAddress;
|
||||
~EdidReadMultistream();
|
||||
|
||||
private:
|
||||
void startReadingEdid();
|
||||
|
||||
MessageManager * manager;
|
||||
RemoteI2cReadMessage remoteI2cRead;
|
||||
EdidAssembler edidReaderManager; // come up another word besides edidReaderManager eg Manager
|
||||
NvU8 DDCAddress;
|
||||
NvU8 ddcIndex;
|
||||
unsigned retries;
|
||||
Timer * timer;
|
||||
|
||||
void readNextBlock(NvU8 seg, NvU8 offset);
|
||||
void failedToReadEdid();
|
||||
void expired(const void * tag);
|
||||
|
||||
EdidReadMultistreamEventSink * sink;
|
||||
|
||||
virtual void messageFailed(MessageManager::Message * from, NakData * nakData);
|
||||
virtual void messageCompleted(MessageManager::Message * from);
|
||||
void edidAttemptDone(bool succeeded);
|
||||
};
|
||||
|
||||
//
|
||||
// Useful defines
|
||||
//
|
||||
enum
|
||||
{
|
||||
EDID_BLOCK_SIZE = 0x80,
|
||||
EDID_SEGMENT_SIZE = 2*EDID_BLOCK_SIZE,
|
||||
EDID_POLICY_BLOCK_READ_MAX_RETRY_COUNT = 3,
|
||||
// DID EDID CTS v1.3 d12 currently outlines that Source shall support up to 16 blocks of EDID data.
|
||||
EDID_MAX_BLOCK_COUNT = 16,
|
||||
};
|
||||
|
||||
static const NvU8 ddcAddrList[] = {EDID_DDC_ADR0, EDID_DDC_ADR1, EDID_DDC_ADR2};
|
||||
const NvU8 ddcAddrListSize = sizeof(ddcAddrList)/sizeof(NvU8);
|
||||
|
||||
// HDMI 1.4 Section 8.5: HDMI Sink can have up to 100ms to get EDID ready.
|
||||
const NvU8 EDID_READ_RETRY_TIMEOUT_MS = 100;
|
||||
const NvU8 EDID_MAX_AUX_RETRIES = 10;
|
||||
const NvU8 EDID_AUX_WAIT_TIME = 1;
|
||||
NvU8 getEDIDBlockChecksum(const Buffer &);
|
||||
|
||||
void makeEdidFallback(Edid & edid, NvU32 fallbackFormatSupported = 0);
|
||||
void makeEdidFallbackVGA(Edid & edid);
|
||||
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_EDID_H
|
||||
446
src/common/displayport/inc/dp_evoadapter.h
Normal file
446
src/common/displayport/inc/dp_evoadapter.h
Normal file
@@ -0,0 +1,446 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* List **************************************\
|
||||
* *
|
||||
* Module: dp_evoadapter.h *
|
||||
* Interface for low level access to the aux bus. *
|
||||
* This is the synchronous version of the interface. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_EVOADAPTER_H
|
||||
#define INCLUDED_DP_EVOADAPTER_H
|
||||
|
||||
#include "dp_timer.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_mainlink.h"
|
||||
#include "dp_wardatabase.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_regkeydatabase.h"
|
||||
|
||||
#include <nvos.h>
|
||||
#include <ctrl/ctrl0073/ctrl0073dfp.h>
|
||||
#include <ctrl/ctrl0073/ctrl0073dp.h>
|
||||
|
||||
#define HDCP_DUMMY_CN (0x1)
|
||||
#define HDCP_DUMMY_CKSV (0xFFFFF)
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class EvoInterface
|
||||
{
|
||||
public:
|
||||
//
|
||||
// IOCTL access to RM class DISPLAY_COMMON and NV50_DISPLAY
|
||||
//
|
||||
virtual NvU32 rmControl0073(NvU32 command, void * params, NvU32 paramSize) = 0;
|
||||
virtual NvU32 rmControl5070(NvU32 command, void * params, NvU32 paramSize) = 0;
|
||||
|
||||
virtual bool getMaxLinkConfigFromUefi(NvU8 &linkRate, NvU8 &laneCount)
|
||||
{
|
||||
linkRate = 0; laneCount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Call to tell DD that linkTraining will be performed.
|
||||
// Required when head is attached & we enter in flush mode GPUs.
|
||||
// Required to enable/disable Audio.
|
||||
//
|
||||
// Derived classes that override these functions must call down to
|
||||
// DisplayPort::EvoInterface::pre/postLinkTraining() to inherit this
|
||||
// implementation.
|
||||
//
|
||||
virtual void preLinkTraining(NvU32 head)
|
||||
{
|
||||
}
|
||||
virtual void postLinkTraining(NvU32 head)
|
||||
{
|
||||
}
|
||||
|
||||
virtual NvU32 getSubdeviceIndex() = 0;
|
||||
virtual NvU32 getDisplayId() = 0;
|
||||
virtual NvU32 getSorIndex() = 0;
|
||||
virtual NvU32 getLinkIndex() = 0; // Link A = 0, Link B = 1
|
||||
//
|
||||
// Query the value of a registry key. Implementations should return 0
|
||||
// if the regkey is not set.
|
||||
//
|
||||
virtual NvU32 getRegkeyValue(const char *key)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual NvU32 monitorDenylistInfo(NvU32 manufId, NvU32 productId, DpMonitorDenylistData *pDenylistData)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual bool isInbandStereoSignalingSupported()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
MainLink * MakeEvoMainLink(EvoInterface * provider, Timer * timer);
|
||||
AuxBus * MakeEvoAuxBus(EvoInterface * provider, Timer * timer);
|
||||
|
||||
class EvoAuxBus : public AuxBus
|
||||
{
|
||||
public:
|
||||
EvoAuxBus(EvoInterface * provider, Timer * timer)
|
||||
: provider(provider),
|
||||
timer(timer),
|
||||
displayId(provider->getDisplayId()),
|
||||
subdeviceIndex(provider->getSubdeviceIndex()),
|
||||
devicePlugged(false)
|
||||
{
|
||||
}
|
||||
|
||||
virtual status transaction(Action action, Type type, int address, NvU8 * buffer,
|
||||
unsigned sizeRequested, unsigned * sizeCompleted,
|
||||
unsigned * pNakReason = NULL,
|
||||
NvU8 offset = 0, NvU8 nWriteTransactions = 0);
|
||||
virtual unsigned transactionSize();
|
||||
virtual void setDevicePlugged(bool);
|
||||
|
||||
private:
|
||||
EvoInterface * provider;
|
||||
Timer * timer;
|
||||
NvU32 displayId;
|
||||
NvU32 subdeviceIndex;
|
||||
bool devicePlugged;
|
||||
};
|
||||
|
||||
class EvoMainLink : public MainLink
|
||||
{
|
||||
private:
|
||||
NvU32 _maxLinkRateSupportedGpu;
|
||||
NvU32 _maxLinkRateSupportedDfp;
|
||||
bool _hasIncreasedWatermarkLimits;
|
||||
bool _hasMultistream;
|
||||
bool _isPC2Disabled;
|
||||
bool _isEDP;
|
||||
|
||||
//
|
||||
// Bit mask for GPU supported DP versions.
|
||||
// Defines the same as NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS.dpVersionsSupported
|
||||
//
|
||||
NvU32 _gpuSupportedDpVersions;
|
||||
|
||||
bool _isStreamCloningEnabled;
|
||||
bool _needForceRmEdid;
|
||||
bool _skipPowerdownEDPPanelWhenHeadDetach;
|
||||
bool _isDscDisabledByRegkey;
|
||||
bool _isMstDisabledByRegkey;
|
||||
bool _isFECSupported;
|
||||
bool _useDfpMaxLinkRateCaps;
|
||||
bool _applyLinkBwOverrideWarRegVal;
|
||||
bool _isDynamicMuxCapable;
|
||||
bool _enableMSAOverrideOverMST;
|
||||
bool _isLTPhyRepeaterSupported;
|
||||
bool _isMSTPCONCapsReadDisabled;
|
||||
bool _isDownspreadSupported;
|
||||
bool _bAvoidHBR3;
|
||||
bool _bAvoidHBR3DisabledByRegkey;
|
||||
bool _bIsDpTunnelingHwBugWarEnabled;
|
||||
//
|
||||
// LTTPR count reported by RM, it might not be the same with DPLib probe
|
||||
// For example, some Intel LTTPR might not be ready to response 0xF0000 probe
|
||||
// done by RM, but when DPLib checks the same DPCD offsets it responses
|
||||
// properly. This will cause serious LT problem.
|
||||
//
|
||||
unsigned _rmPhyRepeaterCount;
|
||||
|
||||
struct DSC
|
||||
{
|
||||
bool isDscSupported;
|
||||
unsigned encoderColorFormatMask;
|
||||
unsigned lineBufferSizeKB;
|
||||
unsigned rateBufferSizeKB;
|
||||
unsigned bitsPerPixelPrecision;
|
||||
unsigned maxNumHztSlices;
|
||||
unsigned lineBufferBitDepth;
|
||||
}_DSC;
|
||||
NV0073_CTRL_SPECIFIC_HDCP_CTRL_PARAMS paramsHdcpCtrl;
|
||||
void initializeRegkeyDatabase();
|
||||
void applyRegkeyOverrides();
|
||||
|
||||
protected:
|
||||
EvoInterface * provider;
|
||||
Timer * timer;
|
||||
|
||||
NvU32 displayId;
|
||||
NvU32 subdeviceIndex;
|
||||
unsigned allHeadMask;
|
||||
|
||||
NV0073_CTRL_DFP_GET_INFO_PARAMS dfpParams;
|
||||
NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS dpParams;
|
||||
|
||||
bool _isDownspreadDisabledByRegkey;
|
||||
|
||||
public:
|
||||
EvoMainLink(EvoInterface * provider, Timer * timer);
|
||||
|
||||
virtual bool hasIncreasedWatermarkLimits()
|
||||
{
|
||||
return _hasIncreasedWatermarkLimits;
|
||||
}
|
||||
|
||||
virtual bool hasMultistream()
|
||||
{
|
||||
return _hasMultistream;
|
||||
}
|
||||
|
||||
virtual bool isPC2Disabled()
|
||||
{
|
||||
return _isPC2Disabled;
|
||||
}
|
||||
|
||||
virtual NvU32 getGpuDpSupportedVersions()
|
||||
{
|
||||
return _gpuSupportedDpVersions;
|
||||
}
|
||||
virtual bool isFECSupported()
|
||||
{
|
||||
return _isFECSupported;
|
||||
}
|
||||
|
||||
virtual bool isStreamCloningEnabled()
|
||||
{
|
||||
return _isStreamCloningEnabled;
|
||||
}
|
||||
|
||||
virtual NvU32 maxLinkRateSupported()
|
||||
{
|
||||
//
|
||||
// For cases where RM asks dplib to honor the maxLinkRate limit defined in DCB, always use
|
||||
// this as the limit. Regkey has no meaning in this case.
|
||||
// In other cases, based on regkey either honor the dcb limit or the max link rate for the
|
||||
// specific GPU architecture. This is needed to avoid regressions on existing chips.
|
||||
//
|
||||
if ((_applyLinkBwOverrideWarRegVal || _useDfpMaxLinkRateCaps) &&
|
||||
(_maxLinkRateSupportedDfp < _maxLinkRateSupportedGpu))
|
||||
{
|
||||
return (LINK_RATE_TO_DATA_RATE_8B_10B(_maxLinkRateSupportedDfp));
|
||||
}
|
||||
return (LINK_RATE_TO_DATA_RATE_8B_10B(_maxLinkRateSupportedGpu));
|
||||
}
|
||||
|
||||
virtual bool isForceRmEdidRequired()
|
||||
{
|
||||
return _needForceRmEdid;
|
||||
}
|
||||
|
||||
virtual bool fetchEdidByRmCtrl(NvU8* edidBuffer, NvU32 bufferSize);
|
||||
virtual bool applyEdidOverrideByRmCtrl(NvU8* edidBuffer, NvU32 bufferSize);
|
||||
|
||||
virtual bool isDynamicMuxCapable()
|
||||
{
|
||||
return _isDynamicMuxCapable;
|
||||
}
|
||||
|
||||
virtual bool isInternalPanelDynamicMuxCapable()
|
||||
{
|
||||
return (_isDynamicMuxCapable && _isEDP);
|
||||
}
|
||||
|
||||
virtual bool isDownspreadSupported()
|
||||
{
|
||||
return _isDownspreadSupported;
|
||||
}
|
||||
|
||||
virtual bool isAvoidHBR3WAREnabled()
|
||||
{
|
||||
return _bAvoidHBR3 && !_bAvoidHBR3DisabledByRegkey;
|
||||
}
|
||||
virtual bool isDpTunnelingHwBugWarEnabled()
|
||||
{
|
||||
return _bIsDpTunnelingHwBugWarEnabled;
|
||||
}
|
||||
// Get GPU DSC capabilities
|
||||
virtual void getDscCaps(bool *pbDscSupported,
|
||||
unsigned *pEncoderColorFormatMask,
|
||||
unsigned *pLineBufferSizeKB,
|
||||
unsigned *pRateBufferSizeKB,
|
||||
unsigned *pBitsPerPixelPrecision,
|
||||
unsigned *pMaxNumHztSlices,
|
||||
unsigned *pLineBufferBitDepth)
|
||||
{
|
||||
if (pbDscSupported)
|
||||
{
|
||||
*pbDscSupported = _DSC.isDscSupported;
|
||||
}
|
||||
|
||||
if (pEncoderColorFormatMask)
|
||||
{
|
||||
*pEncoderColorFormatMask = _DSC.encoderColorFormatMask;
|
||||
}
|
||||
|
||||
if (pLineBufferSizeKB)
|
||||
{
|
||||
*pLineBufferSizeKB = _DSC.lineBufferSizeKB;
|
||||
}
|
||||
|
||||
if (pRateBufferSizeKB)
|
||||
{
|
||||
*pRateBufferSizeKB = _DSC.rateBufferSizeKB;
|
||||
}
|
||||
|
||||
if (pBitsPerPixelPrecision)
|
||||
{
|
||||
*pBitsPerPixelPrecision = _DSC.bitsPerPixelPrecision;
|
||||
}
|
||||
|
||||
if (pMaxNumHztSlices)
|
||||
{
|
||||
*pMaxNumHztSlices = _DSC.maxNumHztSlices;
|
||||
}
|
||||
|
||||
if (pLineBufferBitDepth)
|
||||
{
|
||||
*pLineBufferBitDepth = _DSC.lineBufferBitDepth;
|
||||
}
|
||||
}
|
||||
|
||||
virtual NvU32 getRootDisplayId()
|
||||
{
|
||||
return this->displayId;
|
||||
}
|
||||
|
||||
virtual bool isLttprSupported()
|
||||
{
|
||||
return this->_isLTPhyRepeaterSupported;
|
||||
}
|
||||
|
||||
EvoInterface * getProvider()
|
||||
{
|
||||
return this->provider;
|
||||
}
|
||||
|
||||
// Return the current mux state. Returns false if device is not mux capable
|
||||
bool getDynamicMuxState(NvU32 *muxState);
|
||||
|
||||
virtual bool physicalLayerSetTestPattern(PatternInfo * patternInfo);
|
||||
virtual void preLinkTraining(NvU32 head);
|
||||
virtual void postLinkTraining(NvU32 head);
|
||||
virtual NvU32 getRegkeyValue(const char *key);
|
||||
virtual const DP_REGKEY_DATABASE& getRegkeyDatabase();
|
||||
virtual NvU32 getSorIndex();
|
||||
virtual bool isInbandStereoSignalingSupported();
|
||||
virtual bool train(const LinkConfiguration & link, bool force, LinkTrainingType linkTrainingType,
|
||||
LinkConfiguration *retLink, bool bSkipLt = false, bool isPostLtAdjRequestGranted = false,
|
||||
unsigned phyRepeaterCount = 0);
|
||||
virtual bool retrieveRingBuffer(NvU8 dpRingBuffertype, NvU32 numRecords);
|
||||
virtual void getLinkConfig(unsigned & laneCount, NvU64 & linkRate);
|
||||
void getLinkConfigWithFEC(unsigned & laneCount, NvU64 & linkRate, bool &bFECEnabled);
|
||||
virtual bool getMaxLinkConfigFromUefi(NvU8 &linkRate, NvU8 &laneCount);
|
||||
virtual bool setDpMSAParameters(bool bStereoEnable, const NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS &msaparams);
|
||||
virtual bool setDpStereoMSAParameters(bool bStereoEnable, const NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS &msaparams);
|
||||
bool setFlushMode();
|
||||
void clearFlushMode(unsigned headMask, bool testMode=false);
|
||||
|
||||
virtual bool dscCrcTransaction(NvBool bEnable, gpuDscCrc *data, NvU16 *headIndex);
|
||||
|
||||
void triggerACT();
|
||||
void configureAndTriggerECF(NvU64 ecf, NvBool bForceClearEcf = NV_FALSE, NvBool bAddStreamBack = NV_FALSE); // This function program as well as trigger ECF on branch devices.
|
||||
virtual void disableAlternateScramblerReset();
|
||||
void configureHDCPDisableAuthentication();
|
||||
void configureHDCPAbortAuthentication(AbortAuthReason abortAuthReason);
|
||||
bool setStreamType(unsigned streamIndex, NvU8 streamType, bool * bNeedReNegotiate);
|
||||
void configureHDCPValidateLink(HDCPValidateData &hdcpValidateData, NvU64 cN = HDCP_DUMMY_CN, NvU64 cKsv = HDCP_DUMMY_CKSV);
|
||||
void forwardPendingKsvListReady(NvBool bKsvListReady);
|
||||
void configureHDCPRenegotiate(NvU64 cN = HDCP_DUMMY_CN, NvU64 cKsv = HDCP_DUMMY_CKSV, bool bForceReAuth = false,
|
||||
bool bRxIDMsgPending = false);
|
||||
void configureHDCPGetHDCPState(HDCPState &hdcpState);
|
||||
bool rmUpdateDynamicDfpCache(NvU32 headIndex, RmDfpCache * dfpCache, NvBool bResetDfp);
|
||||
|
||||
virtual NvU32 headToStream(NvU32 head, bool bSidebandMessageSupported, DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY);
|
||||
|
||||
void configureSingleStream(NvU32 head,
|
||||
NvU32 hBlankSym,
|
||||
NvU32 vBlankSym,
|
||||
bool bEnhancedFraming,
|
||||
NvU32 tuSize,
|
||||
NvU32 waterMark,
|
||||
DP_COLORFORMAT colorFormat,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamId = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE singleHeadMultistreamMode = DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE,
|
||||
bool bEnableAudioOverRightPanel = false,
|
||||
bool bEnable2Head1Or = false);
|
||||
|
||||
void configureMultiStream(NvU32 head,
|
||||
NvU32 hBlankSym,
|
||||
NvU32 vBlankSym,
|
||||
NvU32 slotStart,
|
||||
NvU32 slotEnd,
|
||||
NvU32 PBN,
|
||||
NvU32 Timeslice,
|
||||
DP_COLORFORMAT colorFormat,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE singleHeadMultistreamMode = DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE,
|
||||
bool bEnableAudioOverRightPanel = false,
|
||||
bool bEnable2Head1Or = false);
|
||||
|
||||
void configureSingleHeadMultiStreamMode(NvU32 displayIDs[],
|
||||
NvU32 numStreams,
|
||||
NvU32 mode,
|
||||
bool bSetConfig,
|
||||
NvU8 vbiosPrimaryDispIdIndex = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY);
|
||||
|
||||
void configureMsScratchRegisters(NvU32 address,
|
||||
NvU32 hopCount,
|
||||
NvU32 driverState);
|
||||
|
||||
bool isActive();
|
||||
bool isEDP();
|
||||
bool skipPowerdownEdpPanelWhenHeadDetach();
|
||||
bool isMSTPCONCapsReadDisabled();
|
||||
bool supportMSAOverMST();
|
||||
bool controlRateGoverning(NvU32 head, bool enable, bool updateNow);
|
||||
|
||||
bool getDpTestPattern(NV0073_CTRL_DP_TESTPATTERN *testPattern);
|
||||
bool setDpTestPattern(NV0073_CTRL_DP_TESTPATTERN testPattern,
|
||||
NvU8 laneMask, NV0073_CTRL_DP_CSTM cstm,
|
||||
NvBool bIsHBR2, NvBool bSkipLaneDataOverride);
|
||||
bool getDpLaneData(NvU32 *numLanes, NvU32 *data);
|
||||
bool setDpLaneData(NvU32 numLanes, NvU32 *data);
|
||||
void configurePowerState(bool bPowerUp);
|
||||
NvU32 monitorDenylistInfo(NvU32 ManufacturerID, NvU32 ProductID, DpMonitorDenylistData *pDenylistData);
|
||||
NvU32 allocDisplayId();
|
||||
bool freeDisplayId(NvU32 displayId);
|
||||
virtual bool queryAndUpdateDfpParams();
|
||||
virtual bool queryGPUCapability();
|
||||
|
||||
bool getEdpPowerData(bool *panelPowerOn, bool *dpcdPowerStateD0);
|
||||
virtual bool vrrRunEnablementStage(unsigned stage, NvU32 *status);
|
||||
|
||||
void configureTriggerSelect(NvU32 head,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY);
|
||||
void configureTriggerAll(NvU32 head, bool enable);
|
||||
virtual bool configureLinkRateTable(const NvU16 *pLinkRateTable, LinkRates *pLinkRates);
|
||||
bool configureFec(const bool bEnableFec);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_EVOADAPTER_H
|
||||
147
src/common/displayport/inc/dp_groupimpl.h
Normal file
147
src/common/displayport/inc/dp_groupimpl.h
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_groupimpl.h *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_GROUPIMPL_H
|
||||
#define INCLUDED_DP_GROUPIMPL_H
|
||||
|
||||
#include "dp_connector.h"
|
||||
#include "dp_deviceimpl.h"
|
||||
#include "dp_linkedlist.h"
|
||||
#include "dp_watermark.h"
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class StreamEncryptionStatusDetection;
|
||||
|
||||
struct GroupImpl : public Group, ListElement, Timer::TimerCallback
|
||||
{
|
||||
ConnectorImpl * parent;
|
||||
LinkedList<Device> members;
|
||||
StreamEncryptionStatusDetection * streamEncryptionStatusDetection;
|
||||
NvU8 clientId[CLIENT_ID_SIZE];
|
||||
List elements;
|
||||
unsigned headIndex;
|
||||
unsigned streamIndex;
|
||||
bool streamValidationDone;
|
||||
bool headInFirmware; // Set if this is a firmware run mode. If set lastModesetInfo is NOT valid
|
||||
bool bIsHeadShutdownNeeded; // Set if head shutdown is requested during modeset
|
||||
bool hdcpEnabled;
|
||||
bool hdcpPreviousStatus;
|
||||
bool qseEncryptionStatusMismatch;
|
||||
bool bWaitForDeAllocACT;
|
||||
bool bDeferredPayloadAlloc;
|
||||
ModesetInfo lastModesetInfo;
|
||||
DSC_MODE dscModeRequest; // DSC mode requested during NAB
|
||||
DSC_MODE dscModeActive; // DSC mode currently active, set in NAE
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID singleHeadMultiStreamID;
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE singleHeadMultiStreamMode;
|
||||
DP_COLORFORMAT colorFormat;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned PBN;
|
||||
int count;
|
||||
int begin;
|
||||
bool hardwareDirty; // Does the configureStream need to be called again?
|
||||
Watermark watermarks; // Cached watermark calculations
|
||||
} timeslot;
|
||||
|
||||
GroupImpl(ConnectorImpl * parent, bool isFirmwareGroup = false)
|
||||
: parent(parent),
|
||||
streamValidationDone(true),
|
||||
headInFirmware(false),
|
||||
bIsHeadShutdownNeeded(true),
|
||||
hdcpEnabled(false),
|
||||
hdcpPreviousStatus(false),
|
||||
qseEncryptionStatusMismatch(false),
|
||||
bWaitForDeAllocACT(false),
|
||||
dscModeRequest(DSC_MODE_NONE),
|
||||
dscModeActive(DSC_MODE_NONE),
|
||||
singleHeadMultiStreamID(DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY),
|
||||
singleHeadMultiStreamMode(DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE),
|
||||
headAttached(false), timeslotAllocated(false)
|
||||
{
|
||||
if (isFirmwareGroup)
|
||||
streamEncryptionStatusDetection = 0;
|
||||
else
|
||||
{
|
||||
streamEncryptionStatusDetection = new StreamEncryptionStatusDetection(this, parent);
|
||||
}
|
||||
timeslot.count = 0;
|
||||
}
|
||||
|
||||
~GroupImpl()
|
||||
{
|
||||
if (streamEncryptionStatusDetection)
|
||||
{
|
||||
delete streamEncryptionStatusDetection;
|
||||
streamEncryptionStatusDetection = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void insert(Device * dev);
|
||||
virtual void remove(Device * dev);
|
||||
void update(Device * dev, bool allocationState); // send the allocatepayload/deallocatepayload message
|
||||
bool contains(Device * dev) { return members.contains(dev); }
|
||||
virtual Device * enumDevices(Device * previousDevice);
|
||||
|
||||
void updateVbiosScratchRegister(Device * lastDevice); // Update the VBIOS scratch register with last lit display
|
||||
|
||||
//
|
||||
// Timer callback tags.
|
||||
// (we pass the address of these variables as context to ::expired)
|
||||
//
|
||||
char tagHDCPReauthentication;
|
||||
char tagStreamValidation;
|
||||
|
||||
char tagMSTQSEandSetECF;
|
||||
unsigned QSESetECFRetries; // Retry counter for MST QSE and set ECF.
|
||||
virtual void hdcpMSTQSEandSetECF();
|
||||
|
||||
unsigned authRetries; // Retry counter for the authentication.
|
||||
|
||||
virtual void expired(const void * tag);
|
||||
virtual bool hdcpSetEncrypted(bool encrypted, NvU8 streamType = NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NvBool bForceClear = NV_FALSE, NvBool bAddStreamBack = NV_FALSE);
|
||||
virtual bool hdcpGetEncrypted();
|
||||
virtual void destroy();
|
||||
void cancelHdcpCallbacks();
|
||||
|
||||
bool isHeadAttached() { return headAttached; }
|
||||
void setHeadAttached(bool attached);
|
||||
|
||||
bool isTimeslotAllocated() { return timeslotAllocated; }
|
||||
void setTimeslotAllocated(bool allocated) {timeslotAllocated = allocated;}
|
||||
|
||||
private:
|
||||
bool headAttached; // True if modeset started (during NAB). Sets back to False during NDE
|
||||
bool timeslotAllocated; // True if timeslot is allocated for the group (beforeAddStream). Sets back to False during afterDeleteStream
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_GROUPIMPL_H
|
||||
120
src/common/displayport/inc/dp_guid.h
Normal file
120
src/common/displayport/inc/dp_guid.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_guid.h *
|
||||
* GUID struct and builder class *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_GUID_H
|
||||
#define INCLUDED_DP_GUID_H
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_timer.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
#define DPCD_GUID_SIZE 16
|
||||
|
||||
struct GUID
|
||||
{
|
||||
NvU8 data[DPCD_GUID_SIZE];
|
||||
|
||||
GUID()
|
||||
{
|
||||
dpMemZero(&data, sizeof(data));
|
||||
}
|
||||
|
||||
bool isGuidZero()
|
||||
{
|
||||
for (unsigned i = 0 ; i < DPCD_GUID_SIZE; i++)
|
||||
if (data[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator == (const GUID & other) const
|
||||
{
|
||||
for (unsigned i = 0 ; i < DPCD_GUID_SIZE; i++)
|
||||
if (data[i] != other.data[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator != (const GUID & other) const
|
||||
{
|
||||
return !((*this) == other);
|
||||
}
|
||||
|
||||
void copyFrom(const NvU8 * buffer)
|
||||
{
|
||||
dpMemCopy(&this->data[0], buffer, sizeof data);
|
||||
}
|
||||
|
||||
// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
// Two Xs per byte, plus four dashes and a NUL byte.
|
||||
typedef char StringBuffer[DPCD_GUID_SIZE*2 + 5];
|
||||
char * toString(StringBuffer & buffer) const
|
||||
{
|
||||
char *p = &buffer[0];
|
||||
|
||||
for (unsigned i = 0; i < DPCD_GUID_SIZE; i++) {
|
||||
dpByteToHexChar(p, data[i]);
|
||||
p += 2;
|
||||
if (i == 3 || i == 5 || i == 7 || i == 9)
|
||||
*p++ = '-';
|
||||
}
|
||||
|
||||
*p++ = '\0';
|
||||
|
||||
DP_ASSERT(p == buffer + sizeof(buffer));
|
||||
|
||||
return buffer;
|
||||
}
|
||||
};
|
||||
|
||||
class GUIDBuilder
|
||||
{
|
||||
NvU32 salt;
|
||||
NvU32 previousRandom;
|
||||
Timer * source;
|
||||
|
||||
|
||||
//
|
||||
// Linear congruential random number generator
|
||||
// Seed values chosen from numerical methods
|
||||
//
|
||||
NvU32 random();
|
||||
|
||||
public:
|
||||
GUIDBuilder(Timer * source, NvU32 salt);
|
||||
|
||||
void makeGuid(GUID & guid);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_GUID_H
|
||||
57
src/common/displayport/inc/dp_hostimp.h
Normal file
57
src/common/displayport/inc/dp_hostimp.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_hostimp.h *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_HOSTIMP_H
|
||||
#define INCLUDED_DP_HOSTIMP_H
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "dp_tracing.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
extern "C" void * dpMalloc(NvLength size);
|
||||
extern "C" void dpFree(void * ptr);
|
||||
extern "C" void dpDebugBreakpoint();
|
||||
// Note: dpPrint() implementations are expected to append a newline themselves.
|
||||
extern "C" void dpPrint(const char * formatter, ...);
|
||||
extern "C" void dpPrintf(DP_LOG_LEVEL severity, const char * formatter, ...);
|
||||
extern "C" void dpTraceEvent(NV_DP_TRACING_EVENT event,
|
||||
NV_DP_TRACING_PRIORITY priority, NvU32 numArgs, ...);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
#define NV_DP_ASSERT_ENABLED 1
|
||||
#else
|
||||
#define NV_DP_ASSERT_ENABLED 0
|
||||
#endif
|
||||
|
||||
#if NV_DP_ASSERT_ENABLED
|
||||
extern "C" void dpAssert(const char *expression, const char *file,
|
||||
const char *function, int line);
|
||||
#endif
|
||||
|
||||
#endif // INCLUDED_DP_HOSTIMP_H
|
||||
129
src/common/displayport/inc/dp_internal.h
Normal file
129
src/common/displayport/inc/dp_internal.h
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_internal.h *
|
||||
* RM stubs to allow unit testing. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_INTERNAL_H
|
||||
#define INCLUDED_DP_INTERNAL_H
|
||||
|
||||
//
|
||||
// Clients should not include this file
|
||||
// This file provides the private malloc implementation.
|
||||
//
|
||||
|
||||
#include <nvtypes.h>
|
||||
#include <stddef.h> // size_t
|
||||
|
||||
#include "dp_object.h"
|
||||
#include "dp_ringbuffer.h"
|
||||
|
||||
static inline void dpByteToHexChar(char *output, NvU8 c)
|
||||
{
|
||||
char dig = (c>>4) & 0xF;
|
||||
output[0] = dig < 10 ? dig + '0' : dig + 'A' - 10;
|
||||
dig = c & 0xF;
|
||||
output[1] = dig < 10 ? dig + '0' : dig + 'A' - 10;
|
||||
}
|
||||
|
||||
static inline void dpHexDump(char * output, unsigned outSize, NvU8 * buffer, unsigned size)
|
||||
{
|
||||
char * tail = output;
|
||||
if (outSize < size * 3 + 1)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < size; i++)
|
||||
{
|
||||
dpByteToHexChar(tail, buffer[i]);
|
||||
tail += 2;
|
||||
*tail++ = ' ';
|
||||
}
|
||||
*tail = 0;
|
||||
}
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
template <class T>
|
||||
inline void swap_args(T & left, T & right)
|
||||
{
|
||||
T temp = left;
|
||||
left = right;
|
||||
right = temp;
|
||||
}
|
||||
|
||||
inline NvU64 divide_ceil(NvU64 a, NvU64 b)
|
||||
{
|
||||
return (a + b - 1) / b;
|
||||
}
|
||||
|
||||
inline NvU64 divide_floor(NvU64 a, NvU64 b)
|
||||
{
|
||||
return a / b;
|
||||
}
|
||||
|
||||
inline NvU64 axb_div_c_64(NvU64 a, NvU64 b, NvU64 c)
|
||||
{
|
||||
// NvU64 arithmetic to keep precision and avoid floats
|
||||
// a*b/c = (a/c)*b + ((a%c)*b + c/2)/c
|
||||
return ((a/c)*b + ((a%c)*b + c/2)/c);
|
||||
}
|
||||
}
|
||||
|
||||
#define DP_MIN(x,y) ((x)<(y)?(x):(y))
|
||||
#define DP_MAX(x,y) ((x)<(y)?(y):(x))
|
||||
|
||||
//
|
||||
// Macro to suppress unused local variable
|
||||
//
|
||||
template <class T> void dp_used(const T & /*x*/) {}
|
||||
#define DP_USED(x) dp_used(x)
|
||||
|
||||
|
||||
//
|
||||
// Basic debug logging facility
|
||||
//
|
||||
|
||||
#if NV_DP_ASSERT_ENABLED
|
||||
#define DP_ASSERT(x) \
|
||||
if (!(x)) \
|
||||
{ \
|
||||
addDpAssertRecord(); \
|
||||
dpAssert(#x, __FILE__, __FUNCTION__, __LINE__); \
|
||||
dpDebugBreakpoint(); \
|
||||
}
|
||||
#else
|
||||
#define DP_ASSERT(x) \
|
||||
{ \
|
||||
DP_USED(x); \
|
||||
if (!(x)) \
|
||||
{ \
|
||||
addDpAssertRecord(); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //INCLUDED_DP_INTERNAL_H
|
||||
559
src/common/displayport/inc/dp_linkconfig.h
Normal file
559
src/common/displayport/inc/dp_linkconfig.h
Normal file
@@ -0,0 +1,559 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* List **************************************\
|
||||
* *
|
||||
* Module: dp_linkconfig.h *
|
||||
* Link Configuration object implementation *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_LINKCONFIG_H
|
||||
#define INCLUDED_DP_LINKCONFIG_H
|
||||
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_internal.h"
|
||||
#include "dp_watermark.h"
|
||||
#include "ctrl/ctrl0073/ctrl0073specific.h" // NV0073_CTRL_HDCP_VPRIME_SIZE
|
||||
#include "displayport.h"
|
||||
|
||||
#define NV_SUPPORTED_DP_LINK_RATES__SIZE NV_SUPPORTED_DP1X_LINK_RATES__SIZE
|
||||
namespace DisplayPort
|
||||
{
|
||||
typedef NvU64 LinkRate;
|
||||
|
||||
class LinkRates : virtual public Object
|
||||
{
|
||||
public:
|
||||
NvU8 entries;
|
||||
// Store link rate in multipler of 10MBPS to save space
|
||||
NvU16 element[NV_SUPPORTED_DP_LINK_RATES__SIZE];
|
||||
|
||||
LinkRates()
|
||||
{
|
||||
entries = 0;
|
||||
for (int i = 0; i < NV_SUPPORTED_DP_LINK_RATES__SIZE; i++)
|
||||
{
|
||||
element[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
entries = 0;
|
||||
for (int i = 0; i < NV_SUPPORTED_DP_LINK_RATES__SIZE; i++)
|
||||
{
|
||||
element[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Only use import if element can be added at the end
|
||||
// given element list needs to be sorted
|
||||
bool import(NvU16 linkBw)
|
||||
{
|
||||
if (!IS_VALID_LINKBW_10M(linkBw))
|
||||
{
|
||||
DP_ASSERT(0 && "Unsupported Link Bandwidth");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entries < NV_SUPPORTED_DP_LINK_RATES__SIZE)
|
||||
{
|
||||
element[entries] = linkBw;
|
||||
entries++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// Use insert to import to the right spot in the sorted
|
||||
// element list if you are not sure of where linkBw is compared
|
||||
// to existing entries in the element list
|
||||
bool insert(NvU16 linkBw)
|
||||
{
|
||||
if (!IS_VALID_LINKBW_10M(linkBw))
|
||||
{
|
||||
DP_ASSERT(0 && "Unsupported Link Bandwidth");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < entries; i++)
|
||||
{
|
||||
if (element[i] == linkBw)
|
||||
{
|
||||
// element already present, nothing to do here
|
||||
return true;
|
||||
}
|
||||
else if (element[i] > linkBw)
|
||||
{
|
||||
// make space for the new element
|
||||
if (entries >= NV_SUPPORTED_DP_LINK_RATES__SIZE) {
|
||||
DP_ASSERT(0 && "No more space for adding additional link rate");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int j = entries-1; j >= i; j--)
|
||||
{
|
||||
element[j+1] = element[j];
|
||||
}
|
||||
entries++;
|
||||
// space is made, insert linkBw to the right spot
|
||||
element[i] = linkBw;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
// if we are here and not returned, that means linkBw is bigger than
|
||||
// the current entries, just import
|
||||
return import(linkBw);
|
||||
}
|
||||
|
||||
LinkRate getLowerRate(LinkRate rate)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ((entries == 0) || (rate <= element[0]))
|
||||
return 0;
|
||||
|
||||
for (i = entries - 1; i > 0; i--)
|
||||
{
|
||||
if (rate > element[i])
|
||||
break;
|
||||
}
|
||||
|
||||
return ((LinkRate)element[i]);
|
||||
}
|
||||
|
||||
LinkRate getMaxRate()
|
||||
{
|
||||
LinkRate rate = 0;
|
||||
if ((entries > 0) &&
|
||||
(entries <= NV_SUPPORTED_DP_LINK_RATES__SIZE))
|
||||
{
|
||||
rate = (LinkRate)element[entries - 1];
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
|
||||
NvU8 getNumElements()
|
||||
{
|
||||
return NV_SUPPORTED_DP_LINK_RATES__SIZE;
|
||||
}
|
||||
|
||||
NvU8 getNumLinkRates()
|
||||
{
|
||||
return entries;
|
||||
}
|
||||
};
|
||||
class LinkPolicy : virtual public Object
|
||||
{
|
||||
protected:
|
||||
bool bNoFallback; // No fallback when LT fails
|
||||
LinkRates linkRates;
|
||||
|
||||
public:
|
||||
LinkPolicy() : bNoFallback(false)
|
||||
{
|
||||
}
|
||||
bool skipFallback()
|
||||
{
|
||||
return bNoFallback;
|
||||
}
|
||||
void setSkipFallBack(bool bSkipFallback)
|
||||
{
|
||||
bNoFallback = bSkipFallback;
|
||||
}
|
||||
|
||||
LinkRates *getLinkRates()
|
||||
{
|
||||
return &linkRates;
|
||||
}
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
totalTimeslots = 64,
|
||||
totalUsableTimeslots = totalTimeslots - 1
|
||||
};
|
||||
|
||||
//
|
||||
// Link Data Rate per DP Lane, in MBPS,
|
||||
// For 8b/10b channel coding:
|
||||
// Link Data Rate = link rate * (8 / 10) / 8
|
||||
// = link rate * 0.1
|
||||
// For 128b/132b channel coding:
|
||||
// Link Data Rate = link rate * (128 / 132) / 8
|
||||
// = link rate * 4 / 33
|
||||
// ~= link rate * 0.12
|
||||
//
|
||||
// Link Bandwidth = Lane Count * Link Data Rate
|
||||
//
|
||||
enum
|
||||
{
|
||||
RBR = 162000000,
|
||||
EDP_2_16GHZ = 216000000,
|
||||
EDP_2_43GHZ = 243000000,
|
||||
HBR = 270000000,
|
||||
EDP_3_24GHZ = 324000000,
|
||||
EDP_4_32GHZ = 432000000,
|
||||
HBR2 = 540000000,
|
||||
HBR3 = 810000000
|
||||
};
|
||||
|
||||
struct HDCPState
|
||||
{
|
||||
bool HDCP_State_Encryption;
|
||||
bool HDCP_State_1X_Capable;
|
||||
bool HDCP_State_22_Capable;
|
||||
bool HDCP_State_Authenticated;
|
||||
bool HDCP_State_Repeater_Capable;
|
||||
};
|
||||
|
||||
struct HDCPValidateData
|
||||
{
|
||||
NvU8 vP[NV0073_CTRL_HDCP_VPRIME_SIZE];
|
||||
NvU64 aN;
|
||||
NvU64 mP;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE_SST,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE_MST,
|
||||
}DP_SINGLE_HEAD_MULTI_STREAM_MODE;
|
||||
|
||||
#define HEAD_INVALID_STREAMS 0
|
||||
#define HEAD_DEFAULT_STREAMS 1
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY = 0,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_SECONDARY = 1,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_MAX = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_SECONDARY,
|
||||
} DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID;
|
||||
|
||||
#define DP_INVALID_SOR_INDEX 0xFFFFFFFF
|
||||
#define DSC_DEPTH_FACTOR 16
|
||||
|
||||
class LinkConfiguration : virtual public Object
|
||||
{
|
||||
public:
|
||||
LinkPolicy policy;
|
||||
unsigned lanes;
|
||||
LinkRate peakRatePossible;
|
||||
LinkRate peakRate;
|
||||
LinkRate minRate;
|
||||
bool enhancedFraming;
|
||||
bool multistream;
|
||||
bool disablePostLTRequest;
|
||||
bool bEnableFEC;
|
||||
bool bDisableLTTPR;
|
||||
bool bDisableDownspread;
|
||||
//
|
||||
// The counter to record how many times link training happens.
|
||||
// Client can reset the counter by calling setLTCounter(0)
|
||||
//
|
||||
unsigned linkTrainCounter;
|
||||
|
||||
LinkConfiguration() :
|
||||
lanes(0), peakRatePossible(0), peakRate(0), minRate(0),
|
||||
enhancedFraming(false), multistream(false), disablePostLTRequest(false),
|
||||
bEnableFEC(false), bDisableLTTPR(false), bDisableDownspread(false),
|
||||
linkTrainCounter(0) {};
|
||||
|
||||
LinkConfiguration(LinkPolicy * p, unsigned lanes, LinkRate peakRate,
|
||||
bool enhancedFraming, bool MST,
|
||||
bool disablePostLTRequest = false,
|
||||
bool bEnableFEC = false,
|
||||
bool bDisableLTTPR = false,
|
||||
bool bDisableDownspread = false);
|
||||
|
||||
void setLTCounter(unsigned counter)
|
||||
{
|
||||
linkTrainCounter = counter;
|
||||
}
|
||||
|
||||
unsigned getLTCounter()
|
||||
{
|
||||
return linkTrainCounter;
|
||||
}
|
||||
|
||||
// Returns data rate in Bytes per second
|
||||
NvU64 convertLinkRateToDataRate(LinkRate linkRate) const
|
||||
{
|
||||
NvU64 dataRate;
|
||||
dataRate = LINK_RATE_TO_DATA_RATE_8B_10B(linkRate);
|
||||
return dataRate;
|
||||
}
|
||||
|
||||
// Returns minRate in data rate in Bytes per second
|
||||
NvU64 convertMinRateToDataRate() const
|
||||
{
|
||||
NvU64 dataRate;
|
||||
dataRate = DP_LINK_RATE_BITSPS_TO_BYTESPS(OVERHEAD_8B_10B(minRate));
|
||||
return dataRate;
|
||||
}
|
||||
|
||||
NvU64 getTotalDataRate() const
|
||||
{
|
||||
return (convertLinkRateToDataRate(peakRate) * lanes);
|
||||
}
|
||||
|
||||
NvU64 linkOverhead(NvU64 rate10M)
|
||||
{
|
||||
NvU64 rate;
|
||||
if(IS_VALID_LINKBW_10M(rate10M))
|
||||
{
|
||||
// Converting here so that minRate from 10M is converted to bps
|
||||
rate = DP_LINK_RATE_10M_TO_BPS(rate10M);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Convert from data rate to bps
|
||||
rate = DATA_RATE_8B_10B_TO_LINK_RATE_BPS(rate10M);
|
||||
}
|
||||
|
||||
if(bEnableFEC)
|
||||
{
|
||||
// if FEC is enabled, we have to account for 3% overhead
|
||||
// for FEC+downspread according to DP 1.4 spec
|
||||
|
||||
return rate - 3 * rate/ 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if FEC is not enabled, link overhead comprises only of
|
||||
// 0.6% downspread.
|
||||
return rate - 6 * rate/ 1000;
|
||||
}
|
||||
}
|
||||
|
||||
void enableFEC(bool setFEC)
|
||||
{
|
||||
bEnableFEC = setFEC;
|
||||
// If FEC is enabled, update minRate with FEC+downspread overhead.
|
||||
minRate = linkOverhead(peakRate);
|
||||
}
|
||||
|
||||
LinkConfiguration(unsigned long TotalLinkPBN)
|
||||
: enhancedFraming(true),
|
||||
multistream(true),
|
||||
disablePostLTRequest(false),
|
||||
bEnableFEC(false),
|
||||
bDisableLTTPR(false),
|
||||
bDisableDownspread(false),
|
||||
linkTrainCounter(0)
|
||||
{
|
||||
//
|
||||
// Reverse engineer a link configuration from Total TotalLinkPBN
|
||||
// Note that HBR2 twice HBR. The table below treats HBR2x1 and HBRx2, etc.
|
||||
//
|
||||
// PBN Calculation
|
||||
// Definition of PBN is "54/64 MBps".
|
||||
// Note this is the "data" actually transmitted in the main link.
|
||||
// So we need to take channel coding into consideration.
|
||||
// Formula: PBN = Lane Count * Link Rate (Gbps) * 1000 * (1/8) * ChannelCoding Efficiency * (64 / 54)
|
||||
// Example:
|
||||
// 1. 4 * HBR2: 4 * 5.4 * 1000 * (1/8) * (8/10) * (64/54) = 2560
|
||||
// 2. 2 * UHBR10: 2 * 10 * 1000 * (1/8) * (128/132) * (64/54) = 2873
|
||||
//
|
||||
// Full list:
|
||||
//
|
||||
// BW (Gbps) Lanes TotalLinkPBN
|
||||
// 1.62 1 192
|
||||
// 1.62 2 384
|
||||
// 1.62 4 768
|
||||
// 2.70 1 320
|
||||
// 2.70 2 640
|
||||
// 2.70 4 1280
|
||||
// 5.40 1 640
|
||||
// 5.40 2 1280
|
||||
// 5.40 4 2560
|
||||
// 8.10 1 960
|
||||
// 8.10 2 1920
|
||||
// 8.10 4 3840
|
||||
// 10.00 1 1436
|
||||
// 10.00 2 2873
|
||||
// 10.00 4 5746
|
||||
// 13.50 1 1939
|
||||
// 13.50 2 3878
|
||||
// 13.50 4 7757
|
||||
// 20.00 1 2873
|
||||
// 20.00 2 5746
|
||||
// 20.00 4 11492
|
||||
//
|
||||
|
||||
if (TotalLinkPBN <= 90)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_1_62Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_1_62Gbps);
|
||||
lanes = 0; // FAIL
|
||||
}
|
||||
if (TotalLinkPBN <= 192)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_1_62Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_1_62Gbps);
|
||||
lanes = 1;
|
||||
}
|
||||
else if (TotalLinkPBN <= 320)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_2_70Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_2_70Gbps);
|
||||
lanes = 1;
|
||||
}
|
||||
else if (TotalLinkPBN <= 384)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_1_62Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_1_62Gbps);
|
||||
lanes = 2;
|
||||
}
|
||||
else if (TotalLinkPBN <= 640)
|
||||
{
|
||||
// could be HBR2 x 1, but TotalLinkPBN works out same
|
||||
peakRatePossible = dp2LinkRate_2_70Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_2_70Gbps);
|
||||
lanes = 2;
|
||||
}
|
||||
else if (TotalLinkPBN <= 768)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_1_62Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_1_62Gbps);
|
||||
lanes = 4;
|
||||
}
|
||||
else if (TotalLinkPBN <= 960)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_8_10Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_8_10Gbps);
|
||||
lanes = 1;
|
||||
}
|
||||
else if (TotalLinkPBN <= 1280)
|
||||
{
|
||||
// could be HBR2 x 2
|
||||
peakRatePossible = dp2LinkRate_2_70Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_2_70Gbps);
|
||||
lanes = 4;
|
||||
}
|
||||
else if (TotalLinkPBN <= 1920)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_8_10Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_8_10Gbps);
|
||||
lanes = 2;
|
||||
}
|
||||
else if (TotalLinkPBN <= 2560)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_5_40Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_5_40Gbps);
|
||||
lanes = 4;
|
||||
}
|
||||
else if (TotalLinkPBN <= 3840)
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_8_10Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_8_10Gbps);
|
||||
lanes = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
peakRatePossible = dp2LinkRate_1_62Gbps;
|
||||
peakRate = peakRatePossible;
|
||||
minRate = linkOverhead(dp2LinkRate_1_62Gbps);
|
||||
lanes = 0; // FAIL
|
||||
DP_ASSERT(0 && "Unknown configuration");
|
||||
}
|
||||
}
|
||||
|
||||
void setEnhancedFraming(bool newEnhancedFraming)
|
||||
{
|
||||
enhancedFraming = newEnhancedFraming;
|
||||
}
|
||||
|
||||
bool isValid()
|
||||
{
|
||||
return lanes != laneCount_0;
|
||||
}
|
||||
|
||||
bool lowerConfig(bool bReduceLaneCnt = false);
|
||||
|
||||
void setLaneRate(LinkRate newRate, unsigned newLanes)
|
||||
{
|
||||
peakRate = newRate;
|
||||
lanes = newLanes;
|
||||
minRate = linkOverhead(peakRate);
|
||||
}
|
||||
|
||||
unsigned pbnTotal()
|
||||
{
|
||||
return PBNForSlots(totalUsableTimeslots);
|
||||
}
|
||||
|
||||
NvU64 getBytesPerTimeslot();
|
||||
|
||||
void pbnRequired(const ModesetInfo & modesetInfo, unsigned & base_pbn, unsigned & slots, unsigned & slots_pbn);
|
||||
|
||||
NvU32 slotsForPBN(NvU32 allocatedPBN, bool usable = false);
|
||||
|
||||
NvU32 PBNForSlots(NvU32 slots);
|
||||
|
||||
bool operator!= (const LinkConfiguration & right) const
|
||||
{
|
||||
return !(*this == right);
|
||||
}
|
||||
|
||||
bool operator== (const LinkConfiguration & right) const
|
||||
{
|
||||
return (this->lanes == right.lanes &&
|
||||
this->peakRate == right.peakRate &&
|
||||
this->enhancedFraming == right.enhancedFraming &&
|
||||
this->multistream == right.multistream &&
|
||||
this->bEnableFEC == right.bEnableFEC);
|
||||
}
|
||||
|
||||
bool operator< (const LinkConfiguration & right) const
|
||||
{
|
||||
NvU64 leftMKBps = getTotalDataRate();
|
||||
NvU64 rightMKBps = right.getTotalDataRate();
|
||||
|
||||
if (leftMKBps == rightMKBps)
|
||||
{
|
||||
return (lanes < right.lanes);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (leftMKBps < rightMKBps);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
#endif //INCLUDED_DP_LINKCONFIG_H
|
||||
143
src/common/displayport/inc/dp_linkedlist.h
Normal file
143
src/common/displayport/inc/dp_linkedlist.h
Normal file
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2015-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_linkedlist.h *
|
||||
* A linked list that uses DislayPort::List as a backend, but which *
|
||||
* allocates the list backbone dynamically. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_LINKEDLIST_H
|
||||
#define INCLUDED_DP_LINKEDLIST_H
|
||||
|
||||
#include "dp_list.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
template<typename T>
|
||||
class LinkedList : public Object
|
||||
{
|
||||
// The Element class forms the list backbone and contains pointers to
|
||||
// each item in the list.
|
||||
class Element : public ListElement
|
||||
{
|
||||
public:
|
||||
Element(T *item) : item(item) { }
|
||||
T *item;
|
||||
};
|
||||
|
||||
List list;
|
||||
|
||||
// No public copy constructor.
|
||||
LinkedList(LinkedList &other) { }
|
||||
|
||||
// Find the Element containing an item.
|
||||
Element *containing(T *item)
|
||||
{
|
||||
for (ListElement *le = list.begin(); le != list.end(); le = le->next)
|
||||
{
|
||||
Element *e = static_cast<Element *>(le);
|
||||
if (e->item == item)
|
||||
return e;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
// The list starts out empty.
|
||||
LinkedList() { }
|
||||
|
||||
// Insert an item at the front of the list.
|
||||
void insertFront(T *item)
|
||||
{
|
||||
// Construct an element and add it to the list.
|
||||
Element *e = new Element(item);
|
||||
DP_ASSERT(e);
|
||||
if (e)
|
||||
{
|
||||
list.insertFront(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove an item from the list.
|
||||
// O(n) to find the item to remove.
|
||||
// It is an error to try to remove an item that is not in the list.
|
||||
void remove(T *item)
|
||||
{
|
||||
Element *e = containing(item);
|
||||
DP_ASSERT(e && "Item was not a member of the list");
|
||||
delete e;
|
||||
}
|
||||
|
||||
// Find the next item in the list after the specified item. If item is
|
||||
// NULL, this returns the first item.
|
||||
T *next(T *prev)
|
||||
{
|
||||
if (list.isEmpty())
|
||||
return NULL;
|
||||
|
||||
// If prev is NULL or not in the list, return the first item.
|
||||
Element *e = containing(prev);
|
||||
if (!e)
|
||||
{
|
||||
e = static_cast<Element *>(list.begin());
|
||||
return e->item;
|
||||
}
|
||||
else if (e->next != list.end())
|
||||
{
|
||||
e = static_cast<Element *>(e->next);
|
||||
return e->item;
|
||||
}
|
||||
else
|
||||
{
|
||||
// prev was the last element in the list.
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Query whether an item is a member of the list.
|
||||
// O(n)
|
||||
bool contains(T *item)
|
||||
{
|
||||
Element *e = containing(item);
|
||||
return e != NULL;
|
||||
}
|
||||
|
||||
bool isEmpty()
|
||||
{
|
||||
return list.isEmpty();
|
||||
}
|
||||
|
||||
T *pop()
|
||||
{
|
||||
DP_ASSERT(!list.isEmpty());
|
||||
Element *e = static_cast<Element *>(list.last());
|
||||
T *item = e->item;
|
||||
delete e;
|
||||
return item;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // INCLUDED_DP_LINKEDLIST_H
|
||||
84
src/common/displayport/inc/dp_list.h
Normal file
84
src/common/displayport/inc/dp_list.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_list.h *
|
||||
* Simple doubly linked list queue *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_LIST_H
|
||||
#define INCLUDED_DP_LIST_H
|
||||
|
||||
#include "dp_object.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// List is an intrusive container, it may
|
||||
// only contain elements that derive from ListElement
|
||||
//
|
||||
// NOTE! Deleting an element automatically unlinks it
|
||||
// from the enclosing container.
|
||||
//
|
||||
struct ListElement : virtual public Object
|
||||
{
|
||||
ListElement * next, * prev;
|
||||
|
||||
ListElement();
|
||||
virtual ~ListElement();
|
||||
};
|
||||
|
||||
|
||||
class List : public ListElement
|
||||
{
|
||||
public:
|
||||
bool isEmpty();
|
||||
void insertFront(ListElement * item);
|
||||
void insertBack(ListElement * item);
|
||||
void insertBefore(ListElement * insertBeforeThis, ListElement * item);
|
||||
void clear();
|
||||
ListElement* front();
|
||||
ListElement* last();
|
||||
|
||||
ListElement* begin() { return this->next; }
|
||||
ListElement* end() { return this; }
|
||||
|
||||
static ListElement * remove(ListElement * item); // Removes but does not delete
|
||||
bool contains(ListElement * item);
|
||||
ListElement * replace(ListElement * replacement, ListElement * replacee);
|
||||
List();
|
||||
~List();
|
||||
|
||||
unsigned size()
|
||||
{
|
||||
unsigned count = 0;
|
||||
for (ListElement * i = begin(); i!=end(); i = i->next)
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_LIST_H
|
||||
276
src/common/displayport/inc/dp_mainlink.h
Normal file
276
src/common/displayport/inc/dp_mainlink.h
Normal file
@@ -0,0 +1,276 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* List **************************************\
|
||||
* *
|
||||
* Module: dp_mainlink.h *
|
||||
* Mainlink interface implemented by client. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_MAINLINK_H
|
||||
#define INCLUDED_DP_MAINLINK_H
|
||||
|
||||
#include "dp_linkconfig.h"
|
||||
#include "dp_vrr.h"
|
||||
#include "dp_wardatabase.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "displayport.h"
|
||||
#include "ctrl/ctrl0073/ctrl0073dp.h"
|
||||
#include "dp_regkeydatabase.h"
|
||||
|
||||
#define HDCP_DUMMY_CN (0x1)
|
||||
#define HDCP_DUMMY_CKSV (0xFFFFF)
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
typedef enum
|
||||
{
|
||||
NONE, //Abort it manually
|
||||
UNTRUST, //Abort due to Kp mismatch
|
||||
UNRELBL, //Abort due to repeated link failure
|
||||
KSV_LEN, //Abort due to KSV length
|
||||
KSV_SIG, //Abort due to KSV signature
|
||||
SRM_SIG, //Abort due to SRM signature
|
||||
SRM_REV, //Abort due to SRM revocation
|
||||
NORDY, //Abort due to repeater not ready
|
||||
KSVTOP, //Abort due to KSV topology error
|
||||
BADBKSV //Abort due to invalid Bksv
|
||||
}AbortAuthReason;
|
||||
|
||||
// This is also used for DPCD offset 10B. 249
|
||||
enum LinkQualityPatternType
|
||||
{
|
||||
LINK_QUAL_DISABLED,
|
||||
LINK_QUAL_D10_2,
|
||||
LINK_QUAL_SYM_ERROR,
|
||||
LINK_QUAL_PRBS7,
|
||||
LINK_QUAL_80BIT_CUST,
|
||||
LINK_QUAL_HBR2_COMPLIANCE_EYE,
|
||||
LINK_QUAL_CP2520PAT3,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LinkQualityPatternType lqsPattern;
|
||||
|
||||
//
|
||||
// 80 bits DP CSTM Test Pattern data;
|
||||
// ctsmLower takes bits 31:0 (lowest 32 bits)
|
||||
// ctsmMiddle takes bits 63:32 (middle 32 bits)
|
||||
// ctsmUpper takes bits 79:64 (highest 16 bits)
|
||||
//
|
||||
int ctsmLower;
|
||||
int ctsmMiddle;
|
||||
int ctsmUpper;
|
||||
} PatternInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char bcaps;
|
||||
unsigned char bksv[5];
|
||||
bool hdcpCapable;
|
||||
unsigned char updMask;
|
||||
}RmDfpCache;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NORMAL_LINK_TRAINING, // full LT
|
||||
NO_LINK_TRAINING,
|
||||
FAST_LINK_TRAINING,
|
||||
}LinkTrainingType;
|
||||
|
||||
class MainLink : virtual public Object
|
||||
{
|
||||
public:
|
||||
virtual bool physicalLayerSetTestPattern(PatternInfo * patternInfo) = 0;
|
||||
//
|
||||
// Wrappers for existing link training RM control calls
|
||||
//
|
||||
virtual bool train(const LinkConfiguration & link, bool force, LinkTrainingType linkTrainingType,
|
||||
LinkConfiguration *retLink, bool bSkipLt = false, bool isPostLtAdjRequestGranted = false,
|
||||
unsigned phyRepeaterCount = 0) = 0;
|
||||
|
||||
// RM control call to retrieve buffer from RM for DP Library to dump logs
|
||||
virtual bool retrieveRingBuffer(NvU8 dpRingBuffertype, NvU32 numRecords) = 0;
|
||||
|
||||
//
|
||||
// Requests to DD to perform pre & post link training steps
|
||||
// which may disconnect and later reconnect the head (For Pre-gf119 GPUs)
|
||||
//
|
||||
virtual void preLinkTraining(NvU32 head) = 0;
|
||||
virtual void postLinkTraining(NvU32 head) = 0;
|
||||
virtual NvU32 getRegkeyValue(const char *key) = 0;
|
||||
virtual const DP_REGKEY_DATABASE& getRegkeyDatabase() = 0;
|
||||
virtual NvU32 getSorIndex() = 0;
|
||||
virtual bool isInbandStereoSignalingSupported() = 0;
|
||||
|
||||
|
||||
virtual bool isEDP() = 0;
|
||||
virtual bool supportMSAOverMST() = 0;
|
||||
virtual bool isForceRmEdidRequired() = 0;
|
||||
virtual bool fetchEdidByRmCtrl(NvU8* edidBuffer, NvU32 bufferSize) = 0;
|
||||
virtual bool applyEdidOverrideByRmCtrl(NvU8* edidBuffer, NvU32 bufferSize) = 0;
|
||||
|
||||
// Return if Panel is Dynamic MUX capable
|
||||
virtual bool isDynamicMuxCapable() = 0;
|
||||
|
||||
// Return the current mux state. Returns false if not mux capable
|
||||
virtual bool getDynamicMuxState(NvU32 *muxState) = 0;
|
||||
|
||||
// Return if Internal panel is Dynamic Mux capable
|
||||
virtual bool isInternalPanelDynamicMuxCapable() = 0;
|
||||
|
||||
// Check if we should skip power down eDP when head detached.
|
||||
virtual bool skipPowerdownEdpPanelWhenHeadDetach() = 0;
|
||||
|
||||
// Check if we should skip reading PCON Caps in MST case.
|
||||
virtual bool isMSTPCONCapsReadDisabled() = 0;
|
||||
|
||||
// Get GPU DSC capabilities
|
||||
virtual void getDscCaps(bool *pbDscSupported = NULL,
|
||||
unsigned *pEncoderColorFormatMask = NULL,
|
||||
unsigned *pLineBufferSizeKB = NULL,
|
||||
unsigned *pRateBufferSizeKB = NULL,
|
||||
unsigned *pBitsPerPixelPrecision = NULL,
|
||||
unsigned *pMaxNumHztSlices = NULL,
|
||||
unsigned *pLineBufferBitDepth = NULL) = 0;
|
||||
|
||||
//
|
||||
// Get the current link config.
|
||||
// (Used for the boot case where EFI/VBIOS may have already trained
|
||||
// the link. We need this to confirm the programming since
|
||||
// we cannot rely on the DPCD registers being correct or sane)
|
||||
//
|
||||
virtual void getLinkConfig(unsigned &laneCount, NvU64 & linkRate) = 0;
|
||||
|
||||
// Get the current link config with FEC
|
||||
virtual void getLinkConfigWithFEC(unsigned &laneCount, NvU64 &linkRate, bool &bFECEnable) {};
|
||||
// Get the max link config from UEFI.
|
||||
virtual bool getMaxLinkConfigFromUefi(NvU8 &linkRate, NvU8 &laneCount) = 0;
|
||||
//
|
||||
// Query if a head is attached to this DisplayId
|
||||
//
|
||||
virtual bool isActive() = 0;
|
||||
|
||||
virtual bool hasIncreasedWatermarkLimits() = 0;
|
||||
virtual bool hasMultistream() = 0;
|
||||
virtual bool isPC2Disabled() = 0;
|
||||
virtual NvU32 getGpuDpSupportedVersions() = 0;
|
||||
virtual bool isStreamCloningEnabled() = 0;
|
||||
virtual bool isDpTunnelingHwBugWarEnabled() = 0;
|
||||
virtual NvU32 maxLinkRateSupported() = 0;
|
||||
virtual bool isLttprSupported() = 0;
|
||||
virtual bool isFECSupported() = 0;
|
||||
|
||||
virtual bool setDpMSAParameters(bool bStereoEnable, const NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS &msaparams) = 0;
|
||||
virtual bool setDpStereoMSAParameters(bool bStereoEnable, const NV0073_CTRL_CMD_DP_SET_MSA_PROPERTIES_PARAMS &msaparams) = 0;
|
||||
virtual bool setFlushMode() = 0;
|
||||
virtual void clearFlushMode(unsigned headMask, bool testMode=false) = 0;
|
||||
|
||||
//
|
||||
// HDCP Renegotiate and trigger ACT.
|
||||
//
|
||||
virtual void configureHDCPRenegotiate(NvU64 cN = HDCP_DUMMY_CN, NvU64 cKsv = HDCP_DUMMY_CKSV, bool bForceReAuth = false, bool bRxIDMsgPending = false) = 0;
|
||||
// HDCP set ECF
|
||||
virtual void configureAndTriggerECF(NvU64 ecf, NvBool bForceClearEcf = NV_FALSE, NvBool bAddStreamBack = NV_FALSE) = 0;
|
||||
//
|
||||
// Enable of disable alternate scrambler SR (ASSR)
|
||||
//
|
||||
// (used for embedded displayport)
|
||||
virtual void disableAlternateScramblerReset() = 0;
|
||||
virtual void configureHDCPDisableAuthentication() = 0;
|
||||
virtual void configureHDCPAbortAuthentication(AbortAuthReason abortAuthReason) = 0;
|
||||
virtual bool setStreamType(unsigned streamIndex, NvU8 streamType, bool * bNeedReNegotiate) = 0;
|
||||
virtual void configureHDCPValidateLink(HDCPValidateData &hdcpValidateData, NvU64 cN = HDCP_DUMMY_CN, NvU64 cKsv = HDCP_DUMMY_CKSV) = 0;
|
||||
virtual void forwardPendingKsvListReady(NvBool bKsvListReady) = 0;
|
||||
virtual void triggerACT() = 0;
|
||||
virtual void configureHDCPGetHDCPState(HDCPState &hdcpState) = 0;
|
||||
|
||||
virtual NvU32 headToStream(NvU32 head, bool bSidebandMessageSupported,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY) = 0;
|
||||
|
||||
virtual void configureSingleStream(NvU32 head,
|
||||
NvU32 hBlankSym,
|
||||
NvU32 vBlankSym,
|
||||
bool bEnhancedFraming,
|
||||
NvU32 tuSize,
|
||||
NvU32 waterMark,
|
||||
DP_COLORFORMAT colorFormat,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamId = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE singleHeadMultistreamMode = DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE,
|
||||
bool bEnableAudioOverRightPanel = false,
|
||||
bool bEnable2Head1Or = false)= 0;
|
||||
|
||||
virtual void configureMultiStream(NvU32 head,
|
||||
NvU32 hBlankSym,
|
||||
NvU32 vBlankSym,
|
||||
NvU32 slotStart,
|
||||
NvU32 slotEnd,
|
||||
NvU32 PBN,
|
||||
NvU32 Timeslice,
|
||||
DP_COLORFORMAT colorFormat,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_MODE singleHeadMultistreamMode = DP_SINGLE_HEAD_MULTI_STREAM_MODE_NONE,
|
||||
bool bEnableAudioOverRightPanel = false,
|
||||
bool bEnable2Head1Or = false)= 0;
|
||||
|
||||
virtual void configureSingleHeadMultiStreamMode(NvU32 displayIDs[],
|
||||
NvU32 numStreams,
|
||||
NvU32 mode,
|
||||
bool bSetConfig,
|
||||
NvU8 vbiosPrimaryDispIdIndex = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY)= 0;
|
||||
|
||||
virtual void configureMsScratchRegisters(NvU32 address,
|
||||
NvU32 hopCount,
|
||||
NvU32 driverState) = 0;
|
||||
|
||||
virtual bool controlRateGoverning(NvU32 head, bool enable, bool updateNow = true) = 0;
|
||||
virtual bool getDpTestPattern(NV0073_CTRL_DP_TESTPATTERN * testPattern) = 0;
|
||||
virtual bool setDpTestPattern(NV0073_CTRL_DP_TESTPATTERN testPattern,
|
||||
NvU8 laneMask, NV0073_CTRL_DP_CSTM cstm,
|
||||
NvBool bIsHBR2, NvBool bSkipLaneDataOverride = false) = 0;
|
||||
virtual bool getDpLaneData(NvU32 *numLanes, NvU32 *data) = 0;
|
||||
virtual bool setDpLaneData(NvU32 numLanes, NvU32 *data) = 0;
|
||||
virtual bool rmUpdateDynamicDfpCache(NvU32 headIndex, RmDfpCache * dfpCache, NvBool bResetDfp) = 0;
|
||||
virtual void configurePowerState(bool bPowerUp) = 0;
|
||||
virtual NvU32 monitorDenylistInfo(NvU32 ManufacturerID, NvU32 ProductID, DpMonitorDenylistData *pDenylistData) = 0;
|
||||
virtual NvU32 getRootDisplayId() = 0;
|
||||
virtual NvU32 allocDisplayId() = 0;
|
||||
virtual bool freeDisplayId(NvU32 displayId) = 0;
|
||||
virtual bool queryGPUCapability() {return false;}
|
||||
virtual bool isAvoidHBR3WAREnabled() = 0;
|
||||
virtual bool queryAndUpdateDfpParams() = 0;
|
||||
virtual bool getEdpPowerData(bool *panelPowerOn, bool *bDPCDPowerStateD0) = 0;
|
||||
virtual bool vrrRunEnablementStage(unsigned stage, NvU32 *status) = 0;
|
||||
|
||||
virtual void configureTriggerSelect(NvU32 head,
|
||||
DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID streamIdentifier = DP_SINGLE_HEAD_MULTI_STREAM_PIPELINE_ID_PRIMARY) = 0;
|
||||
|
||||
virtual void configureTriggerAll(NvU32 head, bool enable) = 0;
|
||||
virtual bool dscCrcTransaction(NvBool bEnable, gpuDscCrc *data, NvU16 *headIndex){ return false; }
|
||||
virtual bool configureLinkRateTable(const NvU16 *pLinkRateTable, LinkRates *pLinkRates) = 0;
|
||||
virtual bool configureFec(const bool bEnableFec) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_MAINLINK_H
|
||||
148
src/common/displayport/inc/dp_merger.h
Normal file
148
src/common/displayport/inc/dp_merger.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_merger.h *
|
||||
* Asynchronous Message merger *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_MERGER_H
|
||||
#define INCLUDED_DP_MERGER_H
|
||||
|
||||
#include "dp_list.h"
|
||||
#include "dp_auxretry.h"
|
||||
#include "dp_timer.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_address.h"
|
||||
#include "dp_messageheader.h"
|
||||
#include "dp_configcaps.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
// after 4 secs delete dead transactions
|
||||
#define DP_INCOMPLETE_MESSAGE_TIMEOUT_USEC 4000000
|
||||
struct EncodedMessage;
|
||||
|
||||
class MessageTransactionMerger : virtual public Object
|
||||
{
|
||||
class IncompleteMessage : public ListElement
|
||||
{
|
||||
public:
|
||||
EncodedMessage message;
|
||||
NvU64 lastUpdated;
|
||||
|
||||
};
|
||||
|
||||
List incompleteMessages;
|
||||
Timer * timer;
|
||||
NvU64 incompleteMessageTimeoutMs;
|
||||
IncompleteMessage * freeOnNextCall; // we don't need to delete it on destruct
|
||||
// since this is ALSO a member of the list we own
|
||||
|
||||
IncompleteMessage * getTransactionRecord(const Address & address, unsigned messageNumber);
|
||||
public:
|
||||
MessageTransactionMerger(Timer * timer, unsigned incompleteMessageTimeoutMs)
|
||||
: timer(timer), incompleteMessageTimeoutMs(incompleteMessageTimeoutMs), freeOnNextCall(0)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Pushes data into the queue and returns an encoded
|
||||
// message if an entire message is assembled.
|
||||
//
|
||||
EncodedMessage * pushTransaction(MessageHeader * header, Buffer * data);
|
||||
};
|
||||
|
||||
class IncomingTransactionManager : virtual public Object
|
||||
{
|
||||
public:
|
||||
class IncomingTransactionManagerEventSink
|
||||
{
|
||||
public:
|
||||
virtual void messagedReceived(IncomingTransactionManager * from, EncodedMessage * message) = 0;
|
||||
};
|
||||
|
||||
void mailboxInterrupt();
|
||||
|
||||
//
|
||||
// Create a message merger object
|
||||
// - sink is called whenever a new message is received
|
||||
// Callback::fired is passed an IncompleteMessage as the data arg.
|
||||
//
|
||||
IncomingTransactionManager(Timer * timerInterface, const Address & addressPrefix, IncomingTransactionManagerEventSink * sink);
|
||||
virtual ~IncomingTransactionManager();
|
||||
|
||||
protected:
|
||||
virtual AuxRetry::status readMessageBox(NvU32 offset, NvU8 * data, size_t length) = 0;
|
||||
virtual size_t getMessageBoxSize() = 0;
|
||||
virtual size_t getTransactionSize() = 0;
|
||||
virtual void clearMessageBoxInterrupt() = 0;
|
||||
private:
|
||||
MessageTransactionMerger incompleteMessages; // List<IncompleteMessage>
|
||||
|
||||
Buffer localWindow;
|
||||
Timer * timer;
|
||||
IncomingTransactionManagerEventSink * sink;
|
||||
Address addressPrefix; // This is the aux address of the downstream port
|
||||
// This field will be prepended to the address decoded.
|
||||
};
|
||||
|
||||
class DownReplyManager : public IncomingTransactionManager
|
||||
{
|
||||
public:
|
||||
DownReplyManager(DPCDHAL * hal, Timer * timer, const Address & addressPrefix, IncomingTransactionManagerEventSink * sink)
|
||||
: IncomingTransactionManager(timer, addressPrefix, sink), hal(hal)
|
||||
{
|
||||
}
|
||||
virtual ~DownReplyManager() {}
|
||||
|
||||
protected:
|
||||
DPCDHAL * hal;
|
||||
|
||||
virtual AuxRetry::status readMessageBox(NvU32 offset, NvU8 * data, size_t length);
|
||||
virtual size_t getMessageBoxSize();
|
||||
virtual size_t getTransactionSize();
|
||||
virtual void clearMessageBoxInterrupt();
|
||||
};
|
||||
|
||||
class UpRequestManager : public IncomingTransactionManager
|
||||
{
|
||||
public:
|
||||
UpRequestManager(DPCDHAL * hal, Timer * timer, const Address & addressPrefix, IncomingTransactionManagerEventSink * sink)
|
||||
: IncomingTransactionManager(timer, addressPrefix, sink), hal(hal)
|
||||
{
|
||||
}
|
||||
virtual ~UpRequestManager() {}
|
||||
protected:
|
||||
DPCDHAL * hal;
|
||||
|
||||
virtual AuxRetry::status readMessageBox(NvU32 offset, NvU8 * data, size_t length);
|
||||
virtual size_t getMessageBoxSize();
|
||||
virtual size_t getTransactionSize();
|
||||
virtual void clearMessageBoxInterrupt();
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_MERGER_H
|
||||
663
src/common/displayport/inc/dp_messagecodings.h
Normal file
663
src/common/displayport/inc/dp_messagecodings.h
Normal file
@@ -0,0 +1,663 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_messagecodings.h *
|
||||
* Encoding routines for various messages. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_MESSAGECODINGS_H
|
||||
#define INCLUDED_DP_MESSAGECODINGS_H
|
||||
|
||||
#include "dp_messages.h"
|
||||
#include "displayport.h"
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
/* Fields for the HDCP stream status */
|
||||
#define NV_DP_HDCP_STREAM_STATE 1:0
|
||||
#define NV_DP_HDCP_STREAM_STATE_NO_EXIST (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_STATE_NOT_ACTIVE (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_STATE_ACTIVE (0x00000002)
|
||||
#define NV_DP_HDCP_STREAM_STATE_ERROR (0x00000003)
|
||||
#define NV_DP_HDCP_STREAM_REPEATER 2:2
|
||||
#define NV_DP_HDCP_STREAM_REPEATER_SIMPLE (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_REPEATER_REPEATER (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_ENCRYPTION 3:3
|
||||
#define NV_DP_HDCP_STREAM_ENCRYPTION_OFF (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_ENCRYPTION_ON (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_AUTHENTICATION 4:4
|
||||
#define NV_DP_HDCP_STREAM_AUTHENTICATION_OFF (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_AUTHENTICATION_IP (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_AUTHENTICATION_ON (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_LEGACY 8:8
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_LEGACY_NO (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_LEGACY_YES (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_NON_DP1_2_CP 9:9
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_NON_DP1_2_CP_NO (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_NON_DP1_2_CP_YES (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_MULTI 10:10
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_MULTI_NO (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_SINK_MULTI_YES (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP1X 11:11
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP1X_NO (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP1X_YES (0x00000001)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP2X 12:12
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP2X_NO (0x00000000)
|
||||
#define NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP2X_YES (0x00000001)
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
typedef NakData Message_NakData;
|
||||
|
||||
enum
|
||||
{
|
||||
REMOTE_READ_BUFFER_SIZE = 128,
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
None,
|
||||
UpstreamSourceOrSSTBranch,
|
||||
DownstreamBranch,
|
||||
DownstreamSink,
|
||||
Dongle
|
||||
}PeerDevice;
|
||||
|
||||
struct I2cWriteTransaction
|
||||
{
|
||||
I2cWriteTransaction(unsigned WriteI2cDeviceId, unsigned NumBytes,
|
||||
unsigned char * buffer, bool NoStopBit = false,
|
||||
unsigned I2cTransactionDelay = 0);
|
||||
I2cWriteTransaction();
|
||||
unsigned WriteI2cDeviceId;
|
||||
unsigned NumBytes;
|
||||
unsigned char *I2cData;
|
||||
bool NoStopBit;
|
||||
unsigned I2cTransactionDelay;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DoesNotExist = 0,
|
||||
NotActive = 1,
|
||||
Active = 2,
|
||||
}StreamState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CP_IRQ_ON = 0,
|
||||
No_EVENT = 1
|
||||
}StreamEvent;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STREAM_BEHAVIOUR_MASK_OFF = 0,
|
||||
STREAM_BEHAVIOUR_MASK_ON = 1
|
||||
}StreamBehaviorMask;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STREAM_EVENT_MASK_OFF = 0,
|
||||
STREAM_EVENT_MASK_ON = 1
|
||||
}StreamEventMask;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Force_Reauth = 0,
|
||||
BlockFlow = 1
|
||||
}StreamBehavior;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
StreamUnconnected = 0,
|
||||
NonAuthLegacyDevice = 1, // TV or CRT
|
||||
Non12CPOrNonQSE = 2, // DVI/HDMI or DP 1.1 sink/repeater
|
||||
DP_MST = 4
|
||||
}OutputSinkType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HDCP1x = 1,
|
||||
HDCP2x = 2
|
||||
}OutputCPType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SinkEvent0,
|
||||
SinkEvent255 = 0xFF
|
||||
}SinkEvent;
|
||||
|
||||
//
|
||||
// LINK_ADDRESS 0x1
|
||||
//
|
||||
class LinkAddressMessage : public MessageManager::Message
|
||||
{
|
||||
public:
|
||||
struct Result
|
||||
{
|
||||
bool isInputPort;
|
||||
PeerDevice peerDeviceType;
|
||||
unsigned portNumber;
|
||||
bool hasMessaging;
|
||||
bool dpPlugged;
|
||||
|
||||
bool legacyPlugged;
|
||||
unsigned dpcdRevisionMajor;
|
||||
unsigned dpcdRevisionMinor;
|
||||
GUID peerGUID;
|
||||
unsigned SDPStreams;
|
||||
unsigned SDPStreamSinks;
|
||||
};
|
||||
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
GUID guid; // originating branch device
|
||||
unsigned numberOfPorts;
|
||||
Result res[16];
|
||||
} reply;
|
||||
|
||||
public:
|
||||
LinkAddressMessage() : Message(NV_DP_SBMSG_REQUEST_ID_LINK_ADDRESS,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_2)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
// Second stage init kept separate from constructor (reusable message)
|
||||
void set(const Address & target);
|
||||
|
||||
void getGUID(GUID & guid){guid = reply.guid;}
|
||||
|
||||
// Number of ports described
|
||||
unsigned resultCount(){return reply.numberOfPorts;}
|
||||
const Result * result(unsigned index)
|
||||
{
|
||||
return &reply.res[index];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// CONNECTION_STATUS_NOTIFY 0x2
|
||||
//
|
||||
class ConnStatusNotifyMessage : public MessageManager::MessageReceiver
|
||||
{
|
||||
public:
|
||||
typedef struct
|
||||
{
|
||||
GUID guid;
|
||||
unsigned port;
|
||||
bool legacyPlugged;
|
||||
bool devicePlugged;
|
||||
bool messagingCapability;
|
||||
bool isInputPort;
|
||||
PeerDevice peerDeviceType;
|
||||
}Request;
|
||||
|
||||
protected:
|
||||
Request request;
|
||||
|
||||
public:
|
||||
Request * getUpRequestData(){ return &request; }
|
||||
virtual bool processByType(EncodedMessage * message, BitStreamReader * reader);
|
||||
ConnStatusNotifyMessage(MessageReceiverEventSink * sink);
|
||||
};
|
||||
|
||||
//
|
||||
// GENERIC_UP_REPLY 0xnn
|
||||
//
|
||||
class GenericUpReplyMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
virtual void expired(const void * tag)
|
||||
{ }
|
||||
|
||||
public:
|
||||
GenericUpReplyMessage(const Address & target, unsigned requestId,
|
||||
bool bReplyIsNack = false, bool bBroadcast = true,
|
||||
bool bPath = false);
|
||||
GenericUpReplyMessage(unsigned requestId, bool bReplyIsNack,
|
||||
bool bBroadcast, bool bPath);
|
||||
void set(const Address & target, bool bReplyIsNack = false,
|
||||
bool bBroadcast = true, bool bPath = false);
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// CLEAR_PAYLOAD_ID_TABLE 0x14
|
||||
//
|
||||
class ClearPayloadIdTableMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
virtual ParseResponseStatus parseResponse(EncodedMessage * message);
|
||||
public:
|
||||
ClearPayloadIdTableMessage();
|
||||
};
|
||||
|
||||
//
|
||||
// ENUM_PATH_RESOURCES 0x10
|
||||
//
|
||||
class EnumPathResMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
public:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
unsigned availableStreams;
|
||||
bool bFECCapability;
|
||||
unsigned TotalPBN;
|
||||
unsigned FreePBN;
|
||||
unsigned DFPLinkAvailablePBN;
|
||||
} reply;
|
||||
EnumPathResMessage(const Address & target, unsigned port, bool point);
|
||||
};
|
||||
|
||||
//
|
||||
// ALLOCATE_PAYLOAD 0x11
|
||||
//
|
||||
class AllocatePayloadMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
unsigned PBN;
|
||||
unsigned virtualChannelPayloadId;
|
||||
}reply;
|
||||
|
||||
public:
|
||||
|
||||
AllocatePayloadMessage() : Message(NV_DP_SBMSG_REQUEST_ID_ALLOCATE_PAYLOAD,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_4)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
unsigned nSDPStreams,
|
||||
unsigned vcPayloadId,
|
||||
unsigned PBN,
|
||||
unsigned* SDPStreamSink,
|
||||
bool entirePath);
|
||||
|
||||
unsigned replyPortNumber(){return reply.portNumber;}
|
||||
unsigned replyPBN(){return reply.PBN;}
|
||||
unsigned replyVirtualChannelPayloadId(){return reply.virtualChannelPayloadId;}
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// QUERY_PAYLOAD 0x12
|
||||
//
|
||||
class QueryPayloadMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
unsigned allocatedPBN;
|
||||
} reply;
|
||||
|
||||
public:
|
||||
QueryPayloadMessage(const Address & target,
|
||||
unsigned port,
|
||||
unsigned vcPayloadId);
|
||||
|
||||
unsigned replyPortNumber() {return reply.portNumber;}
|
||||
unsigned replyAllocatedPBN() {return reply.allocatedPBN;}
|
||||
};
|
||||
|
||||
//
|
||||
// RESOURCE_STATUS_NOTIFY 0x13
|
||||
//
|
||||
class ResStatusNotifyMessage : public MessageManager::MessageReceiver
|
||||
{
|
||||
virtual bool processByType(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
public:
|
||||
struct
|
||||
{
|
||||
unsigned port;
|
||||
unsigned availableStreams;
|
||||
bool bFECCapability;
|
||||
GUID guid;
|
||||
unsigned PBN;
|
||||
} request;
|
||||
|
||||
public:
|
||||
ResStatusNotifyMessage(MessageReceiverEventSink * sink);
|
||||
};
|
||||
|
||||
//
|
||||
// REMOTE_DPCD_READ 0x20
|
||||
//
|
||||
class RemoteDpcdReadMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
unsigned numBytesReadDPCD;
|
||||
unsigned char readData[REMOTE_READ_BUFFER_SIZE]; // Buffer
|
||||
} reply;
|
||||
|
||||
public:
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
unsigned dpcdAddress,
|
||||
unsigned nBytesToRead);
|
||||
|
||||
RemoteDpcdReadMessage() : Message(NV_DP_SBMSG_REQUEST_ID_REMOTE_DPCD_READ,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
|
||||
unsigned replyPortNumber(){return reply.portNumber;}
|
||||
unsigned replyNumOfBytesReadDPCD(){return reply.numBytesReadDPCD;}
|
||||
|
||||
const NvU8 * replyGetData()
|
||||
{
|
||||
return reply.readData;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// REMOTE_DPCD_WRITE 0x21
|
||||
//
|
||||
class RemoteDpcdWriteMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
public:
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
unsigned dpcdAddress,
|
||||
unsigned nBytesToWrite,
|
||||
const NvU8 * writeData);
|
||||
|
||||
RemoteDpcdWriteMessage() : Message(NV_DP_SBMSG_REQUEST_ID_REMOTE_DPCD_WRITE,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3) {}
|
||||
};
|
||||
|
||||
//
|
||||
// REMOTE_I2C_READ 0x22
|
||||
//
|
||||
class RemoteI2cReadMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
unsigned numBytesReadI2C;
|
||||
unsigned char readData[REMOTE_READ_BUFFER_SIZE];
|
||||
} reply;
|
||||
|
||||
public:
|
||||
|
||||
RemoteI2cReadMessage() : Message(NV_DP_SBMSG_REQUEST_ID_REMOTE_I2C_READ,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned nWriteTransactions,
|
||||
unsigned port,
|
||||
I2cWriteTransaction* transactions,
|
||||
unsigned readI2cDeviceId,
|
||||
unsigned nBytesToRead);
|
||||
|
||||
unsigned replyPortNumber(){return reply.portNumber;}
|
||||
unsigned replyNumOfBytesReadI2C(){return reply.numBytesReadI2C;}
|
||||
unsigned char* replyGetI2CData(unsigned* numBytes)
|
||||
{
|
||||
*numBytes = this->replyNumOfBytesReadI2C();
|
||||
return reply.readData;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// REMOTE_I2C_WRITE 0x23
|
||||
//
|
||||
class RemoteI2cWriteMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
} reply;
|
||||
|
||||
public:
|
||||
|
||||
RemoteI2cWriteMessage() : Message(NV_DP_SBMSG_REQUEST_ID_REMOTE_I2C_WRITE,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
unsigned writeI2cDeviceId,
|
||||
unsigned nBytesToWrite,
|
||||
unsigned char* writeData);
|
||||
|
||||
unsigned replyPortNumber() {return reply.portNumber;}
|
||||
};
|
||||
|
||||
//
|
||||
// POWER_UP_PHY 0x24
|
||||
//
|
||||
class PowerUpPhyMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
} reply;
|
||||
|
||||
public:
|
||||
PowerUpPhyMessage() : Message(NV_DP_SBMSG_REQUEST_ID_POWER_UP_PHY,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
bool entirePath);
|
||||
|
||||
unsigned replyPortNumber(){return reply.portNumber;}
|
||||
};
|
||||
|
||||
//
|
||||
// POWER_DOWN_PHY 0x25
|
||||
//
|
||||
class PowerDownPhyMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct
|
||||
{
|
||||
unsigned portNumber;
|
||||
} reply;
|
||||
|
||||
public:
|
||||
PowerDownPhyMessage() : Message(NV_DP_SBMSG_REQUEST_ID_POWER_DOWN_PHY,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned port,
|
||||
bool entirePath);
|
||||
|
||||
unsigned replyPortNumber(){return reply.portNumber;}
|
||||
};
|
||||
|
||||
//
|
||||
// SINK_EVENT_NOTIFY 0x30
|
||||
//
|
||||
class SinkEventNotifyMessage : public MessageManager::MessageReceiver
|
||||
{
|
||||
virtual bool processByType(EncodedMessage * message, BitStreamReader * reader);
|
||||
|
||||
public:
|
||||
SinkEventNotifyMessage(MessageReceiverEventSink * sink, unsigned requestId);
|
||||
};
|
||||
|
||||
//
|
||||
// QUERY_STREAM_ENCRYPTION_STATUS 0x38
|
||||
//
|
||||
class QueryStreamEncryptionMessage : public MessageManager::Message
|
||||
{
|
||||
virtual ParseResponseStatus parseResponseAck(EncodedMessage * message,
|
||||
BitStreamReader * reader);
|
||||
|
||||
private:
|
||||
struct QSES_REPLY
|
||||
{
|
||||
StreamState streamState;
|
||||
bool repeaterFuncPresent;
|
||||
bool encryption;
|
||||
bool authentication;
|
||||
OutputSinkType sinkType;
|
||||
OutputCPType cpType;
|
||||
bool signedLPrime;
|
||||
NvU8 streamId;
|
||||
} reply;
|
||||
|
||||
bool bIsHdcp22Qse;
|
||||
|
||||
public:
|
||||
QueryStreamEncryptionMessage() :
|
||||
Message(NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT)
|
||||
{
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
bIsHdcp22Qse = false;
|
||||
}
|
||||
|
||||
void set(const Address & target,
|
||||
unsigned streamId,
|
||||
NvU8* clientId,
|
||||
StreamEvent streamEvent,
|
||||
bool streamEventMask,
|
||||
StreamBehavior streamBehavior,
|
||||
bool streamBehaviorMask);
|
||||
NvU8 getStreamId()
|
||||
{
|
||||
return reply.streamId;
|
||||
}
|
||||
|
||||
void getReply(void *p)
|
||||
{
|
||||
*(struct QSES_REPLY *)p = reply;
|
||||
}
|
||||
|
||||
NvU16 getStreamStatus()
|
||||
{
|
||||
NvU16 streamStatus = 0;
|
||||
|
||||
streamStatus = (NvU16)reply.streamState;
|
||||
|
||||
if (reply.repeaterFuncPresent)
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_REPEATER);
|
||||
if (reply.encryption)
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_ENCRYPTION);
|
||||
if (reply.authentication)
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_AUTHENTICATION);
|
||||
|
||||
if (reply.sinkType != StreamUnconnected)
|
||||
{
|
||||
if (reply.sinkType & DP_MST)
|
||||
{
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_OUTPUT_SINK_MULTI);
|
||||
}
|
||||
|
||||
if (reply.sinkType & Non12CPOrNonQSE)
|
||||
{
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_OUTPUT_SINK_NON_DP1_2_CP);
|
||||
}
|
||||
|
||||
if (reply.sinkType & NonAuthLegacyDevice)
|
||||
{
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_OUTPUT_SINK_LEGACY);
|
||||
}
|
||||
}
|
||||
|
||||
if (reply.cpType == HDCP1x)
|
||||
{
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP1X);
|
||||
}
|
||||
else if (reply.cpType == HDCP2x)
|
||||
{
|
||||
streamStatus |= 1 << (1 ? NV_DP_HDCP_STREAM_OUTPUT_CP_TYPE_HDCP2X);
|
||||
}
|
||||
|
||||
return streamStatus;
|
||||
|
||||
}
|
||||
|
||||
void setHdcp22Qse(bool bHdcp22Qse)
|
||||
{
|
||||
bIsHdcp22Qse = bHdcp22Qse;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_MESSAGECODINGS_H
|
||||
94
src/common/displayport/inc/dp_messageheader.h
Normal file
94
src/common/displayport/inc/dp_messageheader.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_messageheader.h *
|
||||
* DP message header parser *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_MESSAGEHEADER_H
|
||||
#define INCLUDED_DP_MESSAGEHEADER_H
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_auxretry.h"
|
||||
#include "dp_timer.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_address.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// User filled message structure
|
||||
//
|
||||
#define MAX_MESSAGE_SIZE 64
|
||||
struct EncodedMessage : public Object
|
||||
{
|
||||
unsigned messageNumber; // 0 or 1
|
||||
Address address; // target device for message (source for reply)
|
||||
Buffer buffer;
|
||||
bool isBroadcast;
|
||||
bool isPathMessage;
|
||||
|
||||
EncodedMessage()
|
||||
: messageNumber(0), isBroadcast(false), isPathMessage(false)
|
||||
{}
|
||||
|
||||
void swap(EncodedMessage & other)
|
||||
{
|
||||
swap_args(messageNumber, other.messageNumber);
|
||||
swap_args(address, other.address);
|
||||
swap_args(isBroadcast, other.isBroadcast);
|
||||
swap_args(isPathMessage, other.isPathMessage);
|
||||
buffer.swap(other.buffer);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Decoded message header
|
||||
//
|
||||
struct MessageHeader
|
||||
{
|
||||
Address address;
|
||||
unsigned messageNumber;
|
||||
unsigned payloadBytes;
|
||||
bool isBroadcast;
|
||||
bool isPathMessage;
|
||||
bool isTransactionStart;
|
||||
bool isTransactionEnd;
|
||||
unsigned headerSizeBits;
|
||||
};
|
||||
|
||||
bool decodeHeader(BitStreamReader * reader, MessageHeader * header, const Address & address);
|
||||
|
||||
//
|
||||
// Routines for maintaining a list of partially complete messages
|
||||
//
|
||||
|
||||
// after 4 secs delete dead transactions
|
||||
#define DP_INCOMPLETE_MESSAGE_TIMEOUT_USEC 4000000
|
||||
|
||||
}
|
||||
#endif //INCLUDED_DP_MESSAGEHEADER_H
|
||||
376
src/common/displayport/inc/dp_messages.h
Normal file
376
src/common/displayport/inc/dp_messages.h
Normal file
@@ -0,0 +1,376 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_messages.h *
|
||||
* Encoding routines for aux common messages. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_MESSAGES_H
|
||||
#define INCLUDED_DP_MESSAGES_H
|
||||
|
||||
#include "dp_address.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_splitter.h"
|
||||
#include "dp_merger.h"
|
||||
#include "dp_crc.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_connector.h"
|
||||
#include "dp_messageheader.h"
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
bool extractGUID(BitStreamReader * reader, GUID * guid);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NakUndefined,
|
||||
NakWriteFailure,
|
||||
NakInvalidRAD,
|
||||
NakCrcFailure,
|
||||
NakBadParam,
|
||||
NakDefer,
|
||||
NakLinkFailure,
|
||||
NakNoResources,
|
||||
NakDpcdFail,
|
||||
NakI2cNak,
|
||||
NakAllocateFail,
|
||||
|
||||
// Extensions
|
||||
NakTimeout = 0x100 // Message was unable to be transmitted
|
||||
|
||||
} NakReason;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GUID guid;
|
||||
NakReason reason;
|
||||
unsigned nak_data;
|
||||
} NakData;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ParseResponseSuccess,
|
||||
ParseResponseFailed,
|
||||
ParseResponseWrong
|
||||
} ParseResponseStatus;
|
||||
|
||||
//
|
||||
// Priority levels are defined to prioritize SBMs for DP1.4 (Highest Priority - LEVEL1, Lowest Priority - DEFAULT)
|
||||
// Current implementation has the following priority levels
|
||||
// CLEAR_PAYLOAD_ID_TABLE = NV_DP_SBMSG_PRIORITY_LEVEL_1
|
||||
// LINK_ADDRESS = NV_DP_SBMSG_PRIORITY_LEVEL_2
|
||||
// REMOTE_DPCD_READ, REMOTE_DPCD_WRITE = NV_DP_SBMSG_PRIORITY_LEVEL_3
|
||||
// REMOTE_I2C_READ, REMOTE_I2C_WRITE = NV_DP_SBMSG_PRIORITY_LEVEL_3
|
||||
// POWER_UP_PHY, POWER_DOWN_PHY = NV_DP_SBMSG_PRIORITY_LEVEL_3
|
||||
// ENUM_PATH_RESOURCES, ALLOCATE_PAYLOAD = NV_DP_SBMSG_PRIORITY_LEVEL_4
|
||||
// All other messages = NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT
|
||||
//
|
||||
// However, Message::setMessagePriority can be used to override this priority levels, if required.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_4,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_3,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_2,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_1,
|
||||
} DPSideBandMessagePriority;
|
||||
|
||||
//
|
||||
// CLASS: MessageManager
|
||||
//
|
||||
class MessageManager :
|
||||
virtual public Object,
|
||||
IncomingTransactionManager::IncomingTransactionManagerEventSink
|
||||
{
|
||||
|
||||
Timer * timer;
|
||||
DPCDHAL * hal;
|
||||
DownRequestManager splitterDownRequest;
|
||||
UpReplyManager splitterUpReply;
|
||||
UpRequestManager mergerUpRequest;
|
||||
DownReplyManager mergerDownReply;
|
||||
bool isBeingDestroyed;
|
||||
bool isPaused;
|
||||
|
||||
List messageReceivers;
|
||||
List notYetSentDownRequest; // Down Messages yet to be processed
|
||||
List notYetSentUpReply; // Up Reply Messages yet to be processed
|
||||
List awaitingReplyDownRequest; // Transmitted, Split, but not yet replied to
|
||||
|
||||
void onUpRequestReceived(bool status, EncodedMessage * message);
|
||||
void onDownReplyReceived(bool status, EncodedMessage * message);
|
||||
void transmitAwaitingDownRequests();
|
||||
void transmitAwaitingUpReplies();
|
||||
|
||||
// IncomingTransactionManager
|
||||
void messagedReceived(IncomingTransactionManager * from, EncodedMessage * message);
|
||||
|
||||
public:
|
||||
class Message;
|
||||
void cancelAllByType(unsigned type);
|
||||
void cancelAll(Message * message);
|
||||
|
||||
void pause()
|
||||
{
|
||||
isPaused = true;
|
||||
}
|
||||
|
||||
void clearPendingMsg()
|
||||
{
|
||||
hal->clearPendingMsg();
|
||||
}
|
||||
void IRQUpReqest()
|
||||
{
|
||||
mergerUpRequest.mailboxInterrupt();
|
||||
}
|
||||
|
||||
void IRQDownReply()
|
||||
{
|
||||
mergerDownReply.mailboxInterrupt();
|
||||
}
|
||||
|
||||
void clearNotYetSentQSEDownRequest()
|
||||
{
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next; // Do this first since we may unlink the current node
|
||||
|
||||
if (m->requestIdentifier ==
|
||||
NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS)
|
||||
{
|
||||
notYetSentDownRequest.remove(m);
|
||||
m->parent = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool isAnyAwaitingQSEReplyDownRequest()
|
||||
{
|
||||
bool bQSEAwaiting = false;
|
||||
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next; // Do this first since we may unlink the current node
|
||||
|
||||
if (m->requestIdentifier ==
|
||||
NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS)
|
||||
{
|
||||
// We break because there could be only one outstanding QSE message at any time.
|
||||
bQSEAwaiting = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return bQSEAwaiting;
|
||||
}
|
||||
|
||||
void clearAwaitingQSEReplyDownRequest()
|
||||
{
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next; // Do this first since we may unlink the current node
|
||||
|
||||
if (m->requestIdentifier ==
|
||||
NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS)
|
||||
{
|
||||
awaitingReplyDownRequest.remove(m);
|
||||
m->parent = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
MessageManager(DPCDHAL * hal, Timer * timer)
|
||||
: timer(timer), hal(hal),
|
||||
splitterDownRequest(hal, timer),
|
||||
splitterUpReply(hal, timer),
|
||||
mergerUpRequest(hal, timer, Address(0), this),
|
||||
mergerDownReply(hal, timer, Address(0), this),
|
||||
isBeingDestroyed(false), isPaused(false)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// CLASS: MessageReceiver
|
||||
//
|
||||
class MessageReceiver : public ListElement, OutgoingTransactionManager::OutgoingTransactionManagerEventSink
|
||||
{
|
||||
public:
|
||||
class MessageReceiverEventSink
|
||||
{
|
||||
public:
|
||||
virtual void messageProcessed(MessageReceiver * from) = 0;
|
||||
};
|
||||
|
||||
// Returns false if the message should be passed to the next receiver
|
||||
virtual bool process(EncodedMessage * message);
|
||||
|
||||
// per message type should implement this
|
||||
virtual bool processByType(EncodedMessage * message, BitStreamReader * reader) = 0;
|
||||
|
||||
unsigned getRequestId() {return requestId;}
|
||||
Address & getAddress() {return address;}
|
||||
|
||||
MessageReceiver(MessageReceiverEventSink* sink, unsigned requestId)
|
||||
: sink(sink),
|
||||
requestId(requestId),
|
||||
bProcessed(true),
|
||||
address(0) // 0 to start with
|
||||
{}
|
||||
|
||||
virtual void splitterFailed(OutgoingTransactionManager * from)
|
||||
{
|
||||
DP_ASSERT(0 && "why did we send a reply");
|
||||
}
|
||||
|
||||
virtual void splitterTransmitted(OutgoingTransactionManager * from)
|
||||
{
|
||||
DP_ASSERT(0 && "why did we send a reply");
|
||||
}
|
||||
|
||||
protected:
|
||||
MessageReceiverEventSink * sink;
|
||||
unsigned requestId;
|
||||
bool bProcessed;
|
||||
Address address;
|
||||
MessageManager * parent;
|
||||
|
||||
};
|
||||
|
||||
//
|
||||
// CLASS: Message
|
||||
//
|
||||
class Message : public ListElement,
|
||||
OutgoingTransactionManager::OutgoingTransactionManagerEventSink,
|
||||
Timer::TimerCallback /* countdown timer for reply */
|
||||
{
|
||||
public:
|
||||
class MessageEventSink
|
||||
{
|
||||
public:
|
||||
virtual void messageFailed(Message * from, NakData * nakData) = 0;
|
||||
virtual void messageCompleted(Message * from) = 0;
|
||||
};
|
||||
unsigned getMsgType() {return requestIdentifier;}
|
||||
unsigned getSinkPort() {return sinkPort;}
|
||||
protected:
|
||||
// Encoded message body (set in dp_messagecodings)
|
||||
// this data structure is invalidated on post
|
||||
// as the data gets swapped into the transmit buffer.
|
||||
EncodedMessage encodedMessage;
|
||||
MessageEventSink * sink;
|
||||
|
||||
MessageManager * parent;
|
||||
bool transmitReply;
|
||||
bool bTransmitted;
|
||||
bool bBusyWaiting;
|
||||
unsigned requestIdentifier;
|
||||
unsigned messagePriority;
|
||||
unsigned sinkPort;
|
||||
|
||||
// State updated by post operation
|
||||
struct {
|
||||
unsigned messageNumber;
|
||||
Address target;
|
||||
} state;
|
||||
|
||||
virtual ParseResponseStatus parseResponseAck(
|
||||
EncodedMessage * message, BitStreamReader * reader) = 0;
|
||||
virtual ParseResponseStatus parseResponse(EncodedMessage * message);
|
||||
virtual void splitterFailed(OutgoingTransactionManager * from);
|
||||
virtual void expired(const void * tag);
|
||||
virtual void splitterTransmitted(OutgoingTransactionManager * from);
|
||||
|
||||
public:
|
||||
friend class MessageManager;
|
||||
|
||||
Message(int requestIdentifier, int messagePriority)
|
||||
: sink(0),
|
||||
parent(0),
|
||||
transmitReply(false),
|
||||
bTransmitted(false),
|
||||
bBusyWaiting(false),
|
||||
requestIdentifier(requestIdentifier),
|
||||
messagePriority(messagePriority),
|
||||
sinkPort(0xFF)
|
||||
{
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
if (parent) {
|
||||
parent->timer->cancelCallbacks(this);
|
||||
parent->splitterDownRequest.cancel(this);
|
||||
}
|
||||
|
||||
parent = 0;
|
||||
List::remove(this);
|
||||
encodedMessage.buffer.reset();
|
||||
}
|
||||
|
||||
// This function can be used to override the already set priority of the message from it's constructor.
|
||||
void setMessagePriority(DPSideBandMessagePriority priorityLevel)
|
||||
{
|
||||
this->messagePriority = priorityLevel;
|
||||
return;
|
||||
}
|
||||
|
||||
protected:
|
||||
~Message()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Register new receiver for unpair messages
|
||||
// (eg. broadcast messages or sink->source messages)
|
||||
//
|
||||
void registerReceiver(MessageReceiver * receiver);
|
||||
|
||||
// Post a message to be asynchronously transmitted
|
||||
void post(Message * message, Message::MessageEventSink * sink, bool isReply = false);
|
||||
void postReply(Message * message, Message::MessageEventSink * sink);
|
||||
void cancel(Message * message);
|
||||
|
||||
bool send(Message * message, NakData & nakData);
|
||||
friend class Message;
|
||||
~MessageManager();
|
||||
};
|
||||
struct GenericMessageCompletion : public MessageManager::Message::MessageEventSink
|
||||
{
|
||||
bool failed;
|
||||
bool completed;
|
||||
NakData nakData;
|
||||
GenericMessageCompletion();
|
||||
void messageFailed(MessageManager::Message * from, NakData * data);
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_MESSAGES_H
|
||||
132
src/common/displayport/inc/dp_object.h
Normal file
132
src/common/displayport/inc/dp_object.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2011-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_object.h *
|
||||
* This is the object from which all other dynamically-allocated objects *
|
||||
* must inherit. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_OBJECT_H
|
||||
#define INCLUDED_DP_OBJECT_H
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "stddef.h"
|
||||
#include "dp_hostimp.h"
|
||||
|
||||
static inline void dpMemCopy(void * target, const void * source, size_t len)
|
||||
{
|
||||
NvU8 * t = (NvU8 *)target;
|
||||
const NvU8 * s = (const NvU8 *)source;
|
||||
|
||||
while (len--)
|
||||
*t++=*s++;
|
||||
}
|
||||
|
||||
static inline void dpMemZero(void * target, size_t len)
|
||||
{
|
||||
NvU8 * t = (NvU8 *)target;
|
||||
|
||||
while (len--)
|
||||
*t++=0;
|
||||
}
|
||||
|
||||
static inline bool dpMemCmp(void *pvBuf1, void *pvBuf2, size_t size)
|
||||
{
|
||||
NvU8 *pBuf1 = (NvU8 *)pvBuf1;
|
||||
NvU8 *pBuf2 = (NvU8 *)pvBuf2;
|
||||
|
||||
if(!pBuf1 || !pBuf2 || !size)
|
||||
return false;
|
||||
|
||||
do
|
||||
{
|
||||
if(*pBuf1++ == *pBuf2++)
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
}while(--size);
|
||||
|
||||
if(!size)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// Any object allocated through "new" must virtually inherit from this type.
|
||||
// This guarantees that the memory allocation goes through dpMalloc/dpFree.
|
||||
// Leak detection is implemented only on allocations of this type. Data
|
||||
// structures may assume 0 initialization if allocated off the heap.
|
||||
//
|
||||
// You must use virtual inheritance because objects that inherit from
|
||||
// multiple Object-derived classes would otherwise cause ambiguity when
|
||||
// someone tries to use new or delete on them.
|
||||
//
|
||||
struct Object
|
||||
{
|
||||
virtual ~Object() {}
|
||||
|
||||
void *operator new(size_t sz)
|
||||
{
|
||||
void * block = dpMalloc(sz);
|
||||
if (block)
|
||||
{
|
||||
dpMemZero(block, sz);
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
void *operator new[](size_t sz)
|
||||
{
|
||||
void * block = dpMalloc(sz);
|
||||
if (block)
|
||||
{
|
||||
dpMemZero(block, sz);
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
void operator delete(void * ptr)
|
||||
{
|
||||
if (ptr)
|
||||
{
|
||||
dpFree(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
void operator delete[](void * ptr)
|
||||
{
|
||||
if (ptr)
|
||||
{
|
||||
dpFree(ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // INCLUDED_DP_OBJECT_H
|
||||
52
src/common/displayport/inc/dp_printf.h
Normal file
52
src/common/displayport/inc/dp_printf.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_printf.h *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_PRINTF_H
|
||||
#define INCLUDED_DP_PRINTF_H
|
||||
|
||||
#define DPLIB_LOG_BUFFER_SIZE 512
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_SILENT,
|
||||
DP_INFO,
|
||||
DP_NOTICE,
|
||||
DP_WARNING,
|
||||
DP_ERROR,
|
||||
DP_HW_ERROR,
|
||||
DP_FATAL,
|
||||
} DP_LOG_LEVEL;
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
#define DP_PRINTF(severity, format, ...) dpPrintf(severity, format, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DP_PRINTF(severity, format, ...)
|
||||
#endif // _DEBUG || DEBUG
|
||||
|
||||
#endif // INCLUDED_DP_PRINTF_H
|
||||
109
src/common/displayport/inc/dp_qse.h
Normal file
109
src/common/displayport/inc/dp_qse.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_qse.h *
|
||||
* Class definition for HDCP Query Stream Encryption and relative reading.*
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_QSE_H
|
||||
#define INCLUDED_DP_QSE_H
|
||||
|
||||
#include "dp_messagecodings.h"
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
#define CLIENT_ID_SIZE 7
|
||||
|
||||
|
||||
struct CLIENTID
|
||||
{
|
||||
NvU8 data[CLIENT_ID_SIZE];
|
||||
|
||||
CLIENTID()
|
||||
{
|
||||
dpMemZero(&data, sizeof(data));
|
||||
}
|
||||
};
|
||||
|
||||
enum QSE_REASON
|
||||
{
|
||||
qseReason_Generic,
|
||||
qseReason_Ssc
|
||||
};
|
||||
|
||||
class QSENonceGenerator: public Object
|
||||
{
|
||||
NvU32 previousRandomLSB;
|
||||
NvU32 previousRandomMSB;
|
||||
//
|
||||
// Linear congruential random number generator
|
||||
// Seed values chosen from numerical methods
|
||||
//
|
||||
NvU64 random();
|
||||
|
||||
public:
|
||||
QSENonceGenerator():previousRandomLSB(0),previousRandomMSB(0)
|
||||
{}
|
||||
|
||||
void clientIdBuilder(NvU64 aN);
|
||||
// For every clientId generation we need to call makeClientId
|
||||
void makeClientId(CLIENTID & clientId);
|
||||
};
|
||||
|
||||
struct GroupImpl;
|
||||
struct ConnectorImpl;
|
||||
|
||||
class StreamEncryptionStatusDetection : public Object, public MessageManager::Message::MessageEventSink, Timer::TimerCallback
|
||||
{
|
||||
GroupImpl * parent;
|
||||
ConnectorImpl * connector;
|
||||
QueryStreamEncryptionMessage qseMessage;
|
||||
unsigned retriesSendQSEMessage;
|
||||
QSE_REASON reason;
|
||||
bool bIsHdcp22Qse;
|
||||
bool bIsRepeater;
|
||||
|
||||
public:
|
||||
StreamEncryptionStatusDetection(GroupImpl * parent, ConnectorImpl * connector):
|
||||
parent(parent), connector(connector), retriesSendQSEMessage(0), bIsHdcp22Qse(false), bIsRepeater(false)
|
||||
{}
|
||||
|
||||
~StreamEncryptionStatusDetection();
|
||||
|
||||
void sendQSEMessage(GroupImpl * group, QSE_REASON reasonId = qseReason_Generic);
|
||||
void handleQSEDownReply();
|
||||
void messageFailed(MessageManager::Message * from, NakData * nakData);
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
void expired(const void * tag);
|
||||
bool handleQSEReplyValidation();
|
||||
void resetQseMessageState();
|
||||
void setHdcp22Qse(bool bHdcp22Qse);
|
||||
};
|
||||
|
||||
struct DeviceImpl;
|
||||
}
|
||||
|
||||
#endif // INCLUDED_DP_QSE_H
|
||||
134
src/common/displayport/inc/dp_regkeydatabase.h
Normal file
134
src/common/displayport/inc/dp_regkeydatabase.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_regkeydatabase.h *
|
||||
* Definition of the DP_REGKEY_DATABASE *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_REGKEYDATABASE_H
|
||||
#define INCLUDED_DP_REGKEYDATABASE_H
|
||||
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
// Regkey Names
|
||||
#define NV_DP_REGKEY_DISABLE_QSES "DISABLE_QSES"
|
||||
#define NV_DP_REGKEY_OVERRIDE_DPCD_REV "OVERRIDE_DPCD_REV"
|
||||
#define NV_DP_REGKEY_DISABLE_SSC "DISABLE_SSC" // SSC (Stream Status Changed)
|
||||
#define NV_DP_REGKEY_ENABLE_FAST_LINK_TRAINING "ENABLE_FAST_LINK_TRAINING"
|
||||
#define NV_DP_REGKEY_DISABLE_MST "DISABLE_MST"
|
||||
#define NV_DP_REGKEY_ENABLE_INBAND_STEREO_SIGNALING "ENABLE_INBAND_STEREO_SIGNALING"
|
||||
#define NV_DP_REGKEY_SKIP_POWEROFF_EDP_IN_HEAD_DETACH "SKIP_POWEROFF_EDP_IN_HEAD_DETACH"
|
||||
#define NV_DP_REGKEY_ENABLE_OCA_LOGGING "ENABLE_OCA_LOGGING"
|
||||
#define NV_DP_REGKEY_REPORT_DEVICE_LOST_BEFORE_NEW "HP_WAR_1707690"
|
||||
#define NV_DP_REGKEY_APPLY_LINK_BW_OVERRIDE_WAR "APPLY_LINK_BW_OVERRIDE_WAR"
|
||||
// For DP2x, the regkey value needs to be in 10M convention
|
||||
#define NV_DP_REGKEY_APPLY_MAX_LINK_RATE_OVERRIDES "APPLY_OVERRIDES_FOR_BUG_2489143"
|
||||
#define NV_DP_REGKEY_DISABLE_DSC "DISABLE_DSC"
|
||||
#define NV_DP_REGKEY_SKIP_ASSESSLINK_FOR_EDP "HP_WAR_2189772"
|
||||
#define NV_DP_REGKEY_HDCP_AUTH_ONLY_ON_DEMAND "DP_HDCP_AUTH_ONLY_ON_DEMAND"
|
||||
#define NV_DP_REGKEY_ENABLE_MSA_OVER_MST "ENABLE_MSA_OVER_MST"
|
||||
#define NV_DP_REGKEY_DISABLE_DOWNSPREAD "DISABLE_DOWNSPREAD"
|
||||
|
||||
// Keep link alive for SST and MST
|
||||
#define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE "DP_KEEP_OPT_LINK_ALIVE"
|
||||
// Keep link alive when connector is in MST
|
||||
#define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE_MST "DP_KEEP_OPT_LINK_ALIVE_MST"
|
||||
// Keep link alive when connector is in SST
|
||||
#define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE_SST "DP_KEEP_OPT_LINK_ALIVE_SST"
|
||||
|
||||
#define NV_DP_REGKEY_FORCE_EDP_ILR "DP_BYPASS_EDP_ILR_REV_CHECK"
|
||||
|
||||
// Message to power down video stream before power down link (set D3)
|
||||
#define NV_DP_REGKEY_POWER_DOWN_PHY "DP_POWER_DOWN_PHY"
|
||||
|
||||
//
|
||||
// DSC capability of downstream device should be decided based on device's own
|
||||
// and its parent's DSC capability.
|
||||
//
|
||||
#define NV_DP_DSC_MST_CAP_BUG_3143315 "DP_DSC_MST_CAP_BUG_3143315"
|
||||
|
||||
#define NV_DP2X_REGKEY_DISABLE_EFF_BPP_SST_8b10b "DP2X_REGKEY_DISABLE_EFF_BPP_SST_8b10b"
|
||||
|
||||
//
|
||||
// Bug 4388987 : This regkey will disable reading PCON caps for MST.
|
||||
//
|
||||
#define NV_DP_REGKEY_MST_PCON_CAPS_READ_DISABLED "DP_BUG_4388987_WAR"
|
||||
#define NV_DP_REGKEY_DISABLE_TUNNEL_BW_ALLOCATION "DP_DISABLE_TUNNEL_BW_ALLOCATION"
|
||||
|
||||
#define NV_DP_REGKEY_DISABLE_AVOID_HBR3_WAR "DP_DISABLE_AVOID_HBR3_WAR"
|
||||
|
||||
// Bug 4793112 : On eDP panel, do not cache source OUI if it reads zero
|
||||
#define NV_DP_REGKEY_SKIP_ZERO_OUI_CACHE "DP_SKIP_ZERO_OUI_CACHE"
|
||||
|
||||
#define NV_DP_REGKEY_ENABLE_FIX_FOR_5147205 "DP_ENABLE_5147205_FIX"
|
||||
// Bug 5088957 : Force head shutdown in DpLib
|
||||
#define NV_DP_REGKEY_FORCE_HEAD_SHUTDOWN "DP_WAR_5088957"
|
||||
|
||||
//
|
||||
// Data Base used to store all the regkey values.
|
||||
// The actual data base is declared statically in dp_evoadapter.cpp.
|
||||
// All entries set to 0 before initialized by the first EvoMainLink constructor.
|
||||
// The first EvoMainLink constructor will populate that data base.
|
||||
// Later EvoMainLink will use values from that data base.
|
||||
//
|
||||
struct DP_REGKEY_DATABASE
|
||||
{
|
||||
bool bInitialized; // set to true after the first EvoMainLink instance is constructed
|
||||
// Below are regkey values
|
||||
bool bQsesDisabled;
|
||||
NvU32 dpcdRevOveride;
|
||||
bool bSscDisabled;
|
||||
bool bFastLinkTrainingEnabled;
|
||||
bool bMstDisabled;
|
||||
bool bInbandStereoSignalingEnabled;
|
||||
bool bPoweroffEdpInHeadDetachSkipped;
|
||||
bool bOcaLoggingEnabled;
|
||||
bool bReportDeviceLostBeforeNew;
|
||||
bool bLinkBwOverrideWarApplied;
|
||||
NvU32 applyMaxLinkRateOverrides;
|
||||
bool bDscDisabled;
|
||||
bool bAssesslinkForEdpSkipped;
|
||||
bool bHdcpAuthOnlyOnDemand;
|
||||
bool bMsaOverMstEnabled;
|
||||
bool bOptLinkKeptAlive;
|
||||
bool bOptLinkKeptAliveMst;
|
||||
bool bOptLinkKeptAliveSst;
|
||||
bool bBypassEDPRevCheck;
|
||||
bool bDscMstCapBug3143315;
|
||||
bool bPowerDownPhyBeforeD3;
|
||||
bool bMSTPCONCapsReadDisabled;
|
||||
bool bForceDisableTunnelBwAllocation;
|
||||
bool bDownspreadDisabled;
|
||||
bool bDisableAvoidHBR3War;
|
||||
bool bCableVconnSourceUnknownWar;
|
||||
bool bSkipZeroOuiCache;
|
||||
bool bEnable5147205Fix;
|
||||
bool bForceHeadShutdown;
|
||||
};
|
||||
|
||||
extern struct DP_REGKEY_DATABASE dpRegkeyDatabase;
|
||||
|
||||
#endif //INCLUDED_DP_REGKEYDATABASE_H
|
||||
33
src/common/displayport/inc/dp_ringbuffer.h
Normal file
33
src/common/displayport/inc/dp_ringbuffer.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <nvtypes.h>
|
||||
#include <dpringbuffertypes.h>
|
||||
#include "dp_object.h"
|
||||
|
||||
#define addToRingBufferCollection(x) {}
|
||||
#define addDpLogRecord(x, ...) {}
|
||||
#define addDpAssertRecord() {}
|
||||
#define queryDpLogRecords(a, b, c) {}
|
||||
#define resetDpAssertRingBuffer() {}
|
||||
|
||||
159
src/common/displayport/inc/dp_splitter.h
Normal file
159
src/common/displayport/inc/dp_splitter.h
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_splitter.h *
|
||||
* Asynchronous Message splitter *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_SPLITTER_H
|
||||
#define INCLUDED_DP_SPLITTER_H
|
||||
|
||||
#include "dp_list.h"
|
||||
#include "dp_auxretry.h"
|
||||
#include "dp_timer.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_messageheader.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
|
||||
struct EncodedMessage;
|
||||
class DPCDHAL;
|
||||
|
||||
class MessageTransactionSplitter
|
||||
{
|
||||
//
|
||||
// If set we've pulled an item out of the downQueue queue.
|
||||
// One or more transactions have been sent as a result
|
||||
// messageOutstanding->messageOffset show how far into
|
||||
// the message we are.
|
||||
//
|
||||
EncodedMessage * messageOutstanding;
|
||||
unsigned assemblyTransmitted;
|
||||
public:
|
||||
void set(EncodedMessage * messageOutstanding)
|
||||
{
|
||||
this->messageOutstanding = messageOutstanding;
|
||||
assemblyTransmitted = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Encode the next transaction.
|
||||
// returns false if there are no more transactions
|
||||
//
|
||||
bool get(Buffer & assemblyBuffer);
|
||||
|
||||
MessageTransactionSplitter() : messageOutstanding(0), assemblyTransmitted(0)
|
||||
{}
|
||||
};
|
||||
|
||||
class OutgoingTransactionManager:
|
||||
virtual public Object,
|
||||
private Timer::TimerCallback
|
||||
{
|
||||
public:
|
||||
class OutgoingTransactionManagerEventSink
|
||||
{
|
||||
public:
|
||||
virtual void splitterFailed(OutgoingTransactionManager * from) = 0; // Sink DEFER the writes
|
||||
virtual void splitterTransmitted(OutgoingTransactionManager * from) = 0; // message was sent (may NACK later)
|
||||
};
|
||||
|
||||
// Send the encoded message. This call is destructive to the EncodedMessage
|
||||
// passed in
|
||||
bool send( EncodedMessage & payload, OutgoingTransactionManagerEventSink * sink);
|
||||
|
||||
OutgoingTransactionManager(Timer * timer);
|
||||
virtual ~OutgoingTransactionManager() { timer->cancelCallbacks(this); }
|
||||
|
||||
// Do not make any calls to the event sink
|
||||
void cancel(OutgoingTransactionManagerEventSink * sink);
|
||||
|
||||
protected:
|
||||
virtual AuxRetry::status writeMessageBox(NvU8 * data, size_t length) = 0;
|
||||
virtual size_t getMessageBoxSize() = 0;
|
||||
private:
|
||||
void writeToWindow( bool firstAttempt);
|
||||
void split();
|
||||
void expired(const void * tag); // timer callback
|
||||
|
||||
unsigned retriesLeft;
|
||||
|
||||
Buffer assemblyBuffer;
|
||||
MessageTransactionSplitter transactionSplitter;
|
||||
|
||||
//
|
||||
// List of outgoing messages
|
||||
//
|
||||
struct OutgoingMessage : ListElement
|
||||
{
|
||||
OutgoingTransactionManagerEventSink* eventSink;
|
||||
EncodedMessage message;
|
||||
};
|
||||
|
||||
List queuedMessages;
|
||||
|
||||
//
|
||||
// Message currently assembled in transactionSplitter
|
||||
// (if any)
|
||||
//
|
||||
OutgoingMessage * activeMessage;
|
||||
Timer * timer;
|
||||
};
|
||||
|
||||
|
||||
class DownRequestManager : public OutgoingTransactionManager
|
||||
{
|
||||
public:
|
||||
DownRequestManager(DPCDHAL * hal, Timer * timer)
|
||||
: OutgoingTransactionManager(timer), hal(hal)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DownRequestManager() {}
|
||||
protected:
|
||||
DPCDHAL * hal;
|
||||
|
||||
virtual AuxRetry::status writeMessageBox(NvU8 * data, size_t length);
|
||||
virtual size_t getMessageBoxSize();
|
||||
};
|
||||
|
||||
class UpReplyManager : public OutgoingTransactionManager
|
||||
{
|
||||
public:
|
||||
UpReplyManager(DPCDHAL * hal, Timer * timer)
|
||||
: OutgoingTransactionManager(timer), hal(hal)
|
||||
{
|
||||
}
|
||||
virtual ~UpReplyManager() {}
|
||||
protected:
|
||||
DPCDHAL * hal;
|
||||
|
||||
virtual AuxRetry::status writeMessageBox(NvU8 * data, size_t length);
|
||||
virtual size_t getMessageBoxSize();
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_SPLITTER_H
|
||||
74
src/common/displayport/inc/dp_timeout.h
Normal file
74
src/common/displayport/inc/dp_timeout.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_timeout.h *
|
||||
* Local timeout management *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_TIMEOUT_H
|
||||
#define INCLUDED_DP_TIMEOUT_H
|
||||
|
||||
#include "dp_timer.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// Timeout management
|
||||
//
|
||||
class Timeout : virtual public Object
|
||||
{
|
||||
Timer * timer;
|
||||
NvU64 timeoutTime; // What time to trigger the timeout at
|
||||
|
||||
public:
|
||||
|
||||
Timeout(Timer * _timer, int timeoutMilliseconds)
|
||||
: timer(_timer), timeoutTime(_timer->getTimeUs() + timeoutMilliseconds*1000 + 1 /* counter could be about to roll */)
|
||||
{
|
||||
}
|
||||
|
||||
NvS64 remainingUs()
|
||||
{
|
||||
NvS64 remaining = (NvS64)(timeoutTime - timer->getTimeUs());
|
||||
|
||||
// Rollover check
|
||||
if (remaining < 0)
|
||||
{
|
||||
remaining = 0;
|
||||
}
|
||||
|
||||
DP_ASSERT(remaining < ((NvS64)1000000*3600) && "Timeout remaining over an hour");
|
||||
|
||||
return remaining;
|
||||
}
|
||||
|
||||
bool valid()
|
||||
{
|
||||
return remainingUs() > 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_TIMEOUT_H
|
||||
103
src/common/displayport/inc/dp_timer.h
Normal file
103
src/common/displayport/inc/dp_timer.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_timer.h *
|
||||
* Local timer interface *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_TIMER_H
|
||||
#define INCLUDED_DP_TIMER_H
|
||||
|
||||
#include "dp_list.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
//
|
||||
// RawTimer
|
||||
// This API is expected to be implemented by the
|
||||
// library client.
|
||||
//
|
||||
class RawTimer : virtual public Object
|
||||
{
|
||||
public:
|
||||
struct Callback : virtual public Object
|
||||
{
|
||||
virtual void expired() = 0;
|
||||
};
|
||||
virtual void queueCallback(Callback * callback, int milliseconds) = 0;
|
||||
virtual NvU64 getTimeUs() = 0;
|
||||
virtual void sleep(int milliseconds) = 0;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Timer
|
||||
//
|
||||
class Timer : public RawTimer::Callback
|
||||
{
|
||||
public:
|
||||
struct TimerCallback
|
||||
{
|
||||
virtual void expired(const void * context) = 0;
|
||||
};
|
||||
|
||||
private:
|
||||
RawTimer * raw;
|
||||
List pending;
|
||||
struct PendingCallback : ListElement
|
||||
{
|
||||
TimerCallback * target;
|
||||
const void * context;
|
||||
NvU64 timestamp; // in usec
|
||||
bool executeInSleep;
|
||||
|
||||
};
|
||||
|
||||
virtual void expired();
|
||||
unsigned fire(bool fromSleep);
|
||||
|
||||
void _pump(unsigned milliseconds, bool fromSleep);
|
||||
public:
|
||||
Timer(RawTimer * raw) : raw(raw) {}
|
||||
virtual ~Timer() {}
|
||||
|
||||
//
|
||||
// Queue a timer callback.
|
||||
// Unless the dont-execute-in-sleep flag is
|
||||
//
|
||||
void queueCallback(Timer::TimerCallback * target, const void * context, unsigned milliseconds, bool executeInSleep = true);
|
||||
NvU64 getTimeUs();
|
||||
void sleep(unsigned milliseconds);
|
||||
void cancelCallbacks(Timer::TimerCallback * to);
|
||||
|
||||
void cancelCallback(Timer::TimerCallback * to, const void * context);
|
||||
void queueCallbackInOrder(Timer::TimerCallback * target, const void * context, unsigned milliseconds, bool executeInSleep);
|
||||
void cancelCallbacksWithoutContext(const void * context);
|
||||
void cancelAllCallbacks();
|
||||
bool checkCallbacksOfSameContext(const void * context);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_TIMER_H
|
||||
128
src/common/displayport/inc/dp_tracing.h
Normal file
128
src/common/displayport/inc/dp_tracing.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/******************************* DisplayPort ******************************\
|
||||
* *
|
||||
* Module: dp_tracing.h *
|
||||
* Header file for support of tracing, implemented by a host provider *
|
||||
* Because this is platform-agnostic, the tracing API *
|
||||
* is left up to the host interface. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_TRACING_H
|
||||
#define INCLUDED_DP_TRACING_H
|
||||
|
||||
#include "nvtypes.h"
|
||||
|
||||
typedef enum NV_DP_TRACING_EVENT
|
||||
{
|
||||
TRACE_DP_ID_HOTPLUG,
|
||||
TRACE_DP_ID_NEW_SINK_DETECTED,
|
||||
TRACE_DP_ID_NEW_SINK_REPORTED,
|
||||
TRACE_DP_ID_NEW_MST_DEVICE,
|
||||
TRACE_DP_ID_LOST_DEVICE,
|
||||
TRACE_DP_ID_LINK_ASSESSMENT,
|
||||
TRACE_DP_ID_LINK_TRAINING_START,
|
||||
TRACE_DP_ID_LINK_TRAINING_DONE,
|
||||
TRACE_DP_ID_NOTIFY_ATTACH_BEGIN,
|
||||
TRACE_DP_ID_NOTIFY_ATTACH_BEGIN_STATUS,
|
||||
TRACE_DP_ID_NOTIFY_ATTACH_END,
|
||||
TRACE_DP_ID_NOTIFY_DETACH_BEGIN,
|
||||
TRACE_DP_ID_NOTIFY_DETACH_END,
|
||||
TRACE_DP_ID_MESSAGE_EXPIRED
|
||||
} NV_DP_TRACING_EVENT;
|
||||
|
||||
typedef enum NV_DP_TRACING_PRIORITY
|
||||
{
|
||||
TRACE_DP_PRIORITY_ERROR,
|
||||
TRACE_DP_PRIORITY_WARNING,
|
||||
TRACE_DP_PRIORITY_INFO
|
||||
} NV_DP_TRACING_PRIORITY;
|
||||
|
||||
#define NV_DPTRACE_MAX_PARAMS 8
|
||||
|
||||
#define _NV_DPTRACE_EXPAND_HELPER(x) x
|
||||
#define _NV_DPTRACE_EXPAND(x) _NV_DPTRACE_EXPAND_HELPER(x)
|
||||
|
||||
//
|
||||
// _COUNT_ARGS: Counts the size of an argument list.
|
||||
//
|
||||
// For example, if the argument list is two-arguments "A, B", then call it like this:
|
||||
// _COUNT_ARGS(_placeholder, A, B, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
|
||||
//
|
||||
// which maps to the argument names like this:
|
||||
// _COUNT_ARGS(_0=_placeholder, _1=A, _2=B, _3=9, _4=8, _5=7, _6=6, _7=5, _8=4,, _9=3, _10=2, ...)
|
||||
//
|
||||
// and thus _COUNT_ARGS will return 2, the correct size of the argument list.
|
||||
//
|
||||
#define _NV_DPTRACE_COUNT_ARGS(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) _10
|
||||
|
||||
#define NV_DPTRACE_ERROR(...) NV_DPTRACE_EVENT(TRACE_DP_PRIORITY_ERROR, __VA_ARGS__)
|
||||
#define NV_DPTRACE_WARNING(...) NV_DPTRACE_EVENT(TRACE_DP_PRIORITY_WARNING, __VA_ARGS__)
|
||||
#define NV_DPTRACE_INFO(...) NV_DPTRACE_EVENT(TRACE_DP_PRIORITY_INFO, __VA_ARGS__)
|
||||
|
||||
//
|
||||
// When ##__VA_ARGS__ is used, it will delete a preceding comma (',') when
|
||||
// __VA_ARGS__ is blank (i.e. zero-length argument list). This allows
|
||||
// the zero-argument case to work without resulting in a syntax error.
|
||||
//
|
||||
// We have a placeholder argument as the first parameter to _COUNT_ARGS
|
||||
// so that we can take advantage of this comma-deleting behavior.
|
||||
//
|
||||
// However, there shouldn't be a zero-arg case as of now, because the first arg is the event.
|
||||
//
|
||||
#define NV_DPTRACE_EVENT(priority, ...) \
|
||||
_NV_DPTRACE_SEND(priority, _NV_DPTRACE_EXPAND(_NV_DPTRACE_COUNT_ARGS(_0, ##__VA_ARGS__, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)), __VA_ARGS__)
|
||||
|
||||
#define _NV_DPTRACE_SEND(priority, argc, ...) _NV_DPTRACE_EXPAND(_NV_DPTRACE_SEND_N(priority, argc, __VA_ARGS__))
|
||||
#define _NV_DPTRACE_SEND_N(priority, argc, ...) _NV_DPTRACE_EXPAND(_NV_DPTRACE_##argc(priority, __VA_ARGS__))
|
||||
|
||||
// The first argument is the event - macro number is one higher than num args passed to dpTraceEvent
|
||||
#define _NV_DPTRACE_1(priority, event) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 0);
|
||||
|
||||
#define _NV_DPTRACE_2(priority, event, p1) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 1, p1);
|
||||
|
||||
#define _NV_DPTRACE_3(priority, event, p1, p2) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 2, p1, p2);
|
||||
|
||||
#define _NV_DPTRACE_4(priority, event, p1, p2, p3) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 3, p1, p2, p3);
|
||||
|
||||
#define _NV_DPTRACE_5(priority, event, p1, p2, p3, p4) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 4, p1, p2, p3, p4);
|
||||
|
||||
#define _NV_DPTRACE_6(priority, event, p1, p2, p3, p4, p5) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 5, p1, p2, p3, p4, p5);
|
||||
|
||||
#define _NV_DPTRACE_7(priority, event, p1, p2, p3, p4, p5, p6) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 6, p1, p2, p3, p4, p5, p6);
|
||||
|
||||
#define _NV_DPTRACE_8(priority, event, p1, p2, p3, p4, p5, p6, p7) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 7, p1, p2, p3, p4, p5, p6, p7);
|
||||
|
||||
#define _NV_DPTRACE_9(priority, event, p1, p2, p3, p4, p5, p6, p7, p8) \
|
||||
dpTraceEvent(TRACE_DP_ID_##event, priority, 8, p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
|
||||
#endif // INCLUDED_DP_TRACING_H
|
||||
95
src/common/displayport/inc/dp_vrr.h
Normal file
95
src/common/displayport/inc/dp_vrr.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_vrr.h *
|
||||
* Prototypes and definitions related to VRR enablement *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_VRR_H
|
||||
#define INCLUDED_DP_VRR_H
|
||||
|
||||
#include "dp_object.h"
|
||||
|
||||
// Worstcase VRR enablement handshake timeout of 600ms (40x15ms)
|
||||
#define VRR_ENABLE_STATUS_TIMEOUT_THRESHOLD 40
|
||||
#define VRR_ENABLE_STATUS_TIMEOUT_INTERVAL_MS 15
|
||||
|
||||
// Retry enablement threshold in notifyShortPulse()
|
||||
#define VRR_MAX_RETRIES 3
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
enum VrrEnableStage
|
||||
{
|
||||
VRR_ENABLE_STAGE_MONITOR_ENABLE_BEGIN,
|
||||
VRR_ENABLE_STAGE_MONITOR_ENABLE_CHALLENGE,
|
||||
VRR_ENABLE_STAGE_MONITOR_ENABLE_CHECK,
|
||||
VRR_ENABLE_STAGE_DRIVER_ENABLE_BEGIN,
|
||||
VRR_ENABLE_STAGE_DRIVER_ENABLE_CHALLENGE,
|
||||
VRR_ENABLE_STAGE_DRIVER_ENABLE_CHECK,
|
||||
VRR_ENABLE_STAGE_RESET_MONITOR,
|
||||
VRR_ENABLE_STAGE_INIT_PUBLIC_INFO,
|
||||
VRR_ENABLE_STAGE_GET_PUBLIC_INFO,
|
||||
VRR_ENABLE_STAGE_STATUS_CHECK,
|
||||
};
|
||||
|
||||
struct DeviceImpl;
|
||||
|
||||
class VrrEnablement : virtual public Object
|
||||
{
|
||||
private:
|
||||
DeviceImpl *parent;
|
||||
bool bMonitorEnabled;
|
||||
|
||||
bool vrrGetPublicInfo(void);
|
||||
bool vrrWaitOnEnableStatus(void);
|
||||
bool vrrEnableMonitor(void);
|
||||
bool vrrEnableDriver(void);
|
||||
|
||||
public:
|
||||
|
||||
VrrEnablement(DeviceImpl *parent)
|
||||
: parent(parent)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
~VrrEnablement()
|
||||
{
|
||||
parent = NULL;
|
||||
reset();
|
||||
}
|
||||
|
||||
bool start(void);
|
||||
void reset(void)
|
||||
{
|
||||
bMonitorEnabled = false;
|
||||
}
|
||||
bool isMonitorEnabled(void);
|
||||
bool isDriverEnabled(void);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
75
src/common/displayport/inc/dp_wardatabase.h
Normal file
75
src/common/displayport/inc/dp_wardatabase.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_wardatabase.h *
|
||||
* EDID and OUI based workarounds for panel/TCON issues *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifndef INCLUDED_DP_WARDATABASE_H
|
||||
#define INCLUDED_DP_WARDATABASE_H
|
||||
|
||||
#include "dp_object.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
#define WAR_MAX_REASSESS_ATTEMPT 3
|
||||
#define WAR_MAX_RETRAIN_ATTEMPT 3
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP_MONITOR_CAPABILITY_DP_SKIP_REDUNDANT_LT = (1 << 0), // Do not train if the link B/W and lane count are already set to the desired quantities
|
||||
DP_MONITOR_CAPABILITY_DP_SKIP_CABLE_BW_CHECK = (1 << 1), // Skip the link training attempts to test cable bandwidth in CheckDpLink
|
||||
DP_MONITOR_CAPABILITY_DP_MULTI_WRITE_DPCD_0x600 = (1 << 2), // Repeatedly write 0x1 to 0x600 with extra delays until the read verifies the write
|
||||
DP_MONITOR_CAPABILITY_DP_WRITE_0x600_BEFORE_LT = (1 << 3), // Power on a monitor before every link training
|
||||
DP_MONITOR_CAPABILITY_DP_OVERRIDE_OPTIMAL_LINK_CONFIG = (1 << 4), // Override optimal link config
|
||||
DP_MONITOR_CAPABILITY_DP_OVERRIDE_MAX_LANE_COUNT = (1 << 5), // WAR for some DP monitors which claims more lane count than it really supports. It may generate interrupt storm if unsupported lane count is applied
|
||||
DP_MONITOR_CAPABILITY_DP_AVOID_UPDATE_POWER_STATE = (1 << 6), // Don't update panel power state when head detach or lid closed
|
||||
} DP_MONITOR_CAPABILITY;
|
||||
|
||||
struct DpMonitorDenylistData: virtual public Object
|
||||
{
|
||||
// Max lane count supported override value
|
||||
unsigned int dpMaxLaneCountOverride;
|
||||
|
||||
// Link rate and Lane count value overrides
|
||||
// when we need to skip BW check
|
||||
struct
|
||||
{
|
||||
unsigned int maxLaneAtHighRate;
|
||||
unsigned int maxLaneAtLowRate;
|
||||
} dpSkipCheckLink;
|
||||
|
||||
// Link rate and Lane count value overrides
|
||||
// when we need to force optimal link config
|
||||
struct
|
||||
{
|
||||
unsigned int linkRate;
|
||||
unsigned int laneCount;
|
||||
} dpOverrideOptimalLinkConfig;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // INCLUDED_DP_WARDATABASE_H
|
||||
141
src/common/displayport/inc/dp_watermark.h
Normal file
141
src/common/displayport/inc/dp_watermark.h
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_watermark.h *
|
||||
* DP watermark IsModePossible calculations. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_WATERMARK_H
|
||||
#define INCLUDED_DP_WATERMARK_H
|
||||
|
||||
#include "displayport.h"
|
||||
|
||||
namespace DisplayPort
|
||||
{
|
||||
class LinkConfiguration;
|
||||
|
||||
struct ModesetInfo
|
||||
{
|
||||
unsigned twoChannelAudioHz; // if you need 192khz stereo specify 192000 here
|
||||
unsigned eightChannelAudioHz; // Same setting for multi channel audio.
|
||||
// DisplayPort encodes 3-8 channel streams as 8 channel
|
||||
NvU64 pixelClockHz; // Requested pixel clock for the mode
|
||||
unsigned rasterWidth;
|
||||
unsigned rasterHeight;
|
||||
unsigned surfaceWidth; // RasterBlankStartX - RasterBlankEndX
|
||||
unsigned surfaceHeight; // Active region height
|
||||
unsigned depth;
|
||||
unsigned rasterBlankStartX;
|
||||
unsigned rasterBlankEndX;
|
||||
unsigned bitsPerComponent; // Bits per component
|
||||
bool bEnableDsc; // bEnableDsc=1 indicates DSC would be enabled for the mode
|
||||
bool bEnablePassThroughForPCON;
|
||||
|
||||
DSC_MODE mode; // DSC Mode
|
||||
DP_COLORFORMAT colorFormat;
|
||||
|
||||
ModesetInfo(): twoChannelAudioHz(0),
|
||||
eightChannelAudioHz(0),
|
||||
pixelClockHz(0),
|
||||
rasterWidth(0),
|
||||
rasterHeight(0),
|
||||
surfaceWidth(0),
|
||||
surfaceHeight(0),
|
||||
depth(0),
|
||||
rasterBlankStartX(0),
|
||||
rasterBlankEndX(0),
|
||||
bitsPerComponent(0),
|
||||
bEnableDsc(false),
|
||||
bEnablePassThroughForPCON(false),
|
||||
mode(DSC_SINGLE),
|
||||
colorFormat(dpColorFormat_Unknown) {}
|
||||
|
||||
ModesetInfo(unsigned newTwoChannelAudioHz, unsigned newEightChannelAudioHz, NvU64 newPixelClockHz,
|
||||
unsigned newRasterWidth, unsigned newRasterHeight,
|
||||
unsigned newSurfaceWidth, unsigned newSurfaceHeight, unsigned newDepth,
|
||||
unsigned newRasterBlankStartX=0, unsigned newRasterBlankEndX=0, bool newBEnableDsc = false,
|
||||
DSC_MODE newMode = DSC_SINGLE, bool newBEnablePassThroughForPCON = false,
|
||||
DP_COLORFORMAT dpColorFormat = dpColorFormat_Unknown):
|
||||
twoChannelAudioHz(newTwoChannelAudioHz),
|
||||
eightChannelAudioHz(newEightChannelAudioHz),
|
||||
pixelClockHz(newPixelClockHz),
|
||||
rasterWidth(newRasterWidth),
|
||||
rasterHeight(newRasterHeight),
|
||||
surfaceWidth(newSurfaceWidth),
|
||||
surfaceHeight(newSurfaceHeight),
|
||||
depth(newDepth),
|
||||
rasterBlankStartX(newRasterBlankStartX),
|
||||
rasterBlankEndX(newRasterBlankEndX),
|
||||
bitsPerComponent(0),
|
||||
bEnableDsc(newBEnableDsc),
|
||||
bEnablePassThroughForPCON(newBEnablePassThroughForPCON),
|
||||
mode(newMode),
|
||||
colorFormat(dpColorFormat) {}
|
||||
};
|
||||
|
||||
struct Watermark
|
||||
{
|
||||
unsigned waterMark;
|
||||
unsigned tuSize;
|
||||
unsigned hBlankSym;
|
||||
unsigned vBlankSym;
|
||||
NvU32 effectiveBpp;
|
||||
};
|
||||
|
||||
bool isModePossibleSST
|
||||
(
|
||||
const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
Watermark * dpInfo,
|
||||
bool bUseIncreasedWatermarkLimits = false
|
||||
);
|
||||
|
||||
bool isModePossibleMST
|
||||
(
|
||||
const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
Watermark * dpInfo
|
||||
);
|
||||
|
||||
bool isModePossibleSSTWithFEC
|
||||
(
|
||||
const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
Watermark * dpInfo,
|
||||
bool bUseIncreasedWatermarkLimits = false
|
||||
);
|
||||
|
||||
bool isModePossibleMSTWithFEC
|
||||
(
|
||||
const LinkConfiguration &linkConfig,
|
||||
const ModesetInfo &modesetInfo,
|
||||
Watermark * dpInfo
|
||||
);
|
||||
|
||||
// Return Payload Bandwidth Number(PBN)for requested mode
|
||||
unsigned pbnForMode(const ModesetInfo &modesetInfo, bool bAccountSpread = true);
|
||||
}
|
||||
|
||||
#endif //INCLUDED_DP_WATERMARK_H
|
||||
190
src/common/displayport/inc/dptestutil/dp_testmessage.h
Normal file
190
src/common/displayport/inc/dptestutil/dp_testmessage.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort*********************************\
|
||||
* *
|
||||
* Module: dp_testmessage.h *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#ifndef INCLUDED_DP_TESTMESSAGE_H
|
||||
#define INCLUDED_DP_TESTMESSAGE_H
|
||||
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
#define DP_TESTMESSAGE_QSES 0x38
|
||||
#include "dp_qse.h"
|
||||
|
||||
#include "dp_connector.h"
|
||||
|
||||
#define DP_LPRIME_SIZE 20
|
||||
namespace DisplayPort
|
||||
{
|
||||
// test request status, for DP and nvapi
|
||||
typedef enum
|
||||
{
|
||||
DP_TESTMESSAGE_REQUEST_STATUS_PENDING = 0, // the request is still be processing
|
||||
DP_TESTMESSAGE_REQUEST_STATUS_DONE = 1, // request has been processed
|
||||
DP_TESTMESSAGE_REQUEST_STATUS_ERROR = 2, // error, Dp lib busy with other request
|
||||
DP_TESTMESSAGE_REQUEST_STATUS_NEWREQUEST = 3, // new request for user
|
||||
} DP_TESTMESSAGE_REQUEST_STATUS;
|
||||
|
||||
// Request type enum.
|
||||
typedef enum
|
||||
{
|
||||
DP_TESTMESSAGE_REQUEST_TYPE_QSES, // TestMessage from DPTestUtil.
|
||||
} DP_TESTMESSAGE_REQUEST_TYPE;
|
||||
|
||||
//
|
||||
// NVAPI QSES reply message struct.
|
||||
// Do NOT inherit any class, need keep consist with definition with Nvapi part,
|
||||
// which is C STRUCT
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
StreamState streamState;
|
||||
bool repeaterFuncPresent;
|
||||
bool encryption;
|
||||
bool authentication;
|
||||
OutputSinkType sinkType;
|
||||
OutputCPType cpType;
|
||||
bool signedLPrime;
|
||||
NvU8 streamId;
|
||||
NvU8 LPrime[DP_LPRIME_SIZE];
|
||||
} DP_TESTMESSAGE_REQUEST_QSES_OUTPUT;
|
||||
|
||||
//
|
||||
// Version of QSES_OUTPUT that consistent with struct in dp_messageencodings.h
|
||||
// ( without QSES Lprime).
|
||||
//
|
||||
// Considering nvapi backward compatibility, don't modify DP_TESTMESSAGE_REQUEST_QSES_OUTPUT
|
||||
// definition but has internal version to sync up with dplib implementation.
|
||||
//
|
||||
// DPLib message implementation is using this version for now. TestMessage
|
||||
// need this structure to safely copy info from QSES message structure.
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
StreamState streamState;
|
||||
bool repeaterFuncPresent;
|
||||
bool encryption;
|
||||
bool authentication;
|
||||
OutputSinkType sinkType;
|
||||
OutputCPType cpType;
|
||||
bool signedLPrime;
|
||||
NvU8 streamId;
|
||||
} DP_TESTMESSAGE_REQUEST_QSES_OUTPUT_V2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// indicated what status to get, for DP, user need fill this
|
||||
DP_TESTMESSAGE_REQUEST_TYPE requestType;
|
||||
// stream id for QSES to get, user need file this
|
||||
NvU32 streamID;
|
||||
// replay buffer
|
||||
DP_TESTMESSAGE_REQUEST_QSES_OUTPUT reply;
|
||||
} DP_TESTMESSAGE_REQUEST_QSES_INPUT;
|
||||
|
||||
class TestMessage;
|
||||
struct ConnectorImpl;
|
||||
|
||||
struct DPTestMessageCompletion : public MessageManager::Message::MessageEventSink
|
||||
{
|
||||
TestMessage *parent;
|
||||
|
||||
public:
|
||||
void setParent(TestMessage *parent)
|
||||
{
|
||||
this->parent = parent;
|
||||
}
|
||||
// call back function if message fails, the status of the dp lib(testMessageStatus)
|
||||
// need to be set to DONE
|
||||
void messageFailed(MessageManager::Message * from, NakData * data);
|
||||
|
||||
// call back function if message complete, the status of the dp lib(testMessageStatus)
|
||||
// need to be set to DONE.
|
||||
// If a message has a reply, it is necessary to record the reply in the dp lib to
|
||||
// send back to user later
|
||||
void messageCompleted(MessageManager::Message * from);
|
||||
|
||||
};
|
||||
|
||||
class TestMessage : virtual public Object
|
||||
{
|
||||
private:
|
||||
ConnectorImpl *pConnector;
|
||||
// check if the user provided request struct is of valid size
|
||||
inline bool isValidStruct(DP_TESTMESSAGE_REQUEST_TYPE requestType, NvU32 structSize)
|
||||
{
|
||||
switch (requestType)
|
||||
{
|
||||
case DP_TESTMESSAGE_REQUEST_TYPE_QSES:
|
||||
{
|
||||
return structSize == sizeof(DP_TESTMESSAGE_REQUEST_QSES_INPUT) ? true : false;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
MessageManager *pMsgManager;
|
||||
DPTestMessageCompletion diagCompl;
|
||||
|
||||
// Data Structure for Generic Message.
|
||||
NvU32 replyBytes;
|
||||
void sendTestMsgQSES(void *pBuffer);
|
||||
|
||||
public:
|
||||
DP_TESTMESSAGE_REQUEST_QSES_OUTPUT_V2 qsesReply;
|
||||
|
||||
DP_TESTMESSAGE_REQUEST_STATUS testMessageStatus;
|
||||
|
||||
TestMessage() : testMessageStatus(DP_TESTMESSAGE_REQUEST_STATUS_DONE)
|
||||
{
|
||||
diagCompl.setParent(this);
|
||||
pConnector = 0;
|
||||
pMsgManager = 0;
|
||||
replyBytes = 0;
|
||||
qsesReply.streamState = DoesNotExist;
|
||||
qsesReply.repeaterFuncPresent = 0;
|
||||
qsesReply.encryption = 0;
|
||||
qsesReply.authentication = 0;
|
||||
qsesReply.sinkType = StreamUnconnected;
|
||||
qsesReply.cpType = HDCP1x;
|
||||
qsesReply.signedLPrime = 0;
|
||||
qsesReply.streamId = '\0';
|
||||
}
|
||||
DP_TESTMESSAGE_STATUS sendDPTestMessage(void *pBuffer,
|
||||
NvU32 requestSize,
|
||||
NvU32 *pDpStatus);
|
||||
MessageManager * getMessageManager();
|
||||
void setupTestMessage(MessageManager *msgManager, ConnectorImpl *connector)
|
||||
{
|
||||
pMsgManager = msgManager;
|
||||
pConnector = connector;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
316
src/common/displayport/src/dp_auxretry.cpp
Normal file
316
src/common/displayport/src/dp_auxretry.cpp
Normal file
@@ -0,0 +1,316 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* Module: dp_auxretry.cpp *
|
||||
* Interface implemented by library client. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_auxretry.h"
|
||||
#include "dp_messageheader.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
#include "displayport.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
//
|
||||
// Read a DPCD address.
|
||||
// - allows size greater than single transaction/burst size
|
||||
// - handles defer retries
|
||||
// - handles nacks with incomplete data
|
||||
//
|
||||
AuxRetry::status AuxRetry::readTransaction(int address, NvU8 * buffer, unsigned size, unsigned retries)
|
||||
{
|
||||
unsigned completed;
|
||||
AuxBus::status s;
|
||||
|
||||
DP_ASSERT( size <= aux->transactionSize() );
|
||||
|
||||
do
|
||||
{
|
||||
s = aux->transaction(AuxBus::read, AuxBus::native, address, buffer, size, &completed);
|
||||
|
||||
//
|
||||
// Got success & requested data. Also size of returned data is
|
||||
// expected & non zero.
|
||||
//
|
||||
if ((s == AuxBus::success) && (completed == size) && (completed != 0))
|
||||
{
|
||||
return ack;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Handle defer case with a simple retry
|
||||
//
|
||||
if (s == AuxBus::defer)
|
||||
{
|
||||
if (retries)
|
||||
{
|
||||
--retries;
|
||||
continue;
|
||||
}
|
||||
|
||||
return defer;
|
||||
}
|
||||
|
||||
//
|
||||
// Nack shouldn't happen in general. Unsupported registers
|
||||
// are supposed to ACK with size of 0.
|
||||
//
|
||||
if ( s == AuxBus::nack )
|
||||
{
|
||||
return nack;
|
||||
}
|
||||
|
||||
if ( completed == 0 )
|
||||
{
|
||||
return unsupportedRegister;
|
||||
}
|
||||
|
||||
//
|
||||
// We got less data back than we requested...
|
||||
// It's unclear when this might happen in the spec.
|
||||
// We can either
|
||||
// 1. Split the read into multiple pieces
|
||||
// (Dangerous since we may receive non-atomic updates)
|
||||
// 2. Retry
|
||||
//
|
||||
if ( completed < size )
|
||||
{
|
||||
//
|
||||
// Retry
|
||||
//
|
||||
if (retries)
|
||||
{
|
||||
--retries;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Closest approximation is a defer
|
||||
return defer;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while(retries);
|
||||
|
||||
if ((s == AuxBus::defer) || (completed < size))
|
||||
{
|
||||
return defer;
|
||||
}
|
||||
|
||||
return ack;
|
||||
}
|
||||
|
||||
//
|
||||
// Write a DPCD address.
|
||||
// - allows size greater than single transaction/burst size
|
||||
// - handles defer retries
|
||||
// - handles nacks with incomplete data
|
||||
//
|
||||
AuxRetry::status AuxRetry::writeTransaction(int address, NvU8 * buffer, unsigned size, unsigned retries)
|
||||
{
|
||||
unsigned completed;
|
||||
AuxBus::status s;
|
||||
|
||||
DP_ASSERT( size <= aux->transactionSize() );
|
||||
|
||||
do
|
||||
{
|
||||
s = aux->transaction(AuxBus::write, AuxBus::native, address, buffer, size, &completed);
|
||||
|
||||
//
|
||||
// Got success & requested data. Also size of returned data is
|
||||
// expected & non zero.
|
||||
//
|
||||
if ((s == AuxBus::success) && (completed == size) && (completed != 0))
|
||||
{
|
||||
return ack;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Handle defer case with a simple retry
|
||||
//
|
||||
if (s == AuxBus::defer)
|
||||
{
|
||||
if (retries)
|
||||
{
|
||||
--retries;
|
||||
continue;
|
||||
}
|
||||
|
||||
return defer;
|
||||
}
|
||||
|
||||
//
|
||||
// Nack shouldn't happen in general. Unsupported registers
|
||||
// are supposed to ACK with size of 0.
|
||||
//
|
||||
if ( s == AuxBus::nack )
|
||||
{
|
||||
return nack;
|
||||
}
|
||||
|
||||
DP_ASSERT( s == AuxBus::success);
|
||||
|
||||
if ( completed == 0 )
|
||||
{
|
||||
return unsupportedRegister;
|
||||
}
|
||||
|
||||
//
|
||||
// Incomplete write?
|
||||
// Shouldn't happen. Just retry if it does
|
||||
//
|
||||
if ( completed < size )
|
||||
{
|
||||
//
|
||||
// Retry
|
||||
//
|
||||
if (retries)
|
||||
{
|
||||
--retries;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Closest approximation is a defer
|
||||
return defer;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while(retries);
|
||||
|
||||
if ((s == AuxBus::defer) || (completed < size))
|
||||
{
|
||||
return defer;
|
||||
}
|
||||
|
||||
return ack;
|
||||
}
|
||||
|
||||
//
|
||||
// Similar to readTransaction except that it supports reading
|
||||
// larger spans than AuxBus::transactionSize()
|
||||
//
|
||||
AuxRetry::status AuxRetry::read(int address, NvU8 * buffer, unsigned size, unsigned retries)
|
||||
{
|
||||
for (unsigned i = 0 ; i < size; )
|
||||
{
|
||||
int todo = DP_MIN(size - i, aux->transactionSize());
|
||||
status s = readTransaction(address+i, buffer+i, todo, retries);
|
||||
|
||||
if (s != ack)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
i += todo;
|
||||
}
|
||||
|
||||
return ack;
|
||||
}
|
||||
|
||||
//
|
||||
// Similar to writeTransaction except that it supports writing
|
||||
// larger spans than AuxBus::transactionSize()
|
||||
//
|
||||
AuxRetry::status AuxRetry::write(int address, NvU8 * buffer, unsigned size, unsigned retries)
|
||||
{
|
||||
for (unsigned i = 0 ; i < size; )
|
||||
{
|
||||
int todo = DP_MIN(size - i, aux->transactionSize());
|
||||
status s = writeTransaction(address+i, buffer+i, todo, retries);
|
||||
|
||||
if (s != ack)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
i += todo;
|
||||
}
|
||||
|
||||
return ack;
|
||||
}
|
||||
|
||||
AuxBus::status AuxLogger::transaction(Action action, Type type, int address,
|
||||
NvU8 * buffer, unsigned sizeRequested,
|
||||
unsigned * sizeCompleted, unsigned * pNakReason,
|
||||
NvU8 offset, NvU8 nWriteTransactions)
|
||||
{
|
||||
AuxBus::status result = bus->transaction(action, type, address, buffer, sizeRequested, sizeCompleted);
|
||||
hint[0] = 0;
|
||||
//
|
||||
// Do the hex dump.
|
||||
// - We can't make library calls
|
||||
// - We need to do this in one printf
|
||||
if (result == success)
|
||||
{
|
||||
if (type == native)
|
||||
if (address == NV_DPCD_MBOX_DOWN_REQ || address == NV_DPCD_MBOX_UP_REP ||
|
||||
address == NV_DPCD_MBOX_DOWN_REP || address == NV_DPCD_MBOX_UP_REQ)
|
||||
{
|
||||
unsigned len = *sizeCompleted;
|
||||
Buffer storage(buffer, len);
|
||||
BitStreamReader reader(&storage, 0, len*8);
|
||||
MessageHeader header;
|
||||
DisplayPort::decodeHeader(&reader, &header, Address(1));
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
dpHexDump(&hex[0], sizeof(hex), buffer, header.headerSizeBits/8);
|
||||
dpHexDump(&hex_body[0], sizeof(hex), buffer + header.headerSizeBits/8, len - header.headerSizeBits/8);
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
const char * name = "";
|
||||
if (header.isTransactionStart && action==write && len > header.headerSizeBits/8)
|
||||
name = getRequestId(buffer[header.headerSizeBits/8]);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-AUX> %s%s%s%s%04Xh hint(to:%s %s%s %s #%d) { %s| %s}",
|
||||
sizeRequested == *sizeCompleted ? "" : "INCOMPLETE ", getStatus(result),
|
||||
getAction(action), getType(type), address,
|
||||
header.address.toString(sb), header.isTransactionStart ? "S" : "",
|
||||
header.isTransactionEnd ? "E" : "", name, header.messageNumber,
|
||||
hex, hex_body);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else
|
||||
hex[0] = 0;
|
||||
|
||||
dpHexDump(&hex[0], sizeof(hex), buffer, *sizeCompleted);
|
||||
DP_PRINTF(DP_NOTICE, "DP-AUX> %s%s%s%s%04Xh { %s }", sizeRequested == *sizeCompleted ? "" : "INCOMPLETE ",
|
||||
getStatus(result), getAction(action), getType(type), address, hex);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
AuxBus * DisplayPort::CreateAuxLogger(AuxBus * auxBus)
|
||||
{
|
||||
return new AuxLogger(auxBus);
|
||||
}
|
||||
204
src/common/displayport/src/dp_bitstream.cpp
Normal file
204
src/common/displayport/src/dp_bitstream.cpp
Normal file
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_bitstream.c *
|
||||
* Implementation of Big Endian bit streams. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
bool BitStreamReader::read(unsigned * value, unsigned bits)
|
||||
{
|
||||
unsigned topbit = (7- (this->bitsOffset & 7));
|
||||
|
||||
if (this->bitsOffset + bits > this->bitsEnd)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// We're filling the byte down from 'topbit' towards 0.
|
||||
// Can we fit all of the bits starting at topbit before
|
||||
// overflowing to the next byte?
|
||||
//
|
||||
if (bits <= (topbit+1))
|
||||
{
|
||||
int bottombit = topbit - (bits-1);
|
||||
*value = (this->buffer()->data[this->bitsOffset / 8] >> bottombit) & ((1 << bits)-1);
|
||||
|
||||
this->bitsOffset+=bits;
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// We're either reading too many bits or we're straddling
|
||||
// a byte boundary. Serialize bit by bit.
|
||||
// NOTE: This scenario is entire unlikely. Don't optimize.
|
||||
//
|
||||
|
||||
*value = 0;
|
||||
while (bits)
|
||||
{
|
||||
unsigned bit;
|
||||
if (!read(&bit, 1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
*value = *value * 2 + bit;
|
||||
bits--;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned BitStreamReader::readOrDefault(unsigned bits, unsigned defaultValue)
|
||||
{
|
||||
unsigned value;
|
||||
|
||||
if (read(&value, bits))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool BitStreamReader::align(unsigned align)
|
||||
{
|
||||
// Verify alignment is a power of two
|
||||
if (!(align && ((align & (align - 1)) == 0)))
|
||||
{
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->bitsOffset & (align - 1))
|
||||
{
|
||||
this->bitsOffset = (this->bitsOffset + align) &~ (align - 1);
|
||||
}
|
||||
}
|
||||
return this->bitsOffset <= this->bitsEnd;
|
||||
}
|
||||
|
||||
bool BitStreamWriter::write(unsigned value, unsigned bits)
|
||||
{
|
||||
DP_ASSERT((value < (1ULL << bits)) && "Value out of range");
|
||||
unsigned topbit = (7- (this->bitsOffset & 7));
|
||||
|
||||
if (this->bitsOffset + bits > this->buffer()->length * 8)
|
||||
{
|
||||
this->buffer()->resize((this->bitsOffset + bits+7)/8);
|
||||
}
|
||||
|
||||
//
|
||||
// We're filling the byte down from 'topbit' towards 0.
|
||||
// Can we fit all of the bits starting at topbit before
|
||||
// overflowing to the next byte?
|
||||
//
|
||||
if (bits <= (topbit+1))
|
||||
{
|
||||
int bottombit = topbit - (bits-1);
|
||||
NvU8 clearmask = ((1 << bits)-1) << bottombit;
|
||||
|
||||
this->buffer()->data[this->bitsOffset / 8] = (NvU8)((this->buffer()->data[this->bitsOffset / 8] &~ clearmask) | (value << bottombit));
|
||||
|
||||
this->bitsOffset+=bits;
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// We're either writing too many bits or we're straddling
|
||||
// a byte boundary. Serialize bit by bit.
|
||||
// NOTE: This scenario is entire unlikely. Don't optimize.
|
||||
//
|
||||
|
||||
while (bits)
|
||||
{
|
||||
bits --;
|
||||
if (!write( (value >> bits) & 1, 1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BitStreamWriter::align(unsigned align)
|
||||
{
|
||||
// Verify alignment is a power of two
|
||||
if (!(align && ((align & (align - 1)) == 0)))
|
||||
{
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->bitsOffset & (align - 1))
|
||||
return this->write(0, align - (this->bitsOffset & (align - 1)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned BitStreamReader::offset()
|
||||
{
|
||||
return this->bitsOffset;
|
||||
}
|
||||
|
||||
unsigned BitStreamWriter::offset()
|
||||
{
|
||||
return this->bitsOffset;
|
||||
}
|
||||
|
||||
Buffer * BitStreamWriter::buffer()
|
||||
{
|
||||
return this->targetBuffer;
|
||||
}
|
||||
|
||||
Buffer * BitStreamReader::buffer()
|
||||
{
|
||||
return this->sourceBuffer;
|
||||
}
|
||||
|
||||
|
||||
BitStreamWriter::BitStreamWriter(Buffer * buffer, unsigned bitsOffset)
|
||||
{
|
||||
this->targetBuffer = buffer;
|
||||
this->bitsOffset = bitsOffset;
|
||||
}
|
||||
|
||||
|
||||
BitStreamReader::BitStreamReader(Buffer * buffer, unsigned bitsOffset, unsigned bitsCount)
|
||||
{
|
||||
this->sourceBuffer = buffer;
|
||||
this->bitsOffset = bitsOffset;
|
||||
this->bitsEnd = bitsCount + bitsOffset;
|
||||
}
|
||||
272
src/common/displayport/src/dp_buffer.cpp
Normal file
272
src/common/displayport/src/dp_buffer.cpp
Normal file
@@ -0,0 +1,272 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_buffer.cpp *
|
||||
* Resizable byte buffer and stream operations *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_buffer.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
void DisplayPort::swapBuffers(Buffer & left, Buffer & right)
|
||||
{
|
||||
NvU8 *tmpData = left.data;
|
||||
unsigned tmpLength = left.length;
|
||||
unsigned tmpCapacity = left.capacity;
|
||||
bool tmpErrorState = left.errorState;
|
||||
|
||||
left.data = right.data;
|
||||
left.length = right.length;
|
||||
left.capacity = right.capacity;
|
||||
left.errorState = right.errorState;
|
||||
|
||||
right.data = tmpData;
|
||||
right.length = tmpLength;
|
||||
right.capacity = tmpCapacity;
|
||||
right.errorState= tmpErrorState;
|
||||
}
|
||||
|
||||
|
||||
bool Stream::seek(unsigned where)
|
||||
{
|
||||
//
|
||||
// Allow seek to any position in the file INCLUDING
|
||||
// the first byte past the end of the file.
|
||||
//
|
||||
if (where > this->parent->length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this->byteOffset = where;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Stream::read(NvU8 * buffer, unsigned size)
|
||||
{
|
||||
unsigned stopReadAt = this->byteOffset + size;
|
||||
|
||||
if (stopReadAt > this->parent->length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
dpMemCopy(buffer, this->parent->data + this->byteOffset, size);
|
||||
this->byteOffset = stopReadAt;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Buffer::resize(unsigned stopWriteAt)
|
||||
{
|
||||
bool mustIncrease = stopWriteAt > this->capacity;
|
||||
|
||||
if (mustIncrease || (stopWriteAt * 4 < this->capacity) )
|
||||
{
|
||||
unsigned newCapacity;
|
||||
NvU8 * newBuffer;
|
||||
|
||||
newCapacity = 32;
|
||||
|
||||
while (newCapacity <= stopWriteAt)
|
||||
{
|
||||
newCapacity *= 2;
|
||||
}
|
||||
|
||||
if (newCapacity == this->capacity) {
|
||||
this->length = stopWriteAt;
|
||||
return true;
|
||||
}
|
||||
|
||||
newBuffer = (NvU8 *)dpMalloc(sizeof(NvU8) * newCapacity);
|
||||
|
||||
if (!newBuffer)
|
||||
{
|
||||
if (mustIncrease)
|
||||
{
|
||||
if (this->data)
|
||||
{
|
||||
dpFree(this->data);
|
||||
}
|
||||
|
||||
this->errorState = true;
|
||||
this->data = 0;
|
||||
this->capacity = 0;
|
||||
this->length = 0;
|
||||
}
|
||||
else
|
||||
newCapacity = this->capacity;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->data)
|
||||
{
|
||||
dpMemCopy(newBuffer, this->data, DP_MIN(newCapacity, this->length));
|
||||
dpFree(this->data);
|
||||
}
|
||||
|
||||
this->data = newBuffer;
|
||||
this->capacity = newCapacity;
|
||||
|
||||
}
|
||||
|
||||
this->length = stopWriteAt;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Buffer::memZero()
|
||||
{
|
||||
if (this->data)
|
||||
dpMemZero(this->data, this->length);
|
||||
}
|
||||
|
||||
bool Stream::write(NvU8 * buffer, unsigned size)
|
||||
{
|
||||
unsigned stopWriteAt = this->byteOffset + size;
|
||||
|
||||
if (stopWriteAt > this->parent->length)
|
||||
{
|
||||
this->parent->resize(stopWriteAt);
|
||||
}
|
||||
|
||||
if (isError())
|
||||
return false;
|
||||
|
||||
dpMemCopy( this->parent->data + this->byteOffset, buffer, size);
|
||||
this->byteOffset = stopWriteAt;
|
||||
this->parent->length = DP_MAX(this->parent->length, stopWriteAt);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned Stream::remaining()
|
||||
{
|
||||
return this->parent->length - this->byteOffset;
|
||||
}
|
||||
|
||||
unsigned Stream::offset()
|
||||
{
|
||||
return this->byteOffset;
|
||||
}
|
||||
|
||||
Buffer::~Buffer()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void Buffer::reset()
|
||||
{
|
||||
if (this->data)
|
||||
{
|
||||
dpFree(this->data);
|
||||
}
|
||||
|
||||
length = 0;
|
||||
capacity = 0;
|
||||
data = 0;
|
||||
errorState = false;
|
||||
}
|
||||
|
||||
bool Buffer::isError() const
|
||||
{
|
||||
return this->errorState;
|
||||
}
|
||||
|
||||
|
||||
Stream::Stream(Buffer * buffer)
|
||||
: parent(buffer), byteOffset(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool Stream::isError() const
|
||||
{
|
||||
return this->parent->errorState;
|
||||
}
|
||||
|
||||
Buffer::Buffer()
|
||||
: data(0), length(0), capacity(0), errorState(false)
|
||||
{
|
||||
}
|
||||
|
||||
Buffer::Buffer(NvU8 * src, unsigned size)
|
||||
: data(0), length(0), capacity(0), errorState(false)
|
||||
{
|
||||
if (src && size && resize(size) && data)
|
||||
dpMemCopy(data, src, size);
|
||||
}
|
||||
|
||||
Buffer::Buffer(const Buffer & other)
|
||||
: data(0), length(0), capacity(0), errorState(false)
|
||||
{
|
||||
if (other.isError())
|
||||
{
|
||||
errorState = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (resize(other.getLength()) && other.getData())
|
||||
{
|
||||
if (capacity && getData())
|
||||
{
|
||||
dpMemCopy(getData(), other.getData(), getLength());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Buffer & Buffer::operator = (const Buffer & other)
|
||||
{
|
||||
if (other.isError())
|
||||
{
|
||||
errorState = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (resize(other.getLength()))
|
||||
dpMemCopy(getData(), other.getData(), getLength());
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool Buffer::operator== (const Buffer & other) const
|
||||
{
|
||||
if (length != other.length)
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
{
|
||||
if (data[i] != other.data[i])
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
3043
src/common/displayport/src/dp_configcaps.cpp
Normal file
3043
src/common/displayport/src/dp_configcaps.cpp
Normal file
File diff suppressed because it is too large
Load Diff
8735
src/common/displayport/src/dp_connectorimpl.cpp
Normal file
8735
src/common/displayport/src/dp_connectorimpl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
93
src/common/displayport/src/dp_crc.cpp
Normal file
93
src/common/displayport/src/dp_crc.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort*********************************\
|
||||
* *
|
||||
* Module: dp_crc.cpp *
|
||||
* CRC Algorithms for the messaging subsystem. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_crc.h"
|
||||
using namespace DisplayPort;
|
||||
|
||||
//
|
||||
// DP CRC for transactions headers
|
||||
//
|
||||
unsigned DisplayPort::dpCalculateHeaderCRC(BitStreamReader * reader)
|
||||
{
|
||||
unsigned remainder = 0;
|
||||
unsigned bit, i;
|
||||
|
||||
while (reader->read(&bit, 1))
|
||||
{
|
||||
remainder <<= 1;
|
||||
remainder |= bit;
|
||||
if ((remainder & 0x10) == 0x10)
|
||||
{
|
||||
remainder ^= 0x13;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 4; i != 0; i--)
|
||||
{
|
||||
remainder <<= 1;
|
||||
if ((remainder & 0x10) != 0)
|
||||
{
|
||||
remainder ^= 0x13;
|
||||
}
|
||||
}
|
||||
|
||||
return remainder & 0xF;
|
||||
}
|
||||
|
||||
//
|
||||
// DP CRC for body
|
||||
//
|
||||
unsigned DisplayPort::dpCalculateBodyCRC(BitStreamReader * reader)
|
||||
{
|
||||
unsigned remainder = 0;
|
||||
unsigned bit, i;
|
||||
|
||||
while (reader->read(&bit, 1))
|
||||
{
|
||||
remainder <<= 1;
|
||||
remainder |= bit;
|
||||
if ((remainder & 0x100) == 0x100)
|
||||
{
|
||||
remainder ^= 0xD5;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 8; i != 0; i--)
|
||||
{
|
||||
remainder <<= 1;
|
||||
if ((remainder & 0x100) != 0)
|
||||
{
|
||||
remainder ^= 0xD5;
|
||||
}
|
||||
}
|
||||
|
||||
return remainder & 0xFF;
|
||||
}
|
||||
3496
src/common/displayport/src/dp_deviceimpl.cpp
Normal file
3496
src/common/displayport/src/dp_deviceimpl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
939
src/common/displayport/src/dp_discovery.cpp
Normal file
939
src/common/displayport/src/dp_discovery.cpp
Normal file
@@ -0,0 +1,939 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_discovery.cpp *
|
||||
* The DP MST discovery manager. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_discovery.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_tracing.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
void DiscoveryManager::notifyLongPulse(bool status)
|
||||
{
|
||||
if (status)
|
||||
{
|
||||
Device device;
|
||||
device.address = Address(0);
|
||||
device.branch = hal->getSupportsMultistream();
|
||||
device.legacy = false;
|
||||
|
||||
detectBranch(device);
|
||||
}
|
||||
else if (!status)
|
||||
{
|
||||
removeDeviceTree(Address());
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoveryManager::detectBranch(Device device)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
//
|
||||
// 1. Create a LINK_ADDRESS_MESSAGE to send to this target so that we can find who he is
|
||||
// 2. Create a REMOTE_DPCD_WRITE to set the GUID for this target
|
||||
// *alternatively* we may have to use the local DPCD HAL to write this
|
||||
// 3. Enumerate any children that we may wish to queue detect on.
|
||||
//
|
||||
DP_PRINTF(DP_NOTICE, "%s(): target = %s", __FUNCTION__, device.address.toString(sb));
|
||||
|
||||
BranchDetection * branchDetection = new BranchDetection(this, device);
|
||||
outstandingBranchDetections.insertBack(branchDetection);
|
||||
branchDetection->start();
|
||||
}
|
||||
|
||||
void DiscoveryManager::detectSink(DiscoveryManager::Device device, bool bFromCSN)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "%s(): target = %s", __FUNCTION__, device.address.toString(sb));
|
||||
SinkDetection * sinkDetection = new SinkDetection(this, device, bFromCSN);
|
||||
sinkDetection->start();
|
||||
}
|
||||
|
||||
DiscoveryManager::Device * DiscoveryManager::findDevice(const Address & address)
|
||||
{
|
||||
for (unsigned i = 0; i < currentDevicesCount; i++)
|
||||
if (currentDevices[i].address == address)
|
||||
{
|
||||
if (currentDevices[i].peerGuid.isGuidZero() && currentDevices[i].peerDevice != Dongle &&
|
||||
(currentDevices[i].dpcdRevisionMajor >= 1 && currentDevices[i].dpcdRevisionMinor >= 2))
|
||||
{
|
||||
DP_ASSERT(0 && "Zero guid for device even though its not a dongle type.");
|
||||
}
|
||||
return ¤tDevices[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DiscoveryManager::Device * DiscoveryManager::findDevice(GUID & guid)
|
||||
{
|
||||
if (guid.isGuidZero())
|
||||
{
|
||||
DP_ASSERT(0 && "zero guid search");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < currentDevicesCount; i++)
|
||||
{
|
||||
if (currentDevices[i].dpcdRevisionMajor <= 1 && currentDevices[i].dpcdRevisionMinor < 2)
|
||||
continue;
|
||||
|
||||
if (currentDevices[i].peerGuid == guid)
|
||||
return ¤tDevices[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DiscoveryManager::addDevice(const DiscoveryManager::Device & device)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
GUID guid = device.peerGuid;
|
||||
if (guid.isGuidZero() &&
|
||||
(device.peerDevice != Dongle) &&
|
||||
(device.dpcdRevisionMajor >= 1 && device.dpcdRevisionMinor >= 2))
|
||||
{
|
||||
DP_ASSERT(0 && "GUID missing for the device");
|
||||
}
|
||||
DP_ASSERT(!findDevice(device.address) && "Redundant add");
|
||||
sink->discoveryNewDevice(device);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> New device '%s' %s %s %s", device.address.toString(sb),
|
||||
device.branch ? "Branch" : "", device.legacy ? "Legacy" : "",
|
||||
device.peerDevice == Dongle ? "Dongle" :
|
||||
device.peerDevice == DownstreamSink ? "DownstreamSink" : "");
|
||||
|
||||
Address::NvU32Buffer addrBuffer;
|
||||
dpMemZero(addrBuffer, sizeof(addrBuffer));
|
||||
device.address.toNvU32Buffer(addrBuffer);
|
||||
NV_DPTRACE_INFO(NEW_MST_DEVICE, device.address.size(), addrBuffer[0], addrBuffer[1],
|
||||
addrBuffer[2], addrBuffer[3], device.branch, device.legacy, device.peerDevice);
|
||||
|
||||
if (currentDevicesCount < maximumTopologyNodes)
|
||||
{
|
||||
currentDevices[currentDevicesCount++] = device;
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoveryManager::removeDevice(Device * device)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Lost device '%s' %s %s %s", device->address.toString(sb),
|
||||
device->branch ? "Branch" : "", device->legacy ? "Legacy" : "",
|
||||
device->peerDevice == Dongle ? "Dongle" :
|
||||
device->peerDevice == DownstreamSink ? "DownstreamSink" : "");
|
||||
|
||||
sink->discoveryLostDevice(device->address);
|
||||
|
||||
for (unsigned i = (unsigned)(device-¤tDevices[0]); i < currentDevicesCount - 1; i++)
|
||||
currentDevices[i] = currentDevices[i+1];
|
||||
currentDevicesCount--;
|
||||
}
|
||||
|
||||
void DiscoveryManager::removeDeviceTree(const Address & prefix)
|
||||
{
|
||||
for (unsigned i = 0; i < currentDevicesCount;)
|
||||
if (currentDevices[i].address.under(prefix))
|
||||
removeDevice(¤tDevices[i]);
|
||||
else
|
||||
i++;
|
||||
}
|
||||
|
||||
DiscoveryManager::Device * DiscoveryManager::findChildDeviceForBranchWithGuid
|
||||
(
|
||||
GUID guid,
|
||||
unsigned port,
|
||||
Address & childAddr
|
||||
)
|
||||
{
|
||||
// Find it in relevant parent's device list
|
||||
DiscoveryManager::Device * parentDevice = findDevice(guid);
|
||||
if (!parentDevice)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DM> No Parent present for the device in DB.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
childAddr = parentDevice->address;
|
||||
childAddr.append(port);
|
||||
return (findDevice(childAddr));
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::detectCompleted(bool passed)
|
||||
{
|
||||
// we could not read or write the guid
|
||||
if (!passed)
|
||||
{
|
||||
//
|
||||
// DP1.2 monitors that do not support GUID get filtered and dropped as 'not present'.
|
||||
// Instead we demote such monitors to DP1.1 and continue sink detection so that end
|
||||
// user at least gets active display scanout on such monitors (albeit reduced to DP1.1).
|
||||
//
|
||||
if (device.dpcdRevisionMajor > 1 || device.dpcdRevisionMinor >= 2)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_ERROR, "DP-DM> sink at '%s' failed GUID identification, demote to 1.1 sink.",
|
||||
address.toString(sb));
|
||||
device.dpcdRevisionMajor = 1;
|
||||
device.dpcdRevisionMinor = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Had it previously been reported as present?
|
||||
if (Device * device = parent->findDevice(address))
|
||||
parent->removeDevice(device);
|
||||
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// at this point we are sure that we have a device GUID.
|
||||
// We need to check whether the device is new to the DB.
|
||||
// Had we previously reported the device?
|
||||
|
||||
Device * oldDevice = parent->findDevice(device.address);
|
||||
|
||||
if (!oldDevice)
|
||||
{
|
||||
// completely new device
|
||||
parent->addDevice(device);
|
||||
}
|
||||
// If it was a branch and now isn't.. delete the tree of devices under it
|
||||
else if (oldDevice && oldDevice->branch && !device.branch)
|
||||
{
|
||||
parent->removeDeviceTree(device.address);
|
||||
}
|
||||
// It changed, delete the previously reported
|
||||
else if (oldDevice && (oldDevice->legacy != device.legacy ||
|
||||
oldDevice->dpcdRevisionMajor!= device.dpcdRevisionMajor ||
|
||||
oldDevice->dpcdRevisionMinor!= device.dpcdRevisionMinor ||
|
||||
oldDevice->peerDevice != device.peerDevice||
|
||||
oldDevice->peerGuid != device.peerGuid ||
|
||||
oldDevice->SDPStreams != device.SDPStreams||
|
||||
oldDevice->SDPStreamSinks != device.SDPStreamSinks ||
|
||||
oldDevice->videoSink != device.videoSink))
|
||||
{
|
||||
parent->removeDevice(oldDevice);
|
||||
}
|
||||
|
||||
// otherwise.. it already existed, and still does
|
||||
|
||||
// We're done
|
||||
completed = true;
|
||||
delete this;
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::detectCompleted(bool present)
|
||||
{
|
||||
//
|
||||
// Handle device not present
|
||||
//
|
||||
if (!present)
|
||||
{
|
||||
// Had it previously been reported as present?
|
||||
if (Device * device = parent->findDevice(address))
|
||||
parent->removeDevice(device);
|
||||
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// We've got a linkAddressMessage and we were able to program the GUID!
|
||||
// Report the branch and queue any children that were enumerated for detection
|
||||
//
|
||||
parent->addDevice(parentDevice);
|
||||
|
||||
unsigned portsToDelete = (1 << (Address::maxPortCount+1)) - 1; // 16 ports
|
||||
for (unsigned i = 0; i < childCount; i++)
|
||||
{
|
||||
Device newDevice;
|
||||
newDevice.address = address;
|
||||
newDevice.address.append(child[i].portNumber);
|
||||
|
||||
//
|
||||
// Input port? Nothing plugged in? Delete the tree of all devices under this one
|
||||
// DP 1.2 Spec : 2.11.9.5.x
|
||||
//
|
||||
if (child[i].isInputPort || !child[i].dpPlugged) {
|
||||
continue;
|
||||
}
|
||||
|
||||
portsToDelete &= ~(1 << child[i].portNumber);
|
||||
|
||||
newDevice.peerDevice = child[i].peerDeviceType;
|
||||
newDevice.legacy = child[i].legacyPlugged && (newDevice.peerDevice == Dongle);
|
||||
newDevice.dpcdRevisionMajor = child[i].dpcdRevisionMajor;
|
||||
newDevice.dpcdRevisionMinor = child[i].dpcdRevisionMinor;
|
||||
// if internal device; use parent's GUID which we ourselves generated or got from the LAM.
|
||||
if (child[i].portNumber > PHYSICAL_PORT_END)
|
||||
newDevice.peerGuid = parentDevice.peerGuid;
|
||||
else
|
||||
newDevice.peerGuid = child[i].peerGUID;
|
||||
|
||||
newDevice.SDPStreams = child[i].SDPStreams;
|
||||
newDevice.SDPStreamSinks = child[i].SDPStreamSinks;
|
||||
|
||||
if (child[i].peerDeviceType == DownstreamBranch &&
|
||||
child[i].hasMessaging)
|
||||
{
|
||||
newDevice.branch = true;
|
||||
newDevice.videoSink = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
newDevice.branch = false;
|
||||
newDevice.videoSink = ((child[i].peerDeviceType == Dongle) ?
|
||||
child[i].legacyPlugged : true);
|
||||
}
|
||||
|
||||
//
|
||||
// Had we previously reported the device?
|
||||
//
|
||||
Device * oldDevice = parent->findDevice(newDevice.address);
|
||||
|
||||
// If it was a branch and now isn't.. delete the tree of devices under it
|
||||
if (oldDevice && oldDevice->branch && !newDevice.branch)
|
||||
{
|
||||
parent->removeDeviceTree(newDevice.address);
|
||||
}
|
||||
// It changed, delete
|
||||
else if (oldDevice && (oldDevice->legacy != newDevice.legacy ||
|
||||
oldDevice->dpcdRevisionMajor!= newDevice.dpcdRevisionMajor ||
|
||||
oldDevice->dpcdRevisionMinor!= newDevice.dpcdRevisionMinor ||
|
||||
oldDevice->peerDevice != newDevice.peerDevice||
|
||||
oldDevice->peerGuid != newDevice.peerGuid ||
|
||||
oldDevice->SDPStreams != newDevice.SDPStreams||
|
||||
oldDevice->SDPStreamSinks != newDevice.SDPStreamSinks ||
|
||||
oldDevice->videoSink != newDevice.videoSink))
|
||||
{
|
||||
parent->removeDevice(oldDevice);
|
||||
}
|
||||
|
||||
// otherwise.. it already existed, and still does
|
||||
if (newDevice.branch)
|
||||
{
|
||||
parent->detectBranch(newDevice);
|
||||
}
|
||||
else
|
||||
{
|
||||
// the new device is a sink. It may or may not have a guid.
|
||||
// write the guid if needed.
|
||||
parent->detectSink(newDevice, false);
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i <= Address::maxPortCount; i++)
|
||||
if ((portsToDelete >> i) & 1)
|
||||
{
|
||||
Address a = address;
|
||||
a.append(i);
|
||||
parent->removeDeviceTree(a);
|
||||
}
|
||||
|
||||
// We're done
|
||||
completed = true;
|
||||
delete this;
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::expired(const void * tag)
|
||||
{
|
||||
if (retryLinkAddressMessage)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Requeing LINK_ADDRESS_MESSAGE to %s", address.toString(sb));
|
||||
|
||||
retryLinkAddressMessage = false;
|
||||
linkAddressMessage.set(address);
|
||||
parent->messageManager->post(&linkAddressMessage, this);
|
||||
}
|
||||
else if (retryRemoteDpcdWriteMessage)
|
||||
{
|
||||
Address parentAddress = address;
|
||||
parentAddress.pop();
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Requeing REMOTE_DPCD_WRITE_MESSAGE to %s", parentAddress.toString(sb));
|
||||
|
||||
retryRemoteDpcdWriteMessage = false;
|
||||
remoteDpcdWriteMessage.set(parentAddress, parentAddress.tail(), NV_DPCD_GUID, sizeof(GUID), (NvU8 *)&parentDevice.peerGuid);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (remotely) for '%s' sent REMOTE_DPCD_WRITE {%p}", address.toString(sb), &remoteDpcdWriteMessage);
|
||||
|
||||
parent->messageManager->post(&remoteDpcdWriteMessage, this);
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::expired(const void * tag)
|
||||
{
|
||||
if (retryLinkAddressMessage)
|
||||
{
|
||||
Address parentAddress = address;
|
||||
parentAddress.pop();
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Requeueing LAM message to %s", parentAddress.toString(sb));
|
||||
|
||||
retryLinkAddressMessage = false;
|
||||
linkAddressMessage.set(parentAddress);
|
||||
|
||||
parent->messageManager->post(&linkAddressMessage, this);
|
||||
}
|
||||
else if (retryRemoteDpcdReadMessage)
|
||||
{
|
||||
Address parentAddress = address;
|
||||
parentAddress.pop();
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Requeueing REMOTE_DPCD_READ_MESSAGE to %s", parentAddress.toString(sb));
|
||||
|
||||
retryRemoteDpcdReadMessage = false;
|
||||
remoteDpcdReadMessage.set(parentAddress, parentAddress.tail(), NV_DPCD_GUID, sizeof(GUID));
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (remotely) for '%s' sent REMOTE_DPCD_READ {%p}", address.toString(sb), &remoteDpcdReadMessage);
|
||||
|
||||
parent->messageManager->post(&remoteDpcdReadMessage, this);
|
||||
}
|
||||
else if (retryRemoteDpcdWriteMessage)
|
||||
{
|
||||
Address parentAddress = address;
|
||||
parentAddress.pop();
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Requeueing REMOTE_DPCD_WRITE_MESSAGE to %s", parentAddress.toString(sb));
|
||||
|
||||
retryRemoteDpcdWriteMessage = false;
|
||||
remoteDpcdWriteMessage.set(parentAddress,
|
||||
parentAddress.tail(),
|
||||
NV_DPCD_GUID, sizeof(GUID),
|
||||
(NvU8 *)&device.peerGuid);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (remotely) for '%s' sent REMOTE_DPCD_WRITE {%p}", address.toString(sb), &remoteDpcdWriteMessage);
|
||||
|
||||
parent->messageManager->post(&remoteDpcdWriteMessage, this);
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::messageFailed(MessageManager::Message * from, NakData * nakData)
|
||||
{
|
||||
//
|
||||
// If any of our messages fail, we've completed detection on this buzzard.
|
||||
// The only exception is if we get a DEFER - then we retry indefinitely
|
||||
//
|
||||
if (from == &linkAddressMessage)
|
||||
{
|
||||
if (retriesLinkAddressMessage < DPCD_LINK_ADDRESS_MESSAGE_RETRIES &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
retriesLinkAddressMessage++;
|
||||
retryLinkAddressMessage = true;
|
||||
parent->timer->queueCallback(this, "DISC", DPCD_LINK_ADDRESS_MESSAGE_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (from == &remoteDpcdWriteMessage)
|
||||
{
|
||||
if ((retriesRemoteDpcdWriteMessage < DPCD_REMOTE_DPCD_WRITE_MESSAGE_RETRIES) &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
retriesRemoteDpcdWriteMessage++;
|
||||
retryRemoteDpcdWriteMessage = true;
|
||||
parent->timer->queueCallback(this, "DISC", DPCD_REMOTE_DPCD_WRITE_MESSAGE_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_ERROR, "DP-DM> Message %s {%p} at '%s' failed. Device marked not present.",
|
||||
from == &linkAddressMessage ? "LINK_ADDRESS_MESSAGE" :
|
||||
from == &remoteDpcdWriteMessage ? "REMOTE_DPCD_WRITE(GUID)" : "???",
|
||||
from, address.toString(sb));
|
||||
|
||||
|
||||
//
|
||||
// Detection is done and branch doesn't exist.
|
||||
// (Note this automatically removes self from any list we're in)
|
||||
//
|
||||
detectCompleted(false);
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::messageFailed(MessageManager::Message * from, NakData * nakData)
|
||||
{
|
||||
if (from == &remoteDpcdReadMessage)
|
||||
{
|
||||
if ((retriesRemoteDpcdReadMessage < DPCD_REMOTE_DPCD_READ_MESSAGE_RETRIES) &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
retriesRemoteDpcdReadMessage++;
|
||||
retryRemoteDpcdReadMessage = true;
|
||||
parent->timer->queueCallback(this, "DISC", DPCD_REMOTE_DPCD_READ_MESSAGE_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (from == &remoteDpcdWriteMessage)
|
||||
{
|
||||
if ((retriesRemoteDpcdWriteMessage < DPCD_REMOTE_DPCD_WRITE_MESSAGE_RETRIES) &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
retriesRemoteDpcdWriteMessage++;
|
||||
retryRemoteDpcdWriteMessage = true;
|
||||
parent->timer->queueCallback(this, "DISC", DPCD_REMOTE_DPCD_WRITE_MESSAGE_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (from == &linkAddressMessage)
|
||||
{
|
||||
if ((retriesLinkAddressMessage < DPCD_LINK_ADDRESS_MESSAGE_RETRIES) &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
retriesLinkAddressMessage++;
|
||||
retryLinkAddressMessage = true;
|
||||
parent->timer->queueCallback(this, "DISC", DPCD_LINK_ADDRESS_MESSAGE_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_ERROR, "DP-DM> Message %s {%p} at '%s' failed.",
|
||||
from == &remoteDpcdWriteMessage ? "REMOTE_DPCD_WRITE(GUID)" :
|
||||
from == &remoteDpcdReadMessage ? "REMOTE_DPCD_READ(GUID)" :
|
||||
from == &linkAddressMessage ? "LINK_ADDRESS_MESSAGE" : "???",
|
||||
from, address.toString(sb));
|
||||
|
||||
detectCompleted(false);
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::handleLinkAddressDownReply()
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
LinkAddressMessage::Result child;
|
||||
child = *linkAddressMessage.result(address.tail());
|
||||
|
||||
device.peerDevice = child.peerDeviceType;
|
||||
device.dpcdRevisionMajor = child.dpcdRevisionMajor;
|
||||
device.dpcdRevisionMinor = child.dpcdRevisionMinor;
|
||||
|
||||
if (device.dpcdRevisionMajor == 0)
|
||||
{
|
||||
device.dpcdRevisionMajor = 1;
|
||||
device.dpcdRevisionMinor = 1;
|
||||
}
|
||||
device.portMap.inputMap |= (1 << child.portNumber);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> handleLinkAddressDownReply for sink device on '%s': DPCD Rev = %d.%d",
|
||||
address.toString(sb), device.dpcdRevisionMajor, device.dpcdRevisionMinor);
|
||||
|
||||
// Check if the device already has a GUID
|
||||
// or it is a dongle or on a logical port ; in which case no GUID is required.
|
||||
if ((!device.peerGuid.isGuidZero()) ||
|
||||
(device.peerDevice == Dongle) ||
|
||||
(device.dpcdRevisionMajor <= 1 && device.dpcdRevisionMinor < 2) ||
|
||||
(device.address.tail() > PHYSICAL_PORT_END))
|
||||
{
|
||||
parent->addDevice(device);
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
Address parentAddress = address.parent();
|
||||
remoteDpcdReadMessage.set(parentAddress, address.tail(), NV_DPCD_GUID, sizeof(GUID));
|
||||
|
||||
parent->messageManager->post(&remoteDpcdReadMessage, this);
|
||||
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::handleRemoteDpcdReadDownReply()
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> REMOTE_DPCD_READ {%p} at '%s' completed",
|
||||
(MessageManager::Message *)&remoteDpcdReadMessage,
|
||||
address.toString(sb));
|
||||
if (remoteDpcdReadMessage.replyNumOfBytesReadDPCD() != sizeof(GUID))
|
||||
{
|
||||
DP_ASSERT(0 && "Incomplete GUID in remote DPCD read message");
|
||||
detectCompleted(false);
|
||||
return;
|
||||
}
|
||||
|
||||
DP_ASSERT(remoteDpcdReadMessage.replyPortNumber() == address.tail());
|
||||
device.peerGuid.copyFrom(remoteDpcdReadMessage.replyGetData());
|
||||
|
||||
if (!device.peerGuid.isGuidZero())
|
||||
{
|
||||
// we got the GUID ... handle device add/remove
|
||||
detectCompleted(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// We need to give ourselves a non-zero GUID!
|
||||
//
|
||||
parent->guidBuilder.makeGuid(device.peerGuid);
|
||||
|
||||
Address parentAddress = address.parent();
|
||||
remoteDpcdWriteMessage.set(parentAddress,
|
||||
address.tail(),
|
||||
NV_DPCD_GUID, sizeof(GUID),
|
||||
(NvU8 *)&device.peerGuid);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (remotely) for '%s' sent REMOTE_DPCD_WRITE {%p}",
|
||||
address.toString(sb), &remoteDpcdWriteMessage);
|
||||
|
||||
parent->messageManager->post(&remoteDpcdWriteMessage, this);
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::handleLinkAddressDownReply()
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
//
|
||||
// Copy link address results out of the structure
|
||||
// - We cannot process the contents until after
|
||||
// we've programmed the GUID. The reasoning is
|
||||
// that we need to make sure we do not enumerate
|
||||
// devices not yet in a usable state.
|
||||
//
|
||||
childCount = linkAddressMessage.resultCount();
|
||||
for (unsigned i = 0; i < childCount; i++)
|
||||
{
|
||||
child[i] = *linkAddressMessage.result(i);
|
||||
|
||||
// also update the portmap
|
||||
parentDevice.portMap.internalMap = 0xFF00; // ports 0x8 to 0xF are internal
|
||||
parentDevice.portMap.validMap |= (1 << child[i].portNumber);
|
||||
if (child[i].isInputPort)
|
||||
{
|
||||
parentDevice.peerDevice = child[i].peerDeviceType;
|
||||
parentDevice.portMap.inputMap |= (1 << child[i].portNumber);
|
||||
if (address == Address(0))
|
||||
{
|
||||
//
|
||||
// For immediate branch device, we will have already read DPCD version
|
||||
// in notifyHPD. So we can just use that to populate here.
|
||||
// For the remaining devices, LAM to parent branch will report the child
|
||||
// DPCD version in reply and we are populating it in
|
||||
// BranchDetection::detectCompleted.
|
||||
//
|
||||
parentDevice.dpcdRevisionMajor = parent->hal->getRevisionMajor();
|
||||
parentDevice.dpcdRevisionMinor = parent->hal->getRevisionMinor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linkAddressMessage.getGUID(parentDevice.peerGuid);
|
||||
if (parentDevice.peerGuid.isGuidZero())
|
||||
{
|
||||
//
|
||||
// We need to give ourselves a non-zero GUID!
|
||||
//
|
||||
parent->guidBuilder.makeGuid(parentDevice.peerGuid);
|
||||
|
||||
if (address == Address(0))
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (locally) for '%s'", address.toString(sb));
|
||||
//
|
||||
// We're locally connected, use the DPCD HAL to write the new GUID
|
||||
//
|
||||
if (AuxRetry::ack != parent->hal->setGUID(parentDevice.peerGuid))
|
||||
{
|
||||
detectCompleted(false);
|
||||
return;
|
||||
}
|
||||
|
||||
detectCompleted(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Let's build a remote DPCD request. Remember the target is the *parent*
|
||||
// of the device we want to talk to
|
||||
//
|
||||
Address parentAddress = address;
|
||||
parentAddress.pop();
|
||||
remoteDpcdWriteMessage.set(parentAddress, address.tail(),
|
||||
NV_DPCD_GUID, sizeof(GUID),
|
||||
(NvU8 *)&parentDevice.peerGuid);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Setting GUID (remotely) for '%s' sent REMOTE_DPCD_WRITE {%p}",
|
||||
address.toString(sb), &remoteDpcdWriteMessage);
|
||||
|
||||
parent->messageManager->post(&remoteDpcdWriteMessage, this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Already had a GUID
|
||||
//
|
||||
detectCompleted(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
if (from == &linkAddressMessage)
|
||||
handleLinkAddressDownReply();
|
||||
else if (from == &remoteDpcdWriteMessage)
|
||||
detectCompleted(true);
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
if (from == &remoteDpcdReadMessage)
|
||||
handleRemoteDpcdReadDownReply();
|
||||
else if (from == &linkAddressMessage)
|
||||
handleLinkAddressDownReply();
|
||||
else if (from == &remoteDpcdWriteMessage)
|
||||
detectCompleted(true);
|
||||
}
|
||||
|
||||
void DiscoveryManager::BranchDetection::start()
|
||||
{
|
||||
//
|
||||
// 1. Create a LINK_ADDRESS_MESSAGE to send to this target so that we can find who he is
|
||||
// 2. Create a REMOTE_DPCD_WRITE to set the GUID for this target
|
||||
// *alternatively* we may have to use the local DPCD HAL to write this
|
||||
// 3. Enumerate any children that we may wish to queue detect on.
|
||||
//
|
||||
linkAddressMessage.set(address);
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Detecting '%s' (sending LINK_ADDRESS_MESSAGE {%p})",
|
||||
address.toString(sb),
|
||||
(MessageManager::Message *)&linkAddressMessage);
|
||||
|
||||
parent->messageManager->post(&linkAddressMessage, this);
|
||||
}
|
||||
|
||||
void DiscoveryManager::SinkDetection::start()
|
||||
{
|
||||
//
|
||||
// Per DP1.4 requirement:
|
||||
// Send PowerUpPhy message first, to make sure device is ready to work
|
||||
//
|
||||
NakData nakData;
|
||||
powerUpPhyMessage.set(address.parent(), address.tail(), NV_TRUE);
|
||||
parent->messageManager->send(&powerUpPhyMessage, nakData);
|
||||
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
// The sink is found in CSN, missing dpcd revision
|
||||
if (bFromCSN)
|
||||
{
|
||||
parent->outstandingSinkDetections.insertBack(this);
|
||||
// Create a LINK_ADDRESS_MESSAGE to send to parent of this target
|
||||
linkAddressMessage.set(address.parent());
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-DM> Detecting '%s' (sending LINK_ADDRESS_MESSAGE {%p})",
|
||||
address.toString(sb),
|
||||
(MessageManager::Message *)&linkAddressMessage);
|
||||
parent->messageManager->post(&linkAddressMessage, this);
|
||||
}
|
||||
else // The sink is found in LAM sent for branch, and with DPCD rev.
|
||||
{
|
||||
// Check if the device already has a GUID
|
||||
// or it is a dongle or on a logical port ; in which case no GUID is required.
|
||||
if ((!device.peerGuid.isGuidZero()) ||
|
||||
(device.peerDevice == Dongle) ||
|
||||
(device.dpcdRevisionMajor <= 1 && device.dpcdRevisionMinor < 2) ||
|
||||
(device.address.tail() > PHYSICAL_PORT_END))
|
||||
{
|
||||
parent->addDevice(device);
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
parent->outstandingSinkDetections.insertBack(this);
|
||||
Address parentAddress = address.parent();
|
||||
remoteDpcdReadMessage.set(parentAddress, address.tail(), NV_DPCD_GUID, sizeof(GUID));
|
||||
|
||||
parent->messageManager->post(&remoteDpcdReadMessage, this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DiscoveryManager::BranchDetection::~BranchDetection()
|
||||
{
|
||||
List::remove(this);
|
||||
|
||||
if (parent->outstandingSinkDetections.isEmpty() &&
|
||||
parent->outstandingBranchDetections.isEmpty())
|
||||
parent->sink->discoveryDetectComplete();
|
||||
|
||||
parent->timer->cancelCallbacks(this);
|
||||
}
|
||||
|
||||
DiscoveryManager::SinkDetection::~SinkDetection()
|
||||
{
|
||||
List::remove(this);
|
||||
|
||||
if (parent->outstandingSinkDetections.isEmpty() &&
|
||||
parent->outstandingBranchDetections.isEmpty())
|
||||
parent->sink->discoveryDetectComplete();
|
||||
|
||||
parent->timer->cancelCallbacks(this);
|
||||
}
|
||||
|
||||
void DiscoveryManager::ReceiverSink::messageProcessed(MessageManager::MessageReceiver * from)
|
||||
{
|
||||
DP_ASSERT((from->getRequestId() == 0x2) && "This receiver is only meant for CSNs");
|
||||
|
||||
// CSNs are broadcast messages. So replies will always go to immediate downstream branch
|
||||
CsnUpReplyContainer * csnReplyContainer = new CsnUpReplyContainer(parent);
|
||||
parent->pendingCsnUpReplies.insertBack(csnReplyContainer);
|
||||
|
||||
//Send acknowledgement to the CSN sender.
|
||||
csnReplyContainer->postUpReply();
|
||||
|
||||
ConnStatusNotifyMessage* csnMessage = static_cast<ConnStatusNotifyMessage*>(from);
|
||||
|
||||
if (csnMessage->getUpRequestData()->isInputPort)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "Concentrator?? Got CSN for an upstream port!");
|
||||
return;
|
||||
}
|
||||
|
||||
Address childAddr;
|
||||
DiscoveryManager::Device * oldDevice = parent->findChildDeviceForBranchWithGuid(csnMessage->getUpRequestData()->guid,
|
||||
csnMessage->getUpRequestData()->port, childAddr);
|
||||
if (!csnMessage->getUpRequestData()->devicePlugged) // some device was unplugged or powered off
|
||||
{
|
||||
if (oldDevice)
|
||||
parent->removeDeviceTree(childAddr);
|
||||
return;
|
||||
}
|
||||
|
||||
handleCSN(from);
|
||||
}
|
||||
|
||||
void DiscoveryManager::ReceiverSink::handleCSN(MessageManager::MessageReceiver * from)
|
||||
{
|
||||
ConnStatusNotifyMessage* csnMessage = static_cast<ConnStatusNotifyMessage*>(from);
|
||||
|
||||
// There is no point in serving an upRequest when no device is present.
|
||||
if (parent->currentDevicesCount == 0)
|
||||
{
|
||||
DP_ASSERT(0 && "DM> No Device in the Topology");
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Check for non-zero GUID in CSN message. It is mandatory to find respective parent
|
||||
// Branch should not send CSN with Zero GUID as a unique GUID is set before CSN
|
||||
//
|
||||
if ((csnMessage->getUpRequestData()->guid).isGuidZero())
|
||||
{
|
||||
DP_ASSERT(0 && "Ignoring CSN. Invalid parent device due to zero-GUID.");
|
||||
return;
|
||||
}
|
||||
|
||||
Address childAddr;
|
||||
unsigned port = csnMessage->getUpRequestData()->port;
|
||||
DiscoveryManager::Device * oldDevice =
|
||||
parent->findChildDeviceForBranchWithGuid(csnMessage->getUpRequestData()->guid,
|
||||
port,
|
||||
childAddr);
|
||||
|
||||
// Check if we already have a device
|
||||
if (oldDevice)
|
||||
{
|
||||
oldDevice->dirty = true;
|
||||
|
||||
// Set the videoSink status of oldDevice again as old device might be a legacy dongle
|
||||
// and a video sink is now added with it
|
||||
oldDevice->videoSink = ((csnMessage->getUpRequestData()->peerDeviceType == Dongle) ?
|
||||
csnMessage->getUpRequestData()->legacyPlugged : true);
|
||||
|
||||
parent->sink->discoveryNewDevice(*oldDevice);
|
||||
return;
|
||||
}
|
||||
|
||||
// Exit if no valid address matched for further detection.
|
||||
if ((childAddr.size() == 0) ||
|
||||
(childAddr.size() > Address::maxHops))
|
||||
{
|
||||
DP_ASSERT(0 && "Ignoring CSN. Invalid parent device due to GUID not found in discovered topology");
|
||||
return;
|
||||
}
|
||||
|
||||
DiscoveryManager::Device newDevice;
|
||||
newDevice.address = childAddr;
|
||||
newDevice.branch = (csnMessage->getUpRequestData()->messagingCapability == true) &&
|
||||
(csnMessage->getUpRequestData()->peerDeviceType == DownstreamBranch);
|
||||
|
||||
newDevice.peerDevice = csnMessage->getUpRequestData()->peerDeviceType;
|
||||
newDevice.legacy = csnMessage->getUpRequestData()->legacyPlugged == true;
|
||||
newDevice.SDPStreams = newDevice.SDPStreamSinks = 0;
|
||||
|
||||
if (csnMessage->getUpRequestData()->devicePlugged) // Check for a new device only if it's plugged
|
||||
{
|
||||
if (newDevice.branch)
|
||||
{
|
||||
newDevice.videoSink = false;
|
||||
// send a LAM and the whole nine yards
|
||||
DP_ASSERT(newDevice.legacy == false);
|
||||
parent->detectBranch(newDevice);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
newDevice.SDPStreams = newDevice.SDPStreamSinks = 1;
|
||||
newDevice.videoSink = ((csnMessage->getUpRequestData()->peerDeviceType == Dongle) ?
|
||||
csnMessage->getUpRequestData()->legacyPlugged : true);
|
||||
|
||||
parent->detectSink(newDevice, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
648
src/common/displayport/src/dp_edid.cpp
Normal file
648
src/common/displayport/src/dp_edid.cpp
Normal file
@@ -0,0 +1,648 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_edid.c *
|
||||
* Implementation of SST/MST EDID reader *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_buffer.h"
|
||||
#include "dp_internal.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
EdidAssembler::EdidAssembler(Edid * const edid, bool bPatchCrc):
|
||||
edid(edid), stream(edid->getBuffer()), oldBlockChecksum(0x00),
|
||||
blocksRead(0), totalBlockCnt(0), retriesCount(0),
|
||||
bPatchCrc(bPatchCrc) {}
|
||||
|
||||
|
||||
bool EdidAssembler::readIsComplete()
|
||||
{
|
||||
return (blocksRead > 0 && blocksRead == totalBlockCnt);
|
||||
}
|
||||
|
||||
void EdidAssembler::reset()
|
||||
{
|
||||
oldBlockChecksum = 0x00;
|
||||
blocksRead = 0;
|
||||
totalBlockCnt = 0;
|
||||
retriesCount = 0;
|
||||
stream.seek(0);
|
||||
}
|
||||
|
||||
void EdidAssembler::postReply(const Buffer & buffer, unsigned sizeCompleted, bool success)
|
||||
{
|
||||
if (!success || buffer.isError())
|
||||
{
|
||||
retriesCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// For SST:
|
||||
// Check the Checksum Error Per Block reading, mark the EDID as "patched" if
|
||||
// CRC is wrong. DPLib will return fallback EDID.
|
||||
//
|
||||
blocksRead++;
|
||||
stream.write(buffer.data, sizeCompleted);
|
||||
if (getEDIDBlockChecksum(buffer))
|
||||
{
|
||||
if (bPatchCrc)
|
||||
edid->patchCrc();
|
||||
edid->setPatchedChecksum(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void EdidAssembler::postReply(unsigned char * data, unsigned sizeCompleted, bool success)
|
||||
{
|
||||
//
|
||||
// For MST: When read of edid block failed, library will attempt to read
|
||||
// same block again, but not more than EDID_POLICY_BLOCK_READ_MAX_RETRY_COUNT times
|
||||
//
|
||||
if (!success)
|
||||
{
|
||||
retriesCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Check the Checksum Error Per Block reading,
|
||||
// library will attempt to read same block again,
|
||||
// but not more than EDID_POLICY_BLOCK_READ_MAX_RETRY_COUNT times.
|
||||
//
|
||||
Buffer buffer(data, EDID_BLOCK_SIZE);
|
||||
if (buffer.isError())
|
||||
{
|
||||
retriesCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
NvU8 newBlockChecksum = getEDIDBlockChecksum(buffer);
|
||||
if (newBlockChecksum)
|
||||
{
|
||||
if (this->oldBlockChecksum != newBlockChecksum) //First failure?
|
||||
{
|
||||
this->oldBlockChecksum = newBlockChecksum;
|
||||
retriesCount++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this->oldBlockChecksum = 0;
|
||||
retriesCount = 0;
|
||||
blocksRead++;
|
||||
stream.write(data, sizeCompleted);
|
||||
}
|
||||
|
||||
bool EdidAssembler::readNextRequest(NvU8 & seg, NvU8 & offset)
|
||||
{
|
||||
//
|
||||
// cache totalBlockCnt,
|
||||
// In EDID 1.3 HF-EEODB, it might changes after 1 extension block read.
|
||||
//
|
||||
if ((blocksRead == 1) || (blocksRead == 2))
|
||||
totalBlockCnt = edid->getBlockCount();
|
||||
|
||||
//
|
||||
// will return false in two scenarios
|
||||
// 1. EDID read is complete, all extension blocks were read
|
||||
// 2. First EDID block was corrupted, then totalBlockCnt = 0
|
||||
//
|
||||
if (blocksRead >= totalBlockCnt)
|
||||
return false;
|
||||
|
||||
// Retry count exceeded for particular block?
|
||||
if (retriesCount > EDID_POLICY_BLOCK_READ_MAX_RETRY_COUNT)
|
||||
return false;
|
||||
|
||||
seg = NvU8(blocksRead >> 1);
|
||||
offset = NvU8((blocksRead & 0x1) * EDID_BLOCK_SIZE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
EDID_V1_IDX_EXTENSION = 0x7E,
|
||||
EDID_V1_IDX_HEADER0 = 0x00,
|
||||
EDID_V1_HEADER0 = 0x00,
|
||||
|
||||
EDID_V1_IDX_HEADER1 = 0x01,
|
||||
EDID_V1_HEADER1 = 0xFF,
|
||||
|
||||
EDID_V1_IDX_VERSION = 0x12,
|
||||
EDID_V1_VERSION_1 = 0x01,
|
||||
EDID_V2_IDX_VERREV = 0x00,
|
||||
|
||||
//
|
||||
// from od_edid.h RM to identify VER 2, use 7:4 bits.
|
||||
// #define EDID_V2_VERREV_VERSION 7:4 /* RW--F */
|
||||
// #define EDID_V2_VERREV_VERSION_2 0x02 /* RWI-V */
|
||||
//
|
||||
// Avoiding FLD_* macros, thus shift VER2 value 4 bits to left
|
||||
//
|
||||
EDID_V2_VERREV_VERSION_2 = 0x02 << 4,
|
||||
EDID_FLAGS_CHKSUM_ATTEMPTS_DP = 0x5,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
// EDID CTA-EXT (CTA 861 Extension) block defines
|
||||
EDID_CTA_EXT_HEADER_OFFSET = 0x00,
|
||||
EDID_CTA_EXT_HEADER = 0x02,
|
||||
EDID_CTA_EXT_VERSION_OFFSET = 0x01,
|
||||
EDID_CTA_EXT_VERSION_3 = 0x03,
|
||||
EDID_CTA_EXT_DATA_BLOCK_HEADER_OFFSET = 0x04,
|
||||
EDID_CTA_EXT_DATA_BLOCK_HEADER_HF_EEODB = 0xE2,
|
||||
EDID_CTA_EXT_DATA_BLOCK_TAG_OFFSET = 0x05,
|
||||
EDID_CTA_EXT_DATA_BLOCK_TAG_HF_EEODB = 0x78,
|
||||
EDID_CTA_EXT_DATA_BLOCK_EXT_COUNT_OFFSET = 0x06,
|
||||
};
|
||||
|
||||
Edid::Edid(): buffer()
|
||||
{
|
||||
// fill EDID buffer with zeroes
|
||||
this->buffer.memZero();
|
||||
checkSumValid = false;
|
||||
forcedCheckSum = false;
|
||||
fallbackEdid = false;
|
||||
patchedChecksum = false;
|
||||
|
||||
// clear the WARFlags and WARData.
|
||||
_WARFlags flagTemp = {0};
|
||||
_WARData dataTemp = {0};
|
||||
WARFlags = flagTemp;
|
||||
WARData = dataTemp;
|
||||
}
|
||||
|
||||
Edid::~Edid()
|
||||
{
|
||||
}
|
||||
|
||||
bool Edid::verifyCRC()
|
||||
{
|
||||
if (getEdidSize() > 0)
|
||||
{
|
||||
this->validateCheckSum();
|
||||
return this->checkSumValid;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// this routine patches the edid crc after it has been overridden for WARs.
|
||||
void Edid::patchCrc()
|
||||
{
|
||||
// we always override some bytes within the first 128
|
||||
// recalculate and fix the checksum for the first page only.
|
||||
unsigned chksum = 0;
|
||||
for (unsigned i = 0; i < 128; i++)
|
||||
{
|
||||
chksum += buffer.data[i];
|
||||
}
|
||||
chksum = chksum & 0xFF;
|
||||
|
||||
if (chksum)
|
||||
buffer.data[127] = 0xFF & (buffer.data[127] + (0x100 - chksum));
|
||||
}
|
||||
|
||||
bool Edid::isChecksumValid() const
|
||||
{
|
||||
// return checksum valid if it is.
|
||||
// else return checksum is valid if checksum wasn't valid but we will assume it to be.
|
||||
return (checkSumValid || forcedCheckSum);
|
||||
}
|
||||
|
||||
bool Edid::isFallbackEdid() const
|
||||
{
|
||||
return fallbackEdid;
|
||||
}
|
||||
|
||||
NvU8 Edid::getFirstPageChecksum()
|
||||
{
|
||||
DP_ASSERT(buffer.getLength() >= 128);
|
||||
if (buffer.getLength() < 128)
|
||||
return 0;
|
||||
else
|
||||
return buffer.data[127];
|
||||
}
|
||||
|
||||
NvU8 Edid::getLastPageChecksum()
|
||||
{
|
||||
NvU32 bufferSize = buffer.getLength();
|
||||
NvU32 checksumLocation = this->getBlockCount() * 128 - 1;
|
||||
|
||||
if (bufferSize == 0 || bufferSize < (this->getBlockCount() * 128))
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-EDID> Edid length is 0 or less than required");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (bufferSize % 128 != 0)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-EDID> Edid length is not a multiple of 128");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return buffer.data[checksumLocation];
|
||||
|
||||
}
|
||||
|
||||
void Edid::validateCheckSum()
|
||||
{
|
||||
// Each page has its own checksum
|
||||
checkSumValid = false;
|
||||
for (unsigned chunk = 0; chunk < this->buffer.length; chunk += 128)
|
||||
{
|
||||
unsigned chksum = 0;
|
||||
for (unsigned i = 0; i < 128; i++)
|
||||
{
|
||||
chksum += buffer.data[i+chunk];
|
||||
}
|
||||
|
||||
if ((chksum & 0xFF) != 0)
|
||||
return;
|
||||
}
|
||||
checkSumValid = true;
|
||||
}
|
||||
|
||||
unsigned Edid::getEdidVersion()
|
||||
{
|
||||
if (buffer.isError() || buffer.length < EDID_BLOCK_SIZE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 0 version is "unknown"
|
||||
unsigned version = 0;
|
||||
|
||||
// Check for Version 1 EDID
|
||||
if (this->buffer.data[EDID_V1_IDX_VERSION] == EDID_V1_VERSION_1)
|
||||
{
|
||||
version = 1;
|
||||
}
|
||||
// Check for version 2 EDID
|
||||
else if (this->buffer.data[EDID_V2_IDX_VERREV] & EDID_V2_VERREV_VERSION_2)
|
||||
{
|
||||
//
|
||||
// Version 2 has 256 bytes by default.
|
||||
// There is a note about an extra 256 byte block if byte 0x7E
|
||||
// bit 7 is set but there's no definition for it listed in
|
||||
// the EDID Version 3 (971113). So, let's just skip it for now.
|
||||
//
|
||||
version = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_ASSERT(version && "Unknown EDID version");
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
const char * Edid::getName() const
|
||||
{
|
||||
static char decodedName[16] = {0};
|
||||
int tail = 0;
|
||||
if (buffer.length < 128)
|
||||
return "?";
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (buffer.data[0x39 + i * 18 + 0] == 0xFC)
|
||||
{
|
||||
for (int j = 0; j < 13; j++)
|
||||
decodedName[tail++] = buffer.data[0x39 + i*18 + 2 + j];
|
||||
break;
|
||||
}
|
||||
decodedName[tail++] = 0;
|
||||
return decodedName;
|
||||
}
|
||||
|
||||
unsigned Edid::getBlockCount()
|
||||
{
|
||||
if (buffer.isError() || buffer.length < EDID_BLOCK_SIZE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned version = getEdidVersion();
|
||||
|
||||
if (version == 1)
|
||||
{
|
||||
NvU32 blockCount = (unsigned) this->buffer.data[EDID_V1_IDX_EXTENSION]+1;
|
||||
|
||||
if (blockCount > EDID_MAX_BLOCK_COUNT)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DPEDID> %s: DDC read returned questionable results: "
|
||||
"Total block Count too high: %d", __FUNCTION__, blockCount);
|
||||
return 1;
|
||||
}
|
||||
//
|
||||
// Check for the HF-EEODB defined in HDMI 2.1 specification.
|
||||
// 1. It is EDID version 1.3 and the extension block count is 1 (total block count = 2)
|
||||
// 2. The 1st EDID extension block is already read. (buffer.length > block size)
|
||||
// 3. The 1st EDID extension block is CTA extension block.
|
||||
// 4. It has HF-EEODB (1st extension block: byte4 == 0xE2 and byte5 == 0x78)
|
||||
//
|
||||
if ((blockCount == 2) && (buffer.length >= EDID_BLOCK_SIZE * 2))
|
||||
{
|
||||
NvU8 *pExt = &(this->buffer.data[EDID_BLOCK_SIZE]);
|
||||
|
||||
//
|
||||
// If it's a CTA-EXT block version 3 and has HF-EEODB
|
||||
// defined, update the total block count.
|
||||
//
|
||||
if ((pExt[EDID_CTA_EXT_HEADER_OFFSET] == EDID_CTA_EXT_HEADER) &&
|
||||
(pExt[EDID_CTA_EXT_VERSION_OFFSET] == EDID_CTA_EXT_VERSION_3) &&
|
||||
(pExt[EDID_CTA_EXT_DATA_BLOCK_HEADER_OFFSET] == EDID_CTA_EXT_DATA_BLOCK_HEADER_HF_EEODB) &&
|
||||
(pExt[EDID_CTA_EXT_DATA_BLOCK_TAG_OFFSET] == EDID_CTA_EXT_DATA_BLOCK_TAG_HF_EEODB))
|
||||
{
|
||||
blockCount = pExt[EDID_CTA_EXT_DATA_BLOCK_EXT_COUNT_OFFSET] + 1;
|
||||
}
|
||||
|
||||
}
|
||||
return blockCount;
|
||||
}
|
||||
else if (version == 2)
|
||||
{
|
||||
//
|
||||
// Version 2 has 256 bytes by default.
|
||||
// There is a note about an extra 256 byte block
|
||||
// if byte 0x7E bit 7 is set, but there's no
|
||||
// definition for it listed in the
|
||||
// EDID Version 3 (971113) So, let's just skip
|
||||
// it for now.
|
||||
//
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unknown EDID version. Skip it.
|
||||
DP_PRINTF(DP_ERROR, "DPEDID> %s: Unknown EDID Version!",__FUNCTION__);
|
||||
DP_ASSERT(0 && "Unknown EDID version!");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned Edid::getEdidSize() const
|
||||
{
|
||||
return this->buffer.length;
|
||||
}
|
||||
|
||||
void DisplayPort::Edid::swap(Edid & right)
|
||||
{
|
||||
swapBuffers(buffer, right.buffer);
|
||||
validateCheckSum();
|
||||
}
|
||||
|
||||
const NvU8 fallbackEdidModes[5][EDID_BLOCK_SIZE] = {
|
||||
// ID Manufacturer Name: NVD
|
||||
// VIDEO INPUT DEFINITION:
|
||||
// Digital Signal
|
||||
// VESA DFP 1.x Compatible
|
||||
|
||||
//
|
||||
// The first 4 entries are for NV_DPCD_SINK_VIDEO_FALLBACK_FORMATS (DPCD 0x20)
|
||||
// 1024x768x60Hz: defined in bit 0.
|
||||
// 1280x720x60Hz: defined in bit 1.
|
||||
// 1920x1080x60Hz: defined in bit 2. [Mandatory]
|
||||
//
|
||||
{
|
||||
// Bit 2: 1920x1080x60 only
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x04, 0xA5, 0x00, 0x00, 0x64,
|
||||
0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F,
|
||||
0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A,
|
||||
0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
|
||||
0x43, 0x00, 0xC0, 0x1C, 0x32, 0x00, 0x00, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDB
|
||||
},
|
||||
{
|
||||
// bit 2 + bit 0: 1920x1080x60 + 1024x768x60
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x04, 0xA5, 0x00, 0x00, 0x64,
|
||||
0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F,
|
||||
0x50, 0x54, 0x00, 0x00, 0x08, 0x00, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A,
|
||||
0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
|
||||
0x43, 0x00, 0xC0, 0x1C, 0x32, 0x00, 0x00, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD3
|
||||
},
|
||||
{
|
||||
// bit 2 + bit 1: 1920x1080x60 + 1280x720x60
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x04, 0xA5, 0x00, 0x00, 0x64,
|
||||
0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F,
|
||||
0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x81, 0xC0,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A,
|
||||
0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
|
||||
0x43, 0x00, 0xC0, 0x1C, 0x32, 0x00, 0x00, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9C
|
||||
},
|
||||
{
|
||||
// bit2 + bit 1 + bit 0: All 3 modes.
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x04, 0xA5, 0x00, 0x00, 0x64,
|
||||
0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F,
|
||||
0x50, 0x54, 0x00, 0x00, 0x08, 0x00, 0x81, 0xC0,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A,
|
||||
0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
|
||||
0x43, 0x00, 0xC0, 0x1C, 0x32, 0x00, 0x00, 0x1C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94
|
||||
},
|
||||
{
|
||||
// ESTABLISHED TIMING I:
|
||||
// 640 X 480 @ 60Hz (IBM,VGA)
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x04, 0x95, 0x00, 0x00, 0x78,
|
||||
0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F,
|
||||
0x50, 0x54, 0x00, 0x20, 0x00, 0x00, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Definition of DPCD 0x20:
|
||||
// 1024x768x60Hz: defined in bit 0.
|
||||
// 1280x720x60Hz: defined in bit 1.
|
||||
// 1920x1080x60Hz: defined in bit 2. [Mandatory]
|
||||
// MIN value is 4 (only 1920x1080 supported)
|
||||
// MAX value is 7 (supports all 3 modes)
|
||||
//
|
||||
#define SINK_VIDEO_FALLBACK_FORMATS_MIN_VALUE (0x00000004)
|
||||
#define SINK_VIDEO_FALLBACK_FORMATS_MAX_VALUE (0x00000007)
|
||||
|
||||
void DisplayPort::makeEdidFallback(Edid & edid, NvU32 fallbackFormatSupported)
|
||||
{
|
||||
const NvU8 *data;
|
||||
|
||||
// fallbackFormatSupported valid values = 4~7
|
||||
if (fallbackFormatSupported > SINK_VIDEO_FALLBACK_FORMATS_MAX_VALUE ||
|
||||
fallbackFormatSupported < SINK_VIDEO_FALLBACK_FORMATS_MIN_VALUE)
|
||||
{
|
||||
// 4 is default fallback mode. (only 640x480)
|
||||
data = fallbackEdidModes[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
data = fallbackEdidModes[fallbackFormatSupported-4];
|
||||
}
|
||||
if (!edid.getBuffer()->resize(EDID_BLOCK_SIZE))
|
||||
return;
|
||||
|
||||
dpMemCopy(edid.getBuffer()->getData(), (const NvU8*)data, EDID_BLOCK_SIZE);
|
||||
DP_ASSERT(edid.verifyCRC());
|
||||
edid.setFallbackFlag(true);
|
||||
}
|
||||
|
||||
/*
|
||||
Fake EDID for DP2VGA dongle when the EDID of the real monitor is not available
|
||||
|
||||
Established Timings [20 CE 00]
|
||||
640 x 480 @ 60Hz
|
||||
800 x 600 @ 72Hz
|
||||
800 x 600 @ 75Hz
|
||||
1024 x 768 @ 60Hz
|
||||
1024 x 768 @ 70Hz
|
||||
1024 x 768 @ 75Hz
|
||||
|
||||
Standard Timings
|
||||
Timing [3159] : 640 x 480 @ 85Hz (4:3)
|
||||
Timing [4559] : 800 x 600 @ 85Hz (4:3)
|
||||
Timing [6159] : 1024 x 768 @ 85Hz (4:3)
|
||||
Timing [714F] : 1152 x 864 @ 75Hz (4:3)
|
||||
|
||||
Detailed Timing [DTD] 1280 x 1024 @ 60.02Hz
|
||||
Pixel Clock : 108.00Mhz
|
||||
HBlank, HBorder : 408, 0
|
||||
HSyncStart, HSyncWidth : 48, 112
|
||||
VBlank, VBorder : 42, 0
|
||||
VSyncStart, VSyncWidth : 1, 3
|
||||
Image size : 376mm x 301mm
|
||||
DigitalSeparate +/+
|
||||
*/
|
||||
|
||||
void DisplayPort::makeEdidFallbackVGA(Edid & edid)
|
||||
{
|
||||
const NvU8 data[] = {
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x3A, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x13, 0x01, 0x03, 0x80, 0x26, 0x1E, 0x78, 0xEE, 0xCB, 0x05, 0xA3, 0x58, 0x4C, 0x9B, 0x25,
|
||||
0x13, 0x50, 0x54, 0x20, 0xCE, 0x00, 0x31, 0x59, 0x45, 0x59, 0x61, 0x59, 0x71, 0x4F, 0x81, 0x40,
|
||||
0x81, 0x80, 0x01, 0x01, 0x01, 0x01, 0x30, 0x2A, 0x00, 0x98, 0x51, 0x00, 0x2A, 0x40, 0x30, 0x70,
|
||||
0x13, 0x00, 0x78, 0x2D, 0x11, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x30, 0x55, 0x1F,
|
||||
0x52, 0x0E, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x4C,
|
||||
0x43, 0x44, 0x5F, 0x56, 0x47, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8
|
||||
};
|
||||
|
||||
if (!edid.getBuffer()->resize(sizeof(data)))
|
||||
return;
|
||||
|
||||
dpMemCopy(edid.getBuffer()->getData(), (const NvU8*)data, sizeof data);
|
||||
DP_ASSERT(edid.verifyCRC());
|
||||
edid.setFallbackFlag(true);
|
||||
}
|
||||
|
||||
NvU8 DisplayPort::getEDIDBlockChecksum(const Buffer & buffer)
|
||||
{
|
||||
DP_ASSERT(buffer.getLength() == 128);
|
||||
|
||||
unsigned chksum = 0;
|
||||
for (unsigned i = 0; i < buffer.getLength(); i++)
|
||||
{
|
||||
chksum += buffer.data[i];
|
||||
}
|
||||
chksum = chksum & 0xFF;
|
||||
return (NvU8)chksum;
|
||||
}
|
||||
|
||||
bool DisplayPort::Edid::isValidHeader() const
|
||||
{
|
||||
NvU8 validHeaderData[8] = {
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0x00};
|
||||
|
||||
if (buffer.getLength() < 0x8)
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < 8; i++)
|
||||
{
|
||||
if (buffer.data[i] != validHeaderData[i])
|
||||
{
|
||||
DP_PRINTF(DP_WARNING, "DP-EDID> Invalid EDID Header");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
2186
src/common/displayport/src/dp_evoadapter.cpp
Normal file
2186
src/common/displayport/src/dp_evoadapter.cpp
Normal file
File diff suppressed because it is too large
Load Diff
745
src/common/displayport/src/dp_groupimpl.cpp
Normal file
745
src/common/displayport/src/dp_groupimpl.cpp
Normal file
@@ -0,0 +1,745 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_groupimpl.cpp *
|
||||
* DP device group implementation *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_connector.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_deviceimpl.h"
|
||||
#include "dp_groupimpl.h"
|
||||
#include "dp_connectorimpl.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
void GroupImpl::update(Device * dev, bool allocationState)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
Address devAddress = dev->getTopologyAddress();
|
||||
DP_USED(sb);
|
||||
|
||||
// Do not map a stream that is not yet turned on in the gpu. An update shall be sent later during NAE.
|
||||
if (allocationState && !this->isHeadAttached())
|
||||
return;
|
||||
|
||||
//
|
||||
// Do not enable the stream on an unplugged device but take care of
|
||||
// detached devices. We need to clear PBNs allocated by such devices
|
||||
//
|
||||
if (allocationState && !((DeviceImpl *)dev)->plugged)
|
||||
return;
|
||||
|
||||
//
|
||||
// Check if Parent's messageManager exist or not. This is required for cases
|
||||
// where parent branch itself has been unplugged. No message can be sent in this case.
|
||||
//
|
||||
if (!parent->messageManager)
|
||||
return;
|
||||
|
||||
if (timeslot.count == 0 ||
|
||||
((DeviceImpl *)dev)->payloadAllocated == allocationState)
|
||||
return;
|
||||
|
||||
if (!dev->getParent() || !((dev->getParent())->isPlugged()))
|
||||
{
|
||||
DeviceImpl * parentDev = NULL;
|
||||
|
||||
//
|
||||
// Send ALLOCATE_PAYLOAD with pbn 0 to parent port of previous branch
|
||||
// Find first plugged parent branch & send message to it
|
||||
//
|
||||
while(devAddress.size() > 2)
|
||||
{
|
||||
devAddress.pop();
|
||||
parentDev = parent->findDeviceInList(devAddress.parent());
|
||||
|
||||
if (parentDev && parentDev->isPlugged())
|
||||
break;
|
||||
}
|
||||
|
||||
// If no parent found simply return as we don't have a valid address to send message
|
||||
if (!parentDev)
|
||||
return;
|
||||
}
|
||||
|
||||
NakData nakData;
|
||||
for (int retries = 0 ; retries < 7; retries++)
|
||||
{
|
||||
AllocatePayloadMessage allocate;
|
||||
unsigned sink = 0; // hardcode the audio sink to 0th in the device.
|
||||
allocate.set(devAddress.parent(), devAddress.tail(),
|
||||
dev->isAudioSink() ? 1 : 0, streamIndex, allocationState ? timeslot.PBN : 0,
|
||||
&sink, true);
|
||||
|
||||
// Trigger a refetch of epr
|
||||
((DeviceImpl *)dev)->bandwidth.enum_path.dataValid = false;
|
||||
DeviceImpl * tail = (DeviceImpl *) dev;
|
||||
while (tail && tail->getParent())
|
||||
{
|
||||
tail->bandwidth.enum_path.dataValid = false;
|
||||
tail = (DeviceImpl *)tail->getParent();
|
||||
}
|
||||
|
||||
if (parent->messageManager->send(&allocate, nakData))
|
||||
{
|
||||
if (allocationState)
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-TM> Attached stream:%d to %s", streamIndex, dev->getTopologyAddress().toString(sb));
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-TM> Detached stream:%d from %s", streamIndex, dev->getTopologyAddress().toString(sb));
|
||||
}
|
||||
|
||||
((DeviceImpl *)dev)->payloadAllocated = allocationState;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// we should not have ideally reached here unless allocate payload failed.
|
||||
if (allocationState)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-TM> Allocate_payload: Failed to ATTACH stream:%d to %s", streamIndex, dev->getTopologyAddress().toString(sb));
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-TM> Allocate_payload: Failed to DETACH stream:%d from %s", streamIndex, dev->getTopologyAddress().toString(sb));
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GroupImpl::insert(Device * dev)
|
||||
{
|
||||
DP_ASSERT(!headInFirmware && "Cannot add or remove from a firmware group. You must perform a modeset away from the device");
|
||||
DeviceImpl * di = (DeviceImpl *)dev;
|
||||
|
||||
if (isHeadAttached())
|
||||
{
|
||||
if (di->activeGroup && di->activeGroup != this)
|
||||
{
|
||||
DP_ASSERT(0 && "Device already in active group, cannot add to another active group!");
|
||||
return;
|
||||
}
|
||||
di->activeGroup = this;
|
||||
}
|
||||
|
||||
members.insertFront(di);
|
||||
|
||||
// Is HDCP on for this group?
|
||||
// YES? Disable HDCP (ECF)
|
||||
this->hdcpPreviousStatus = this->hdcpEnabled;
|
||||
if (this->hdcpEnabled)
|
||||
{
|
||||
NvU64 ecf = 0x0;
|
||||
NvU64 countOnes = 0x0;
|
||||
NvU64 mask = 0x0;
|
||||
// Get the MASK for the all active groups which is ECF enabled.
|
||||
for (ListElement * i = parent->activeGroups.begin(); i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group->hdcpEnabled)
|
||||
{
|
||||
countOnes = (((NvU64)1) << group->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << group->timeslot.begin;
|
||||
ecf |= mask;
|
||||
}
|
||||
}
|
||||
|
||||
countOnes = (((NvU64)1) << this->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << this->timeslot.begin;
|
||||
ecf &= ~mask;
|
||||
|
||||
parent->main->configureAndTriggerECF(ecf);
|
||||
this->hdcpEnabled = false;
|
||||
}
|
||||
|
||||
update(dev, true);
|
||||
|
||||
// After Add Stream, we turn the encryption back if it was on.
|
||||
if (this->hdcpPreviousStatus)
|
||||
{
|
||||
hdcpSetEncrypted(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GroupImpl::remove(Device * dev)
|
||||
{
|
||||
DP_ASSERT(!headInFirmware && "Cannot add or remove from a firmware group. You must perform a modeset away from the device");
|
||||
|
||||
DeviceImpl * di = (DeviceImpl *)dev;
|
||||
|
||||
if (isHeadAttached())
|
||||
{
|
||||
/*
|
||||
* The device may become lost and free after removal from the active
|
||||
* group. Therefore, also remove the device from the
|
||||
* 'dscEnabledDevices' list and ensure that its dangling pointer is not
|
||||
* left behind.
|
||||
*/
|
||||
if (parent->dscEnabledDevices.contains(dev)) {
|
||||
parent->dscEnabledDevices.remove(dev);
|
||||
}
|
||||
|
||||
di->activeGroup = 0;
|
||||
}
|
||||
members.remove(di);
|
||||
|
||||
update(dev, false);
|
||||
|
||||
updateVbiosScratchRegister(dev);
|
||||
}
|
||||
|
||||
void GroupImpl::destroy()
|
||||
{
|
||||
ConnectorImpl* parent = NULL;
|
||||
for (Device * i = enumDevices(0); i; i = enumDevices(i))
|
||||
remove(i);
|
||||
|
||||
// Cancel any queue the auth callback.
|
||||
cancelHdcpCallbacks();
|
||||
|
||||
if (streamEncryptionStatusDetection)
|
||||
{
|
||||
delete streamEncryptionStatusDetection;
|
||||
streamEncryptionStatusDetection = 0;
|
||||
}
|
||||
parent = this->parent;
|
||||
|
||||
if (parent)
|
||||
{
|
||||
if (!parent->activeGroups.isEmpty())
|
||||
{
|
||||
for (ListElement * i = parent->activeGroups.begin(); i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group == this)
|
||||
{
|
||||
parent->activeGroups.remove(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!parent->inactiveGroups.isEmpty())
|
||||
{
|
||||
for (ListElement * i = parent->inactiveGroups.begin(); i != parent->inactiveGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group == this)
|
||||
{
|
||||
parent->inactiveGroups.remove(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parent->intransitionGroups.contains(this))
|
||||
{
|
||||
parent->intransitionGroups.remove(this);
|
||||
}
|
||||
|
||||
if (parent->addStreamMSTIntransitionGroups.contains(this))
|
||||
{
|
||||
parent->addStreamMSTIntransitionGroups.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
void GroupImpl::cancelHdcpCallbacks()
|
||||
{
|
||||
authRetries = 0;
|
||||
|
||||
parent->timer->cancelCallback(this, &tagHDCPReauthentication);
|
||||
parent->timer->cancelCallback(this, &tagStreamValidation);
|
||||
|
||||
QSESetECFRetries = 0;
|
||||
parent->timer->cancelCallback(this, &tagMSTQSEandSetECF);
|
||||
}
|
||||
|
||||
Device * GroupImpl::enumDevices(Device * previousDevice)
|
||||
{
|
||||
return members.next(previousDevice);
|
||||
}
|
||||
|
||||
void GroupImpl::expired(const void * tag)
|
||||
{
|
||||
if (tag == &tagHDCPReauthentication)
|
||||
{
|
||||
HDCPState hdcpState = {0};
|
||||
parent->main->configureHDCPGetHDCPState(hdcpState);
|
||||
|
||||
if (authRetries < HDCP_AUTHENTICATION_RETRIES)
|
||||
{
|
||||
this->hdcpEnabled = hdcpState.HDCP_State_Encryption;
|
||||
if (hdcpState.HDCP_State_Authenticated)
|
||||
{
|
||||
parent->isHDCPAuthOn = true;
|
||||
authRetries = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned authDelay = (hdcpState.HDCP_State_22_Capable ?
|
||||
HDCP22_AUTHENTICATION_COOLDOWN : HDCP_AUTHENTICATION_COOLDOWN);
|
||||
|
||||
authRetries++;
|
||||
parent->main->configureHDCPRenegotiate();
|
||||
parent->isHDCPAuthOn = false;
|
||||
parent->timer->queueCallback(this, &tagHDCPReauthentication,
|
||||
authDelay);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
parent->isHDCPAuthOn = this->hdcpEnabled = false;
|
||||
}
|
||||
}
|
||||
else if ( tag == &tagStreamValidation)
|
||||
{
|
||||
if (!(this->streamValidationDone))
|
||||
{
|
||||
// If we are here we need to debug what has caused the problem for not getting notification from DD.
|
||||
DP_ASSERT(0 && "DP> Didn't get final notification." );
|
||||
}
|
||||
}
|
||||
else if (tag == &tagMSTQSEandSetECF)
|
||||
{
|
||||
if (QSESetECFRetries < HDCP_QSEANDSETECF_RETRIES)
|
||||
{
|
||||
HDCPState hdcpState = {0};
|
||||
parent->main->configureHDCPGetHDCPState(hdcpState);
|
||||
this->hdcpEnabled = parent->isHDCPAuthOn = hdcpState.HDCP_State_Authenticated;
|
||||
|
||||
// Wait till authenticated then enable QSE and set ECF.
|
||||
if (parent->isHDCPAuthOn)
|
||||
{
|
||||
QSESetECFRetries = 0;
|
||||
parent->timer->cancelCallback(this, &tagMSTQSEandSetECF);
|
||||
hdcpMSTQSEandSetECF();
|
||||
}
|
||||
else
|
||||
{
|
||||
QSESetECFRetries++;
|
||||
parent->timer->queueCallback(this, &tagMSTQSEandSetECF,
|
||||
HDCP_QSEANDSETECF_COOLDOWN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_ASSERT(0 && "MST HDCP not authenticated within timeout and fail to set ECF." );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bForceClear stands for bForceClearECF.
|
||||
bool GroupImpl::hdcpSetEncrypted(bool encrypted, NvU8 streamType, NvBool bForceClear, NvBool bAddStreamBack)
|
||||
{
|
||||
|
||||
if (encrypted == true)
|
||||
{
|
||||
bool bNeedReNegotiate = false;
|
||||
HDCPState hdcpState = {0};
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DP-GRP: enable encryption with type=%d.", streamType);
|
||||
|
||||
// enumerate the displays in the group and see if they are hdcp capable.
|
||||
Device * d = 0;
|
||||
bool isHdcpCapable = false;
|
||||
for (d = ((Group*)this)->enumDevices(0); d != 0; d = ((Group*)this)->enumDevices(d))
|
||||
{
|
||||
NvU8 Bcaps = (NvU8)(((DeviceImpl*)d)->nvBCaps[0]);
|
||||
|
||||
if ((FLD_TEST_DRF(_DPCD, _HDCP_BCAPS_OFFSET, _HDCP_CAPABLE, _YES, Bcaps)) &&
|
||||
(((DeviceImpl*)d)->isHDCPCap == True))
|
||||
{
|
||||
isHdcpCapable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isHdcpCapable == false)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-GRP: group does not contain a hdcp capable device.");
|
||||
return false;
|
||||
}
|
||||
|
||||
parent->main->configureHDCPGetHDCPState(hdcpState);
|
||||
|
||||
// Clear dplib authentication state if RM reports not authenticated.
|
||||
if (!hdcpState.HDCP_State_Authenticated)
|
||||
{
|
||||
parent->isHDCPAuthOn = this->hdcpEnabled = false;
|
||||
}
|
||||
|
||||
// Update stream content type and trigger negotiation if need.
|
||||
if ((hdcpState.HDCP_State_22_Capable) &&
|
||||
(false == parent->main->setStreamType(streamIndex, streamType, &bNeedReNegotiate)))
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-GRP: group set stream type failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!parent->isHDCPAuthOn || bNeedReNegotiate)
|
||||
{
|
||||
cancelHdcpCallbacks();
|
||||
|
||||
parent->main->configureHDCPRenegotiate();
|
||||
parent->main->configureHDCPGetHDCPState(hdcpState);
|
||||
if (hdcpState.HDCP_State_Encryption)
|
||||
{
|
||||
parent->isHDCPAuthOn = this->hdcpEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
parent->isHDCPAuthOn = this->hdcpEnabled = false;
|
||||
parent->timer->queueCallback(this, &tagHDCPReauthentication, HDCP_AUTHENTICATION_COOLDOWN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// SST and non128b/132b is done when it's authenticated.
|
||||
if (!(parent->linkUseMultistream())
|
||||
)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (parent->linkUseMultistream()
|
||||
)
|
||||
{
|
||||
// Check if authenticated else wait it's authenticated then assigning ECF.
|
||||
if(!parent->isHDCPAuthOn || bNeedReNegotiate)
|
||||
{
|
||||
parent->timer->queueCallback(this, &tagMSTQSEandSetECF, HDCP_QSEANDSETECF_COOLDOWN);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
parent->timer->cancelCallback(this, &tagMSTQSEandSetECF);
|
||||
hdcpMSTQSEandSetECF();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parent->isHDCPAuthOn)
|
||||
{
|
||||
if (!(parent->linkUseMultistream())
|
||||
)
|
||||
{
|
||||
parent->main->configureHDCPDisableAuthentication();
|
||||
parent->isHDCPAuthOn = this->hdcpEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
NvU64 ecf = 0x0;
|
||||
NvU64 countOnes = 0x0;
|
||||
NvU64 mask = 0x0;
|
||||
|
||||
// Get the MASK for the all active groups which is ECF enabled.
|
||||
for (ListElement * i = parent->activeGroups.begin(); i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group->hdcpEnabled)
|
||||
{
|
||||
countOnes = (((NvU64)1) << group->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << group->timeslot.begin;
|
||||
ecf |= mask;
|
||||
}
|
||||
}
|
||||
|
||||
//Just clear the ECF not turn off the auth.
|
||||
for (ListElement * i = parent->activeGroups.begin(); i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
countOnes = (((NvU64)1) << group->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << group->timeslot.begin;
|
||||
ecf &= ~mask;
|
||||
}
|
||||
}
|
||||
|
||||
parent->main->configureAndTriggerECF(ecf, bForceClear, bAddStreamBack);
|
||||
|
||||
for (ListElement * i = parent->activeGroups.begin(); i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
group->hdcpEnabled = false;
|
||||
{ // Inform ConnectorEventSink that we have disabled HDCP on this Device
|
||||
Device * d = 0;
|
||||
for (d = ((Group*)this)->enumDevices(0); d != 0; d = ((Group*)this)->enumDevices(d))
|
||||
{
|
||||
if (((DeviceImpl*)d)->isHDCPCap == True)
|
||||
{
|
||||
parent->sink->notifyHDCPCapDone(d, False);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
//DP_OPTION_HDCP_SUPPORT_ENABLE
|
||||
|
||||
bool GroupImpl::hdcpGetEncrypted()
|
||||
{
|
||||
//
|
||||
// Returns whether encryption is currently enabled
|
||||
// After the setECFencyption we just set the flag for this group and make the default as false.
|
||||
//
|
||||
if (parent->isHDCPAuthOn)
|
||||
{
|
||||
return this->hdcpEnabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void GroupImpl::hdcpMSTQSEandSetECF()
|
||||
{
|
||||
|
||||
//
|
||||
// We become passive and wait for the Stream_Status_Change coming.
|
||||
// Otherwise, we might not have the change to get the update KSVlist to
|
||||
// validate it. Before, Naresh's Stream_Status_Change p4r in.
|
||||
// We just simple turn it on. (which can be the option for non-QSE
|
||||
// (AKA intel/AMD plan) branch.)
|
||||
//
|
||||
|
||||
//
|
||||
// Enable sending QSES message only when regkey 'DISABLE_QSES' set to 0
|
||||
// in DD's path.
|
||||
// This is added to provide driver for ST and not to be productized.
|
||||
//
|
||||
if ((parent->bIsEncryptionQseValid) &&
|
||||
(!parent->main->getRegkeyValue(NV_DP_REGKEY_DISABLE_QSES))
|
||||
)
|
||||
{
|
||||
for (ListElement * i = parent->activeGroups.begin();
|
||||
i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
HDCPValidateData hdcpValidateData = {0};
|
||||
parent->main->configureHDCPValidateLink(hdcpValidateData);
|
||||
parent->qseNonceGenerator->clientIdBuilder(hdcpValidateData.aN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Turn on the ECF set ECF on according to the group's active stream.
|
||||
// Set flag for the goup for later getting status using.
|
||||
//
|
||||
NvU64 ecf = 0x0;
|
||||
NvU64 countOnes = 0x0;
|
||||
NvU64 mask = 0x0;
|
||||
|
||||
// Get the MASK for the all active groups which is ECF enabled.
|
||||
for (ListElement * i = parent->activeGroups.begin();
|
||||
i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group->hdcpEnabled)
|
||||
{
|
||||
countOnes = (((NvU64)1) << group->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << group->timeslot.begin;
|
||||
ecf |= mask;
|
||||
}
|
||||
}
|
||||
|
||||
for (ListElement * i = parent->activeGroups.begin();
|
||||
i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
countOnes = (((NvU64)1) << group->timeslot.count) - 1;
|
||||
|
||||
mask = countOnes << group->timeslot.begin;
|
||||
ecf |= mask;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the ECF with new added group.
|
||||
parent->main->configureAndTriggerECF(ecf);
|
||||
|
||||
//
|
||||
// Enable sending QSES message only when regkey 'DISABLE_QSES' set to 0 in
|
||||
// DD's path.
|
||||
// This is added to provide driver for ST and not to be productized.
|
||||
//
|
||||
if ((parent->bIsEncryptionQseValid) &&
|
||||
(!parent->main->getRegkeyValue(NV_DP_REGKEY_DISABLE_QSES))
|
||||
)
|
||||
{
|
||||
for (ListElement * i = parent->activeGroups.begin();
|
||||
i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
if (NULL == group->streamEncryptionStatusDetection)
|
||||
{
|
||||
group->streamEncryptionStatusDetection =
|
||||
new StreamEncryptionStatusDetection(group, parent);
|
||||
}
|
||||
if (group->streamEncryptionStatusDetection)
|
||||
{
|
||||
parent->bValidQSERequest = true;
|
||||
group->streamEncryptionStatusDetection->sendQSEMessage(group);
|
||||
parent->timer->queueCallback(group,
|
||||
&(group->tagStreamValidation),
|
||||
HDCP_STREAM_VALIDATION_REQUEST_COOLDOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (ListElement * i = parent->activeGroups.begin();
|
||||
i != parent->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
|
||||
if (this->headIndex == group->headIndex)
|
||||
{
|
||||
group->hdcpEnabled = true;
|
||||
{ // Inform ConnectorEventSink that we have enabled HDCP on this Device
|
||||
Device * d = 0;
|
||||
for (d = ((Group*)this)->enumDevices(0); d != 0; d = ((Group*)this)->enumDevices(d))
|
||||
{
|
||||
if (((DeviceImpl*)d)->isHDCPCap == True)
|
||||
{
|
||||
parent->sink->notifyHDCPCapDone(d, True);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GroupImpl::updateVbiosScratchRegister(Device * lastDev)
|
||||
{
|
||||
if (!parent->bDisableVbiosScratchRegisterUpdate &&
|
||||
parent->lastDeviceSetForVbios == lastDev)
|
||||
{
|
||||
// Take a device which is part of a group
|
||||
for (ListElement * e = parent->deviceList.begin();
|
||||
e != parent->deviceList.end(); e = e->next)
|
||||
{
|
||||
DeviceImpl * dev = (DeviceImpl *)e;
|
||||
|
||||
if (dev->activeGroup && dev->activeGroup->isHeadAttached())
|
||||
{
|
||||
NvU32 address = 0;
|
||||
NvU32 addrSize = dev->getTopologyAddress().size();
|
||||
|
||||
// Set the MS_SCRATCH_REGISTER for lighted up display
|
||||
for (NvU32 i = addrSize; i; --i)
|
||||
{
|
||||
address |= ((dev->address[i-1] & 0xF) << ((addrSize - i)*4));
|
||||
}
|
||||
|
||||
parent->main->configureMsScratchRegisters(address, addrSize, 3);
|
||||
|
||||
parent->lastDeviceSetForVbios = (Device *)dev;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Helper function for attaching and detaching heads.
|
||||
//
|
||||
// For attach, we will assert if group already has head attached but for
|
||||
// some device in the group, active group did not point to current group.
|
||||
// For detach, we will assert if the group does not have head attached but
|
||||
// some device in group has an active group OR head is marked attached but
|
||||
// not all devies in the group have the current group as active group.
|
||||
// This also sets or clears dev->activeGroup for each contained
|
||||
// device.
|
||||
//
|
||||
void GroupImpl::setHeadAttached(bool attached)
|
||||
{
|
||||
for (Device * i = enumDevices(0); i; i = enumDevices(i))
|
||||
{
|
||||
DeviceImpl *di = (DeviceImpl *)i;
|
||||
|
||||
if (attached)
|
||||
{
|
||||
if (headAttached)
|
||||
{
|
||||
DP_ASSERT(di->activeGroup == this);
|
||||
}
|
||||
di->activeGroup = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!headAttached)
|
||||
{
|
||||
DP_ASSERT(di->activeGroup == NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_ASSERT(di->activeGroup == this);
|
||||
}
|
||||
di->activeGroup = NULL;
|
||||
}
|
||||
}
|
||||
headAttached = attached;
|
||||
}
|
||||
81
src/common/displayport/src/dp_guid.cpp
Normal file
81
src/common/displayport/src/dp_guid.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_guid.cpp *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_guid.h"
|
||||
#include "dp_buffer.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
//
|
||||
// Linear congruential random number generator
|
||||
// Seed values chosen from numerical methods
|
||||
//
|
||||
NvU32 GUIDBuilder::random()
|
||||
{
|
||||
previousRandom = static_cast<NvU32>(( ((NvU64)1664525 * previousRandom + 1013904223) & 0xFFFFFFFF) & 0xFF);
|
||||
return previousRandom;
|
||||
}
|
||||
|
||||
|
||||
GUIDBuilder::GUIDBuilder(Timer * source, NvU32 salt)
|
||||
: salt(salt), source(source)
|
||||
{
|
||||
previousRandom = static_cast<NvU32>(( source->getTimeUs() & 0xFFFFFFFF) & 0xFF);
|
||||
}
|
||||
|
||||
void GUIDBuilder::makeGuid(GUID & guid)
|
||||
{
|
||||
NvU64 currentTimer = source->getTimeUs();
|
||||
guid.data[0] = static_cast<NvU8>(( salt >> 24) & 0xFF);
|
||||
guid.data[1] = static_cast<NvU8>(( salt >> 16) & 0xFF);
|
||||
guid.data[2] = static_cast<NvU8>(( salt >> 8) & 0xFF);
|
||||
guid.data[3] = static_cast<NvU8>(( salt) & 0xFF);
|
||||
|
||||
guid.data[4] = static_cast<NvU8>(( currentTimer >> 56) & 0xFF);
|
||||
guid.data[5] = static_cast<NvU8>(( currentTimer >> 48) & 0xFF);
|
||||
guid.data[6] = static_cast<NvU8>(( currentTimer >> 40) & 0xFF);
|
||||
guid.data[7] = static_cast<NvU8>(( currentTimer >> 32) & 0xFF);
|
||||
guid.data[8] = static_cast<NvU8>(( currentTimer >> 24) & 0xFF);
|
||||
guid.data[9] = static_cast<NvU8>(( currentTimer >> 16) & 0xFF);
|
||||
guid.data[10] = static_cast<NvU8>(( currentTimer >> 8) & 0xFF);
|
||||
guid.data[11] = static_cast<NvU8>(( currentTimer) & 0xFF);
|
||||
|
||||
unsigned rnd = random();
|
||||
guid.data[12] = static_cast<NvU8>(( rnd >> 24) & 0xFF);
|
||||
guid.data[13] = static_cast<NvU8>(( rnd >> 16) & 0xFF);
|
||||
guid.data[14] = static_cast<NvU8>(( rnd >> 8) & 0xFF);
|
||||
guid.data[15] = static_cast<NvU8>(( rnd) & 0xFF);
|
||||
|
||||
//
|
||||
// Spin until we get a new timer counter
|
||||
// This guarantees a monotonitically increased counter
|
||||
//
|
||||
while (source->getTimeUs() == currentTimer)
|
||||
;
|
||||
}
|
||||
157
src/common/displayport/src/dp_linkconfig.cpp
Normal file
157
src/common/displayport/src/dp_linkconfig.cpp
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_linkconfig.cpp *
|
||||
* DP LinkConfiguration implementation *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
|
||||
#include "dp_linkconfig.h"
|
||||
#include "dp_regkeydatabase.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
bool LinkConfiguration::lowerConfig(bool bReduceLaneCnt)
|
||||
{
|
||||
//
|
||||
// TODO: bReduceLaneCnt is set to fallback to 4 lanes with lower
|
||||
// valid link rate. But we should reset to max lane count
|
||||
// sink supports instead.
|
||||
//
|
||||
|
||||
LinkRate lowerRate = policy.getLinkRates()->getLowerRate(peakRate);
|
||||
|
||||
if(bReduceLaneCnt)
|
||||
{
|
||||
// Reduce laneCount before reducing linkRate
|
||||
if(lanes == laneCount_1)
|
||||
{
|
||||
if (lowerRate)
|
||||
{
|
||||
lanes = laneCount_4;
|
||||
peakRate = lowerRate;
|
||||
}
|
||||
else
|
||||
{
|
||||
lanes = laneCount_0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lanes /= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reduce the link rate instead of lane count
|
||||
if (lowerRate)
|
||||
{
|
||||
peakRate = lowerRate;
|
||||
}
|
||||
else
|
||||
{
|
||||
lanes /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
minRate = linkOverhead(peakRate);
|
||||
return lanes != laneCount_0;
|
||||
}
|
||||
|
||||
LinkConfiguration::LinkConfiguration(LinkPolicy * p, unsigned lanes, LinkRate peakRate,
|
||||
bool enhancedFraming, bool MST, bool disablePostLTRequest,
|
||||
bool bEnableFEC, bool bDisableLTTPR, bool bDisableDownspread)
|
||||
: lanes(lanes), peakRatePossible(peakRate), peakRate(peakRate),
|
||||
enhancedFraming(enhancedFraming), multistream(MST),
|
||||
disablePostLTRequest(disablePostLTRequest), bEnableFEC(bEnableFEC),
|
||||
bDisableLTTPR(bDisableLTTPR), bDisableDownspread(bDisableDownspread),
|
||||
linkTrainCounter(0)
|
||||
{
|
||||
// downrate for spread and FEC
|
||||
minRate = linkOverhead(peakRate);
|
||||
if (p)
|
||||
{
|
||||
policy = *p;
|
||||
}
|
||||
}
|
||||
|
||||
NvU64 LinkConfiguration::getBytesPerTimeslot()
|
||||
{
|
||||
NvU64 bytes_per_timeslot;
|
||||
|
||||
// spread is already considered during pbn calculation for required mode. No need to consider here
|
||||
{
|
||||
// 8b/10b case
|
||||
bytes_per_timeslot = getTotalDataRate() / 64;
|
||||
}
|
||||
|
||||
return bytes_per_timeslot;
|
||||
}
|
||||
|
||||
NvU32 LinkConfiguration::PBNForSlots(NvU32 slots)
|
||||
{
|
||||
NvU64 bytes_per_pbn = 54 * 1000000 / 64;
|
||||
NvU64 bytes_per_timeslot = getBytesPerTimeslot();
|
||||
|
||||
return (NvU32)(bytes_per_timeslot * slots/ bytes_per_pbn); // Rounded down
|
||||
}
|
||||
|
||||
NvU32 LinkConfiguration::slotsForPBN(NvU32 allocatedPBN, bool usable)
|
||||
{
|
||||
NvU64 bytes_per_pbn = 54 * 1000000 / 64;
|
||||
NvU64 bytes_per_timeslot = getBytesPerTimeslot();
|
||||
NvU32 slots;
|
||||
|
||||
if (bytes_per_timeslot == 0)
|
||||
return (NvU32)-1;
|
||||
|
||||
if (usable)
|
||||
{
|
||||
// round down to find the usable integral slots for a given value of PBN.
|
||||
slots = (NvU32)divide_floor(allocatedPBN * bytes_per_pbn, bytes_per_timeslot);
|
||||
DP_ASSERT(slots <= 64);
|
||||
}
|
||||
else
|
||||
{
|
||||
slots = (NvU32)divide_ceil(allocatedPBN * bytes_per_pbn, bytes_per_timeslot);
|
||||
}
|
||||
|
||||
return slots;
|
||||
}
|
||||
|
||||
void LinkConfiguration::pbnRequired(const ModesetInfo & modesetInfo, unsigned & base_pbn, unsigned & slots, unsigned & slots_pbn)
|
||||
{
|
||||
|
||||
base_pbn = pbnForMode(modesetInfo);
|
||||
|
||||
if (bEnableFEC)
|
||||
{
|
||||
// IF FEC is enabled, we need to consider 2.4% overhead as per DP1.4 spec.
|
||||
base_pbn = (NvU32)(divide_ceil(base_pbn * 1000, 976));
|
||||
}
|
||||
|
||||
slots = slotsForPBN(base_pbn);
|
||||
slots_pbn = PBNForSlots(slots);
|
||||
}
|
||||
159
src/common/displayport/src/dp_list.cpp
Normal file
159
src/common/displayport/src/dp_list.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* List **************************************\
|
||||
* *
|
||||
* Module: dp_list.cpp *
|
||||
* Simple doubly linked list *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_list.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
ListElement::ListElement()
|
||||
: next(0),
|
||||
prev(0)
|
||||
{
|
||||
}
|
||||
|
||||
ListElement::~ListElement()
|
||||
{
|
||||
if (this->next)
|
||||
{
|
||||
this->prev->next = this->next;
|
||||
this->next->prev = this->prev;
|
||||
this->next = 0;
|
||||
}
|
||||
}
|
||||
|
||||
List::List()
|
||||
{
|
||||
this->next = this;
|
||||
this->prev = this;
|
||||
}
|
||||
|
||||
void List::clear()
|
||||
{
|
||||
while(!isEmpty())
|
||||
delete begin();
|
||||
}
|
||||
|
||||
List::~List()
|
||||
{
|
||||
clear();
|
||||
this->next = this;
|
||||
this->prev = this;
|
||||
}
|
||||
|
||||
bool List::isEmpty()
|
||||
{
|
||||
return this->next == this;
|
||||
}
|
||||
|
||||
void List::insertFront(ListElement * item)
|
||||
{
|
||||
DP_ASSERT(item->next == 0 && "Attempt to insert when it's already in a list");
|
||||
item->prev = this;
|
||||
item->next = this->next;
|
||||
item->prev->next = item;
|
||||
item->next->prev = item;
|
||||
}
|
||||
|
||||
void List::insertBack(ListElement * item)
|
||||
{
|
||||
DP_ASSERT(item->next == 0 && "Attempt to insert when it's already in a list");
|
||||
item->prev = this->prev;
|
||||
item->next = this;
|
||||
item->prev->next = item;
|
||||
item->next->prev = item;
|
||||
}
|
||||
|
||||
void List::insertBefore(ListElement * insertBeforeThis, ListElement * item)
|
||||
{
|
||||
DP_ASSERT(item->next == 0 && "Attempt to insert when it's already in a list");
|
||||
item->next = insertBeforeThis;
|
||||
item->prev = insertBeforeThis->prev;
|
||||
insertBeforeThis->prev->next = item;
|
||||
insertBeforeThis->prev = item;
|
||||
}
|
||||
|
||||
ListElement* List::front()
|
||||
{
|
||||
DP_ASSERT(!isEmpty());
|
||||
return this->next;
|
||||
}
|
||||
|
||||
ListElement* List::last()
|
||||
{
|
||||
DP_ASSERT(!isEmpty());
|
||||
return this->prev;
|
||||
}
|
||||
|
||||
ListElement * List::remove(ListElement * item)
|
||||
{
|
||||
// Skip if its not already in a list
|
||||
if (!item->next)
|
||||
return item;
|
||||
|
||||
item->prev->next = item->next;
|
||||
item->next->prev = item->prev;
|
||||
item->next = 0;
|
||||
item->prev = 0;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
bool List::contains(ListElement * item)
|
||||
{
|
||||
for (ListElement * i = begin(); i!=end(); i = i->next)
|
||||
{
|
||||
if (i == item)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ListElement * List::replace(ListElement * replacement, ListElement * replacee)
|
||||
{
|
||||
if (!(replacement && replacee))
|
||||
{
|
||||
DP_ASSERT(0 && "replacement or replaces is NULL pointer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
DP_ASSERT(replacement->next && replacement->prev);
|
||||
|
||||
// we are assuming replacee does exist in the list.
|
||||
replacement->next = replacee->next;
|
||||
replacement->prev = replacee->prev;
|
||||
|
||||
if (replacement->next)
|
||||
replacement->next->prev = replacement;
|
||||
|
||||
if (replacement->prev)
|
||||
replacement->prev->next = replacement;
|
||||
|
||||
return replacee;
|
||||
}
|
||||
311
src/common/displayport/src/dp_merger.cpp
Normal file
311
src/common/displayport/src/dp_merger.cpp
Normal file
@@ -0,0 +1,311 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_merger.cpp *
|
||||
* Asynchronous Message merger *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_merger.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_crc.h"
|
||||
#include "dp_messageheader.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
|
||||
EncodedMessage * MessageTransactionMerger::pushTransaction(MessageHeader * header, Buffer * data)
|
||||
{
|
||||
if (freeOnNextCall)
|
||||
{
|
||||
delete freeOnNextCall;
|
||||
freeOnNextCall = 0;
|
||||
}
|
||||
|
||||
IncompleteMessage * imsg = getTransactionRecord(header->address, header->messageNumber);
|
||||
|
||||
if (!imsg)
|
||||
{
|
||||
DP_PRINTF(DP_WARNING, "DP-MM> Ignore message due to OOM");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (header->isTransactionStart)
|
||||
{
|
||||
imsg->message.isPathMessage = header->isPathMessage;
|
||||
imsg->message.isBroadcast = header->isBroadcast;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (imsg->message.buffer.length == 0)
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-MM> Expected transaction-start, ignoring message transaction");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (imsg->message.isPathMessage != header->isPathMessage ||
|
||||
imsg->message.isBroadcast != header->isBroadcast)
|
||||
{
|
||||
DP_ASSERT(0 && "Message type changed during transmission");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Check for redundant start
|
||||
//
|
||||
if (header->isTransactionStart && imsg->message.buffer.length)
|
||||
{
|
||||
DP_PRINTF(DP_WARNING, "DP-MM> Unexpected repeated transaction-start, resetting message state.");
|
||||
|
||||
// We must have seen a previous incomplete transaction from this device
|
||||
// they've begun a new packet. Forget about the old thing
|
||||
imsg->message.buffer.reset();
|
||||
}
|
||||
|
||||
//
|
||||
// Kill the buffer if we've got less payload than we should
|
||||
//
|
||||
if (header->payloadBytes > data->length)
|
||||
{
|
||||
freeOnNextCall = imsg;
|
||||
imsg->message.buffer.reset();
|
||||
DP_PRINTF(DP_ERROR, "DP-MM> Received truncated or corrupted message transaction");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Verify transaction CRC
|
||||
//
|
||||
BitStreamReader bsr(data, header->headerSizeBits, (header->payloadBytes-1)*8);
|
||||
NvU8 dataCrc = (NvU8)dpCalculateBodyCRC(&bsr);
|
||||
|
||||
DP_ASSERT(header->headerSizeBits % 8 == 0 && "Header must be byte aligned");
|
||||
|
||||
if (dataCrc != data->data[header->headerSizeBits/8 + header->payloadBytes - 1] ||
|
||||
header->payloadBytes == 0)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-MM> Received corruption message transactions");
|
||||
freeOnNextCall = imsg;
|
||||
imsg->message.buffer.reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Discount the processed CRC from the payload count
|
||||
header->payloadBytes--;
|
||||
|
||||
//
|
||||
// Append active buffer
|
||||
//
|
||||
unsigned i = imsg->message.buffer.length;
|
||||
imsg->message.buffer.resize(i + header->payloadBytes);
|
||||
dpMemCopy(&imsg->message.buffer.data[i], &data->data[header->headerSizeBits/8], header->payloadBytes);
|
||||
|
||||
//
|
||||
// Check for end of message transaction
|
||||
//
|
||||
if (header->isTransactionEnd)
|
||||
{
|
||||
freeOnNextCall = imsg;
|
||||
|
||||
return &imsg->message;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MessageTransactionMerger::IncompleteMessage * MessageTransactionMerger::getTransactionRecord(const Address & address, unsigned messageNumber)
|
||||
{
|
||||
IncompleteMessage * msg;
|
||||
NvU64 currentTime = this->timer->getTimeUs();
|
||||
|
||||
//
|
||||
// Search for existing record
|
||||
//
|
||||
for (ListElement * i = incompleteMessages.begin();i != incompleteMessages.end();)
|
||||
{
|
||||
msg = (IncompleteMessage *)i;
|
||||
i = i->next;
|
||||
if (msg->message.address == address && msg->message.messageNumber == messageNumber)
|
||||
{
|
||||
goto found;
|
||||
}
|
||||
|
||||
//
|
||||
// Found a stale message in the list
|
||||
//
|
||||
if (msg->lastUpdated + incompleteMessageTimeoutMs < currentTime)
|
||||
delete msg;
|
||||
}
|
||||
|
||||
//
|
||||
// None exists? Add a new one
|
||||
//
|
||||
msg = new IncompleteMessage();
|
||||
msg->message.address = address;
|
||||
msg->message.messageNumber = messageNumber;
|
||||
this->incompleteMessages.insertFront(msg);
|
||||
|
||||
found:
|
||||
//
|
||||
// Update the timestamp
|
||||
//
|
||||
msg->lastUpdated = currentTime;
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
void IncomingTransactionManager::mailboxInterrupt()
|
||||
{
|
||||
MessageHeader msg;
|
||||
unsigned totalSize;
|
||||
AuxRetry::status result;
|
||||
unsigned txSize = (unsigned)getTransactionSize();
|
||||
|
||||
//
|
||||
// Size the static aux window
|
||||
//
|
||||
this->localWindow.resize(DP_MAX((unsigned)getTransactionSize(), (unsigned)getMessageBoxSize()));
|
||||
if (this->localWindow.isError())
|
||||
return;
|
||||
|
||||
//
|
||||
// Read one aux-transaction worth of data
|
||||
//
|
||||
result = readMessageBox(0, &this->localWindow.data[0], txSize);
|
||||
|
||||
DP_ASSERT( result != AuxRetry::defer && "Unexpected?!" );
|
||||
|
||||
if (result != AuxRetry::ack)
|
||||
return;
|
||||
|
||||
BitStreamReader reader(&this->localWindow, 0, 8*txSize);
|
||||
|
||||
|
||||
//
|
||||
// Before decoding the header, start with the downstream
|
||||
// ports address prefix
|
||||
//
|
||||
if (!decodeHeader(&reader, &msg, addressPrefix))
|
||||
{
|
||||
//
|
||||
// It's possible we should be NACKing here. Ignoring for now
|
||||
// to allow the message originator to time out (can take seconds).
|
||||
//
|
||||
DP_ASSERT(0 && "Not yet implemented");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Let's get the entire sideband message in the localWindow
|
||||
//
|
||||
|
||||
totalSize = (msg.headerSizeBits / 8) + msg.payloadBytes;
|
||||
|
||||
if (totalSize > txSize)
|
||||
{
|
||||
if (totalSize > DPCD_MESSAGEBOX_SIZE)
|
||||
{
|
||||
//
|
||||
// Corrupt packet - total packet can't be larger than the window
|
||||
//
|
||||
return;
|
||||
}
|
||||
if (AuxRetry::ack!=readMessageBox(txSize, &this->localWindow.data[txSize], totalSize - txSize))
|
||||
{
|
||||
//
|
||||
// Failed to read second half of message
|
||||
//
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
clearMessageBoxInterrupt();
|
||||
|
||||
EncodedMessage * em = incompleteMessages.pushTransaction(&msg, &this->localWindow);
|
||||
|
||||
if (em)
|
||||
{
|
||||
this->sink->messagedReceived(this, em);
|
||||
}
|
||||
}
|
||||
|
||||
IncomingTransactionManager::~IncomingTransactionManager()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
IncomingTransactionManager::IncomingTransactionManager(Timer * timer, const Address & addressPrefix, IncomingTransactionManagerEventSink * sink)
|
||||
: incompleteMessages(timer, DP_INCOMPLETE_MESSAGE_TIMEOUT_USEC), addressPrefix(addressPrefix)
|
||||
{
|
||||
this->sink = sink;
|
||||
this->timer = timer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AuxRetry::status DownReplyManager::readMessageBox(NvU32 offset, NvU8 * data, size_t length)
|
||||
{
|
||||
return hal->readDownReplyMessageBox(offset, data, length);
|
||||
}
|
||||
|
||||
size_t DownReplyManager::getMessageBoxSize()
|
||||
{
|
||||
return hal->getDownReplyMessageBoxSize();
|
||||
}
|
||||
|
||||
size_t DownReplyManager::getTransactionSize()
|
||||
{
|
||||
return hal->getTransactionSize();
|
||||
}
|
||||
|
||||
void DownReplyManager::clearMessageBoxInterrupt()
|
||||
{
|
||||
hal->clearInterruptDownReplyReady();
|
||||
}
|
||||
|
||||
AuxRetry::status UpRequestManager::readMessageBox(NvU32 offset, NvU8 * data, size_t length)
|
||||
{
|
||||
return hal->readUpRequestMessageBox(offset, data, length);
|
||||
}
|
||||
|
||||
size_t UpRequestManager::getMessageBoxSize()
|
||||
{
|
||||
return hal->getUpRequestMessageBoxSize();
|
||||
}
|
||||
|
||||
size_t UpRequestManager::getTransactionSize()
|
||||
{
|
||||
return hal->getTransactionSize();
|
||||
}
|
||||
|
||||
void UpRequestManager::clearMessageBoxInterrupt()
|
||||
{
|
||||
hal->clearInterruptUpRequestReady();
|
||||
}
|
||||
|
||||
749
src/common/displayport/src/dp_messagecodings.cpp
Normal file
749
src/common/displayport/src/dp_messagecodings.cpp
Normal file
@@ -0,0 +1,749 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_messagecodings.cpp *
|
||||
* Encoding routines for various messages *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_messagecodings.h"
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
//
|
||||
// LINK_ADDRESS 0x1
|
||||
//
|
||||
void LinkAddressMessage::set(const Address & target)
|
||||
{
|
||||
clear();
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
//
|
||||
// Write request identifier
|
||||
//
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
}
|
||||
|
||||
ParseResponseStatus LinkAddressMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
DisplayPort::extractGUID(reader, &reply.guid);
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
reply.numberOfPorts = reader->readOrDefault(4 /*Number_Of_Ports*/, 0xF);
|
||||
|
||||
for (unsigned i = 0; i < reply.numberOfPorts; i++)
|
||||
{
|
||||
reply.res[i].isInputPort = !!reader->readOrDefault(1 /*Input_Port*/, 1);
|
||||
reply.res[i].peerDeviceType = (PeerDevice) reader->readOrDefault(3 /*Peer_Device_Type*/, 0x0);
|
||||
reply.res[i].portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reply.res[i].hasMessaging = !!reader->readOrDefault(1 /*Messaging_Capability_Status*/, 0x1);
|
||||
reply.res[i].dpPlugged = !!reader->readOrDefault(1 /*DisplayPort_Device_Plug_Status*/, 0x1);
|
||||
|
||||
if (reply.res[i].isInputPort == false)
|
||||
{
|
||||
reply.res[i].legacyPlugged = !!reader->readOrDefault(1 /*Legacy_Device_Plug_Status*/, 0x1);
|
||||
|
||||
reader->readOrDefault(5 /*zeroes*/, 0x0);
|
||||
|
||||
unsigned ver = reader->readOrDefault(8/*DPCD_Revision*/, 0);
|
||||
reply.res[i].dpcdRevisionMajor = ver >> 4;
|
||||
reply.res[i].dpcdRevisionMinor = ver & 0xF;
|
||||
DisplayPort::extractGUID(reader, &reply.res[i].peerGUID);
|
||||
reply.res[i].SDPStreams = reader->readOrDefault(4 /*Number_SDP_Streams*/, 0xF);
|
||||
reply.res[i].SDPStreamSinks = reader->readOrDefault(4 /*Number_SDP_Stream_Sinks*/, 0xF);
|
||||
}
|
||||
else
|
||||
{
|
||||
reader->readOrDefault(6 /*zeroes*/, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// CONNECTION_STATUS_NOTIFY 0x2
|
||||
//
|
||||
ConnStatusNotifyMessage::ConnStatusNotifyMessage(MessageReceiverEventSink * sink)
|
||||
: MessageReceiver(sink, NV_DP_SBMSG_REQUEST_ID_CONNECTION_STATUS_NOTIFY /*request id*/)
|
||||
{
|
||||
}
|
||||
|
||||
bool ConnStatusNotifyMessage::processByType(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
// read the request body
|
||||
request.port = reader->readOrDefault(4/*Port_Number*/, 0xF);
|
||||
reader->readOrDefault(4/*zeroes*/, 0);
|
||||
bool status = DisplayPort::extractGUID(reader/*GUID of the originating branch device*/, &request.guid);
|
||||
reader->readOrDefault(1/*zero*/, 0);
|
||||
request.legacyPlugged = !!reader->readOrDefault(1/*Legacy_Device_Plug_Status*/, 0);
|
||||
request.devicePlugged = !!reader->readOrDefault(1/*DisplayPort_Device_Plug_Status*/, 0);
|
||||
request.messagingCapability = !!reader->readOrDefault(1/*Messaging_Capability_Status*/, 0);
|
||||
request.isInputPort = !!reader->readOrDefault(1/*Input_Port*/, 0);
|
||||
request.peerDeviceType = (PeerDevice) reader->readOrDefault(3/*Peer_Device_Type*/, 0);
|
||||
|
||||
// action will be implemented by evensink
|
||||
this->sink->messageProcessed(this);
|
||||
return status;
|
||||
}
|
||||
|
||||
//
|
||||
// GENERIC_UP_REPLY 0xnn
|
||||
//
|
||||
void GenericUpReplyMessage::set(const Address & target,
|
||||
bool bReplyIsNack,
|
||||
bool bBroadcast,
|
||||
bool bPath)
|
||||
{
|
||||
clear();
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
writer.write(bReplyIsNack?1:0, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
encodedMessage.isPathMessage = bPath;
|
||||
encodedMessage.isBroadcast = bBroadcast;
|
||||
encodedMessage.address = target;
|
||||
}
|
||||
|
||||
GenericUpReplyMessage::GenericUpReplyMessage(unsigned requestId, bool bReplyIsNack, bool bBroadcast, bool bPath)
|
||||
: Message(requestId, NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
//
|
||||
// Write request identifier
|
||||
//
|
||||
writer.write(bReplyIsNack?1:0, 1);
|
||||
writer.write(requestId, 7);
|
||||
|
||||
encodedMessage.isPathMessage = bPath;
|
||||
encodedMessage.isBroadcast = bBroadcast;
|
||||
}
|
||||
|
||||
GenericUpReplyMessage::GenericUpReplyMessage(const Address & target, unsigned requestId, bool bReplyIsNack, bool bBroadcast, bool bPath)
|
||||
: Message(requestId, NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
//
|
||||
// Write request identifier
|
||||
//
|
||||
writer.write(bReplyIsNack?1:0, 1);
|
||||
writer.write(requestId, 7);
|
||||
|
||||
encodedMessage.isPathMessage = bPath;
|
||||
encodedMessage.isBroadcast = bBroadcast;
|
||||
encodedMessage.address = target;
|
||||
}
|
||||
|
||||
ParseResponseStatus GenericUpReplyMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
//
|
||||
// we are not expecting any replies here
|
||||
// Since the corresponding post for this kind of message is of reply type;
|
||||
// message manager won't queue an awaiting down reply for the same.
|
||||
//
|
||||
DP_ASSERT(0 && "We shouldn't be here!!");
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// CLEAR_PAYLOAD_ID_TABLE 0x14
|
||||
//
|
||||
ClearPayloadIdTableMessage::ClearPayloadIdTableMessage()
|
||||
: Message(NV_DP_SBMSG_REQUEST_ID_CLEAR_PAYLOAD_ID_TABLE /* request id */, NV_DP_SBMSG_PRIORITY_LEVEL_1)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
encodedMessage.isPathMessage = true;
|
||||
encodedMessage.isBroadcast = true;
|
||||
encodedMessage.address = Address();
|
||||
}
|
||||
|
||||
ParseResponseStatus ClearPayloadIdTableMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
ParseResponseStatus ClearPayloadIdTableMessage::parseResponse(EncodedMessage * message)
|
||||
{
|
||||
sink->messageCompleted(this);
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// ENUM_PATH_RESOURCES 0x10
|
||||
//
|
||||
EnumPathResMessage::EnumPathResMessage(const Address & target, unsigned port, bool point)
|
||||
: Message(NV_DP_SBMSG_REQUEST_ID_ENUM_PATH_RESOURCES /* request identifier */,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_4)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zereo*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
writer.write(port, 4);
|
||||
writer.write(0/*zeroes*/, 4);
|
||||
|
||||
encodedMessage.isPathMessage = !point;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
ParseResponseStatus EnumPathResMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reply.availableStreams = reader->readOrDefault(3 /*Available_Streams*/, 0);
|
||||
reply.bFECCapability = (reader->readOrDefault(1 /*FEC*/, 0x0) == 1) ? true : false;
|
||||
reply.TotalPBN = reader->readOrDefault(16 /*PBN*/, 0xFFFF);
|
||||
reply.FreePBN = reader->readOrDefault(16 /*PBN*/, 0xFFFF);
|
||||
reply.DFPLinkAvailablePBN = reader->readOrDefault(16 /*PBN*/, 0xFFFF);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// ALLOCATE_PAYLOAD 0x11
|
||||
//
|
||||
void AllocatePayloadMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
unsigned nSDPStreams,
|
||||
unsigned vcPayloadId,
|
||||
unsigned PBN,
|
||||
unsigned* SDPStreamSink,
|
||||
bool entirePath
|
||||
)
|
||||
{
|
||||
clear();
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
DP_ASSERT(SDPStreamSink || (!nSDPStreams));
|
||||
|
||||
// Write message request body
|
||||
writer.write(port, 4);
|
||||
writer.write(nSDPStreams, 4);
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(vcPayloadId, 7);
|
||||
writer.write(PBN, 16);
|
||||
for (unsigned i=0; i<nSDPStreams; i++)
|
||||
{
|
||||
writer.write(SDPStreamSink[i], 4);
|
||||
}
|
||||
|
||||
// emit 0s until byte aligned.
|
||||
writer.align(8);
|
||||
|
||||
encodedMessage.isPathMessage = entirePath;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus AllocatePayloadMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reader->readOrDefault(5 /*zeroes*/, 0);
|
||||
reply.virtualChannelPayloadId = reader->readOrDefault(7 /*Virtual_Channel_Payload_Identifier*/, 0x0);
|
||||
reply.PBN = reader->readOrDefault(16 /*PBN*/, 0xFFFF);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
//
|
||||
// QUERY_PAYLOAD 0x12
|
||||
//
|
||||
QueryPayloadMessage::QueryPayloadMessage
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
unsigned vcPayloadId
|
||||
)
|
||||
: Message(NV_DP_SBMSG_REQUEST_ID_QUERY_PAYLOAD /* request identifier*/,
|
||||
NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// Write message request
|
||||
writer.write(port, 4);
|
||||
writer.write(0 /*zeroes*/, 5);
|
||||
writer.write(vcPayloadId, 7);
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
dpMemZero(&reply, sizeof(reply));
|
||||
}
|
||||
|
||||
ParseResponseStatus QueryPayloadMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
reply.allocatedPBN = reader->readOrDefault(16 /*Allocated_PBN*/, 0xFFFF);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// RESOURCE_STATUS_NOTIFY 0x13
|
||||
//
|
||||
|
||||
ResStatusNotifyMessage::ResStatusNotifyMessage(MessageReceiverEventSink * sink)
|
||||
: MessageReceiver(sink, NV_DP_SBMSG_REQUEST_ID_RESOURCE_STATUS_NOTIFY /*request id*/)
|
||||
{
|
||||
dpMemZero(&request, sizeof(request));
|
||||
}
|
||||
|
||||
bool ResStatusNotifyMessage::processByType(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
bool status;
|
||||
|
||||
// read the request body
|
||||
request.port = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
request.availableStreams = reader->readOrDefault(3 /*Available_Streams*/, 0);
|
||||
request.bFECCapability = reader->readOrDefault(1 /*FEC Capability*/, 0);
|
||||
status = DisplayPort::extractGUID(reader, &request.guid);
|
||||
request.PBN = reader->readOrDefault(16/*Available_PBN*/, 0);
|
||||
|
||||
// action will be implemented by evensink
|
||||
this->sink->messageProcessed(this);
|
||||
return status;
|
||||
}
|
||||
|
||||
//
|
||||
// REMOTE_DPCD_READ 0x20
|
||||
//
|
||||
void RemoteDpcdReadMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
unsigned dpcdAddress,
|
||||
unsigned nBytesToRead
|
||||
)
|
||||
{
|
||||
clear();
|
||||
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request data
|
||||
writer.write(port, 4);
|
||||
writer.write(dpcdAddress, 20);
|
||||
writer.write(nBytesToRead, 8);
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus RemoteDpcdReadMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reply.numBytesReadDPCD = reader->readOrDefault(8 /*Num_Of_Bytes_Read*/, 0x0);
|
||||
for (unsigned i=0; i<reply.numBytesReadDPCD; i++)
|
||||
{
|
||||
reply.readData[i] = (NvU8)reader->readOrDefault(8 /*data*/, 0x0);
|
||||
}
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// REMOTE_DPCD_WRITE 0x21
|
||||
//
|
||||
void RemoteDpcdWriteMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
unsigned dpcdAddress,
|
||||
unsigned nBytesToWrite,
|
||||
const NvU8 * writeData
|
||||
)
|
||||
{
|
||||
clear();
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
DP_ASSERT(writeData || (!nBytesToWrite));
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request data
|
||||
writer.write(port, 4);
|
||||
writer.write(dpcdAddress, 20);
|
||||
writer.write(nBytesToWrite, 8);
|
||||
|
||||
for (unsigned i=0; i<nBytesToWrite; i++)
|
||||
{
|
||||
writer.write(writeData[i], 8);
|
||||
}
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus RemoteDpcdWriteMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
unsigned portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
|
||||
DP_ASSERT(portNumber == this->sinkPort);
|
||||
DP_USED(portNumber);
|
||||
|
||||
if (this->getSinkPort() != portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// REMOTE_I2C_READ 0x22
|
||||
//
|
||||
void RemoteI2cReadMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned nWriteTransactions,
|
||||
unsigned port,
|
||||
I2cWriteTransaction* transactions,
|
||||
unsigned readI2cDeviceId,
|
||||
unsigned nBytesToRead
|
||||
)
|
||||
{
|
||||
clear();
|
||||
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
DP_ASSERT(transactions || (!nWriteTransactions));
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request specific data
|
||||
writer.write(port, 4);
|
||||
writer.write(0/*zeroes*/, 2);
|
||||
writer.write(nWriteTransactions, 2);
|
||||
|
||||
for (unsigned i=0; i<nWriteTransactions; i++)
|
||||
{
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(transactions[i].WriteI2cDeviceId, 7);
|
||||
writer.write(transactions[i].NumBytes, 8);
|
||||
for(unsigned j=0; j<transactions[i].NumBytes; j++)
|
||||
{
|
||||
writer.write(transactions[i].I2cData[j], 8);
|
||||
}
|
||||
writer.write(0/*zeroes*/, 3);
|
||||
writer.write(transactions[i].NoStopBit ? 1 : 0, 1);
|
||||
writer.write(transactions[i].I2cTransactionDelay, 4);
|
||||
}
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(readI2cDeviceId, 7);
|
||||
writer.write(nBytesToRead, 8);
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus RemoteI2cReadMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reply.numBytesReadI2C = reader->readOrDefault(8 /*Num_Of_Bytes_Read*/, 0x0);
|
||||
for (unsigned i=0; i<reply.numBytesReadI2C; i++)
|
||||
{
|
||||
reply.readData[i] = (NvU8)reader->readOrDefault(8 /*data*/, 0x0);
|
||||
}
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// REMOTE_I2C_WRITE 0x23
|
||||
//
|
||||
void RemoteI2cWriteMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
unsigned writeI2cDeviceId,
|
||||
unsigned nBytesToWrite,
|
||||
unsigned char* writeData
|
||||
)
|
||||
{
|
||||
clear();
|
||||
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
DP_ASSERT(writeData || (!nBytesToWrite));
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request data
|
||||
writer.write(port, 4);
|
||||
writer.write(0/*zero*/, 5);
|
||||
writer.write(writeI2cDeviceId, 7);
|
||||
writer.write(nBytesToWrite, 8);
|
||||
|
||||
for (unsigned i=0; i<nBytesToWrite; i++)
|
||||
{
|
||||
writer.write(writeData[i], 8);
|
||||
}
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus RemoteI2cWriteMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
//
|
||||
// POWER_UP_PHY 0x24
|
||||
//
|
||||
void PowerUpPhyMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
bool entirePath
|
||||
)
|
||||
{
|
||||
clear();
|
||||
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request specific data
|
||||
writer.write(port, 4);
|
||||
writer.write(0 /*zero*/, 4);
|
||||
|
||||
encodedMessage.isPathMessage = entirePath;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
//
|
||||
// POWER_DOWN_PHY 0x25
|
||||
//
|
||||
ParseResponseStatus PowerUpPhyMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
void PowerDownPhyMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned port,
|
||||
bool entirePath
|
||||
)
|
||||
{
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0 /*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// write request specific data
|
||||
writer.write(port, 4);
|
||||
writer.write(0/*zeros*/, 4);
|
||||
|
||||
encodedMessage.isPathMessage = entirePath;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
sinkPort = port;
|
||||
}
|
||||
|
||||
ParseResponseStatus PowerDownPhyMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.portNumber = reader->readOrDefault(4 /*Port_Number*/, 0xF);
|
||||
reader->readOrDefault(4 /*zeroes*/, 0);
|
||||
|
||||
if (this->getSinkPort() != reply.portNumber)
|
||||
return ParseResponseWrong;
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
//
|
||||
// SINK_EVENT_NOTIFY 0x30
|
||||
//
|
||||
|
||||
SinkEventNotifyMessage::SinkEventNotifyMessage(MessageReceiverEventSink * sink, unsigned requestId)
|
||||
: MessageReceiver(sink, 0x30 /*request id*/)
|
||||
{
|
||||
}
|
||||
|
||||
bool SinkEventNotifyMessage::processByType(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// QUERY_STREAM_ENCRYPTION_STATUS 0x38
|
||||
// Follow the SCR DP1.2 Query Stream Encryption Status Definition v0.4
|
||||
//
|
||||
void QueryStreamEncryptionMessage::set
|
||||
(
|
||||
const Address & target,
|
||||
unsigned streamId,
|
||||
NvU8* clientId,
|
||||
StreamEvent streamEvent,
|
||||
bool streamEventMask,
|
||||
StreamBehavior streamBehavior,
|
||||
bool streamBehaviorMask
|
||||
)
|
||||
{
|
||||
clear();
|
||||
|
||||
BitStreamWriter writer(&encodedMessage.buffer, 0);
|
||||
|
||||
// Write request identifier
|
||||
writer.write(0/*zero*/, 1);
|
||||
writer.write(requestIdentifier, 7);
|
||||
|
||||
// Write message request body
|
||||
writer.write(streamId, 8);
|
||||
for (unsigned i=0; i<7; i++)
|
||||
{
|
||||
writer.write(clientId[i], 8);
|
||||
}
|
||||
|
||||
writer.write(streamEvent, 2);
|
||||
writer.write(streamEventMask?1:0, 1);
|
||||
writer.write(streamBehavior, 2);
|
||||
writer.write(streamBehaviorMask?1:0, 1);
|
||||
writer.write(0 /*zeroes*/, 2);
|
||||
|
||||
encodedMessage.isPathMessage = false;
|
||||
encodedMessage.isBroadcast = false;
|
||||
encodedMessage.address = target;
|
||||
}
|
||||
|
||||
ParseResponseStatus QueryStreamEncryptionMessage::parseResponseAck(EncodedMessage * message, BitStreamReader * reader)
|
||||
{
|
||||
reply.streamState = (StreamState)reader->readOrDefault(2 /*Stream_State*/, 0x0);
|
||||
reply.repeaterFuncPresent = !!reader->readOrDefault(1 /*Stream_Repeater_Function*/, 0x0);
|
||||
reply.encryption = !!reader->readOrDefault(1 /*Stream_Encryption */, 0x0);
|
||||
reply.authentication = !!reader->readOrDefault(1 /*Stream_Authentication */, 0x0);
|
||||
reader->readOrDefault(3 /*zero*/, 0);
|
||||
reply.sinkType = (OutputSinkType)reader->readOrDefault(3 /*Stream_Output_Sink_Type*/, 0x0);
|
||||
reply.cpType = (OutputCPType)reader->readOrDefault(2 /*Stream_Output_CP_Type*/, 0x0);
|
||||
reader->readOrDefault(2 /*zeroes*/, 0);
|
||||
reply.signedLPrime = !!reader->readOrDefault(1 /*Signed*/, 0x0);
|
||||
reply.streamId = (NvU8)reader->readOrDefault(8/*Stream_ID*/, 0x0);
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
I2cWriteTransaction::I2cWriteTransaction
|
||||
(
|
||||
unsigned WriteI2cDeviceId,
|
||||
unsigned NumBytes,
|
||||
unsigned char * buffer,
|
||||
bool NoStopBit,
|
||||
unsigned I2cTransactionDelay
|
||||
)
|
||||
{
|
||||
this->WriteI2cDeviceId = WriteI2cDeviceId;
|
||||
this->NumBytes = NumBytes;
|
||||
this->NoStopBit = NoStopBit;
|
||||
this->I2cTransactionDelay = I2cTransactionDelay;
|
||||
this->I2cData = buffer;
|
||||
}
|
||||
|
||||
I2cWriteTransaction::I2cWriteTransaction():
|
||||
WriteI2cDeviceId(0), NumBytes(0), I2cData(0), NoStopBit(0), I2cTransactionDelay(0)
|
||||
{
|
||||
}
|
||||
|
||||
86
src/common/displayport/src/dp_messageheader.cpp
Normal file
86
src/common/displayport/src/dp_messageheader.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_messageheader.cpp *
|
||||
* DP message header parser *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_crc.h"
|
||||
#include "dp_messageheader.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
|
||||
bool DisplayPort::decodeHeader(BitStreamReader * reader, MessageHeader * header, const Address & address)
|
||||
{
|
||||
unsigned startOffset = reader->offset();
|
||||
int LCT, i;
|
||||
|
||||
//
|
||||
// Read the RAD
|
||||
//
|
||||
LCT = reader->readOrDefault( 4, 0);
|
||||
reader->readOrDefault( 4, 0);
|
||||
|
||||
header->address = address;
|
||||
|
||||
for (i = 0; i < LCT - 1; i++)
|
||||
{
|
||||
header->address.append(reader->readOrDefault( 4, 0));
|
||||
}
|
||||
|
||||
reader->align( 8);
|
||||
|
||||
//
|
||||
// Read flags
|
||||
//
|
||||
header->isBroadcast = !!reader->readOrDefault( 1, 0);
|
||||
header->isPathMessage = !!reader->readOrDefault( 1, 0);
|
||||
header->payloadBytes = reader->readOrDefault( 6, 0) ;
|
||||
|
||||
header->isTransactionStart = !!reader->readOrDefault( 1, 0);
|
||||
header->isTransactionEnd = !!reader->readOrDefault( 1, 0);
|
||||
reader->readOrDefault( 1, 0);
|
||||
header->messageNumber = reader->readOrDefault( 1, 0);
|
||||
|
||||
|
||||
// Build a bit reader for the slice of header we just processed
|
||||
BitStreamReader crcReader(reader->buffer(), startOffset, reader->offset());
|
||||
|
||||
if (reader->readOrDefault( 4, (NvU32)~0) != dpCalculateHeaderCRC(&crcReader))
|
||||
{
|
||||
// Corrupt packet received
|
||||
char buffer[48*3+1];
|
||||
dpHexDump(&buffer[0], sizeof(buffer), (NvU8*)reader->buffer() + startOffset, reader->offset() - startOffset);
|
||||
DP_PRINTF(DP_ERROR, "DP-MM> Corrupt message transaction. Expected CRC %d. Message = {%s}", dpCalculateHeaderCRC(&crcReader), buffer);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
header->headerSizeBits = reader->offset() - startOffset;
|
||||
return true;
|
||||
}
|
||||
626
src/common/displayport/src/dp_messages.cpp
Normal file
626
src/common/displayport/src/dp_messages.cpp
Normal file
@@ -0,0 +1,626 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_messages.cpp *
|
||||
* Encoding for aux common messages. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_splitter.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_merger.h"
|
||||
#include "dp_list.h"
|
||||
#include "dp_tracing.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
namespace DisplayPort
|
||||
{
|
||||
GenericMessageCompletion::GenericMessageCompletion() :
|
||||
failed(false), completed(false)
|
||||
{
|
||||
// Initialize nakData seperately.
|
||||
nakData.reason = NakUndefined;
|
||||
nakData.nak_data = 0;
|
||||
// nakData.guid is initalized in its own constructor.
|
||||
}
|
||||
void GenericMessageCompletion::messageFailed(MessageManager::Message * from, NakData * data)
|
||||
{
|
||||
nakData = *data;
|
||||
failed = true;
|
||||
completed = true;
|
||||
}
|
||||
void GenericMessageCompletion::messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
failed = false;
|
||||
completed = true;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Transmit a message and wait for the response in place.
|
||||
//
|
||||
bool MessageManager::send(MessageManager::Message * message, NakData & nakData)
|
||||
{
|
||||
GenericMessageCompletion completion;
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
NvU64 startTime, elapsedTime;
|
||||
message->bBusyWaiting = true;
|
||||
message->setMessagePriority(NV_DP_SBMSG_PRIORITY_LEVEL_1);
|
||||
post(message, &completion);
|
||||
startTime = timer->getTimeUs();
|
||||
do
|
||||
{
|
||||
hal->updateDPCDOffline();
|
||||
if (hal->isDpcdOffline())
|
||||
{
|
||||
DP_PRINTF(DP_WARNING, "DP-MM> Device went offline while waiting for reply and so ignoring message %p (ID = %02X, target = %s)",
|
||||
message, message->requestIdentifier, ((message->state).target).toString(sb));
|
||||
completion.nakData.reason = NakDpcdFail;
|
||||
nakData = completion.nakData;
|
||||
completion.failed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
hal->notifyIRQ();
|
||||
if (hal->interruptDownReplyReady())
|
||||
IRQDownReply();
|
||||
|
||||
if (completion.completed)
|
||||
{
|
||||
nakData = completion.nakData;
|
||||
break;
|
||||
}
|
||||
|
||||
elapsedTime = timer->getTimeUs() - startTime;
|
||||
|
||||
if (elapsedTime > (DPCD_MESSAGE_REPLY_TIMEOUT * 1000))
|
||||
{
|
||||
message->expired(NULL);
|
||||
nakData.reason = NakTimeout;
|
||||
break;
|
||||
}
|
||||
|
||||
// Sleep while processing timer callbacks
|
||||
timer->sleep(1);
|
||||
} while(true);
|
||||
|
||||
return !completion.failed;
|
||||
}
|
||||
|
||||
bool DisplayPort::extractGUID(BitStreamReader * reader, GUID * guid)
|
||||
{
|
||||
for (unsigned i=0; i < 128; i += 8)
|
||||
{
|
||||
unsigned data;
|
||||
if (!reader->read(&data, 8))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
guid->data[i/8] = (NvU8)data;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MessageManager::messagedReceived(IncomingTransactionManager * from, EncodedMessage * message)
|
||||
{
|
||||
if (from == &mergerUpRequest)
|
||||
{
|
||||
onUpRequestReceived(true, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
onDownReplyReceived(true, message);
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::Message::splitterFailed(OutgoingTransactionManager * from)
|
||||
{
|
||||
//
|
||||
// Message failed
|
||||
//
|
||||
NakData nakData;
|
||||
nakData.reason = NakTimeout;
|
||||
MessageManager * parent = this->parent;
|
||||
|
||||
if (sink)
|
||||
sink->messageFailed(this, &nakData);
|
||||
|
||||
if (from == &parent->splitterDownRequest)
|
||||
{
|
||||
//
|
||||
// Tell the message manager he may begin sending the next message
|
||||
//
|
||||
parent->transmitAwaitingDownRequests();
|
||||
}
|
||||
else
|
||||
{
|
||||
parent->transmitAwaitingUpReplies();
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::Message::splitterTransmitted(OutgoingTransactionManager * from)
|
||||
{
|
||||
bTransmitted = true;
|
||||
MessageManager * parent = this->parent;
|
||||
|
||||
if (from == &parent->splitterDownRequest)
|
||||
{
|
||||
// Client will busy-waiting for the message to complete, we don't need the countdown timer.
|
||||
if (!bBusyWaiting)
|
||||
{
|
||||
// Start the countdown timer for the reply
|
||||
parent->timer->queueCallback(this, "SPLI", DPCD_MESSAGE_REPLY_TIMEOUT);
|
||||
}
|
||||
// Tell the message manager he may begin sending the next message
|
||||
parent->transmitAwaitingDownRequests();
|
||||
}
|
||||
else // UpReply
|
||||
{
|
||||
if (sink)
|
||||
sink->messageCompleted(this); // This is the end for an up reply
|
||||
|
||||
parent->transmitAwaitingUpReplies();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Since transmit DPCD_MESSAGE_REPLY_TIMEOUT time has elapsed.
|
||||
// - Let's assume the message was not replied to
|
||||
void MessageManager::Message::expired(const void * tag)
|
||||
{
|
||||
Address::StringBuffer sb;
|
||||
DP_USED(sb);
|
||||
|
||||
DP_PRINTF(DP_WARNING, "DP-MM> Message transmit time expired on message %p (ID = %02X, target = %s)",
|
||||
(Message*)this, ((Message*)this)->requestIdentifier, (((Message*)this)->state.target).toString(sb));
|
||||
|
||||
Address::NvU32Buffer addrBuffer;
|
||||
dpMemZero(addrBuffer, sizeof(addrBuffer));
|
||||
(((Message*)this)->state.target).toNvU32Buffer(addrBuffer);
|
||||
NV_DPTRACE_WARNING(MESSAGE_EXPIRED, ((Message*)this)->requestIdentifier, (((Message*)this)->state.target).size(),
|
||||
addrBuffer[0], addrBuffer[1], addrBuffer[2], addrBuffer[3]);
|
||||
|
||||
NakData nakData;
|
||||
nakData.reason = NakTimeout;
|
||||
|
||||
MessageManager * parent = this->parent;
|
||||
|
||||
DP_ASSERT(parent);
|
||||
if (parent && !parent->isBeingDestroyed)
|
||||
{
|
||||
parent->awaitingReplyDownRequest.remove(this);
|
||||
parent->clearPendingMsg();
|
||||
parent->transmitAwaitingDownRequests();
|
||||
parent->transmitAwaitingUpReplies();
|
||||
}
|
||||
|
||||
if (sink)
|
||||
sink->messageFailed(this, &nakData);
|
||||
}
|
||||
|
||||
//
|
||||
// Enqueue the next message to the splitterDownRequest
|
||||
//
|
||||
void MessageManager::transmitAwaitingDownRequests()
|
||||
{
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next; // Do this first since we may unlink the current node
|
||||
|
||||
if (awaitingReplyDownRequest.isEmpty())
|
||||
{
|
||||
//
|
||||
// Set the message number, and unlink from the outgoing queue
|
||||
//
|
||||
m->encodedMessage.messageNumber = 0;
|
||||
m->state.messageNumber = 0;
|
||||
|
||||
notYetSentDownRequest.remove(m);
|
||||
awaitingReplyDownRequest.insertBack(m);
|
||||
|
||||
//
|
||||
// This call can cause transmitAwaitingDownRequests to be called again
|
||||
//
|
||||
bool sent = splitterDownRequest.send(m->encodedMessage, m);
|
||||
DP_ASSERT(sent);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Enqueue the next message to the splitterUpReply
|
||||
//
|
||||
void MessageManager::transmitAwaitingUpReplies()
|
||||
{
|
||||
for (ListElement * i = notYetSentUpReply.begin(); i!=notYetSentUpReply.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next; // Do this first since we may unlink the current node
|
||||
|
||||
notYetSentUpReply.remove(m);
|
||||
|
||||
//
|
||||
// This call can cause transmitAwaitingUpReplies to be called again
|
||||
//
|
||||
bool sent = splitterUpReply.send(m->encodedMessage, m);
|
||||
DP_ASSERT(sent);
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::postReply(Message * message, Message::MessageEventSink * sink)
|
||||
{
|
||||
post(message, sink, true);
|
||||
}
|
||||
|
||||
void MessageManager::cancelAllByType(unsigned type)
|
||||
{
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next;
|
||||
|
||||
if (m->requestIdentifier == type)
|
||||
notYetSentDownRequest.remove(m);
|
||||
}
|
||||
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next;
|
||||
|
||||
if (m->requestIdentifier == type)
|
||||
awaitingReplyDownRequest.remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::cancelAll(Message * message)
|
||||
{
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next;
|
||||
|
||||
if (m == message && m->requestIdentifier == message->requestIdentifier)
|
||||
notYetSentDownRequest.remove(m);
|
||||
}
|
||||
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
Message * m = (Message *)i;
|
||||
i = i->next;
|
||||
|
||||
if (m == message && m->requestIdentifier == message->requestIdentifier)
|
||||
awaitingReplyDownRequest.remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::post(Message * message, Message::MessageEventSink * sink, bool transmitReply)
|
||||
{
|
||||
DP_ASSERT(!isBeingDestroyed && "You may not post messages in response to a shutdown");
|
||||
|
||||
if (isPaused)
|
||||
return;
|
||||
|
||||
//
|
||||
// Initialize the fields
|
||||
//
|
||||
message->sink = sink;
|
||||
message->bTransmitted = false;
|
||||
|
||||
//
|
||||
// Queue the message for the outgoing queue.
|
||||
// Later on we'll walk to the queue and make sure
|
||||
// we have at most two outstanding messages PER
|
||||
// target address. This is how the message
|
||||
// number is decided.
|
||||
//
|
||||
|
||||
message->parent = this;
|
||||
message->transmitReply = transmitReply;
|
||||
if (message->encodedMessage.isBroadcast)
|
||||
{
|
||||
// if its a broadcast message; the target would be the immediate branch.
|
||||
Address addr;
|
||||
addr.clear();
|
||||
addr.append(0);
|
||||
message->state.target = addr;
|
||||
}
|
||||
else
|
||||
message->state.target = message->encodedMessage.address;
|
||||
|
||||
if ( transmitReply )
|
||||
{
|
||||
notYetSentUpReply.insertBack(message);
|
||||
transmitAwaitingUpReplies();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// If the list is empty or the incoming message has the least priority possible (DEFAULT priority),
|
||||
// then just add the incoming message to the back of the list.
|
||||
// Otherwise, find the right location by traversing the list.
|
||||
//
|
||||
if(message->messagePriority == NV_DP_SBMSG_PRIORITY_LEVEL_DEFAULT || notYetSentDownRequest.isEmpty())
|
||||
{
|
||||
notYetSentDownRequest.insertBack(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
ListElement *tmp = notYetSentDownRequest.last();
|
||||
Message *msg = (Message*) notYetSentDownRequest.last();
|
||||
while((msg->prev != tmp) && (msg->messagePriority < message->messagePriority))
|
||||
{
|
||||
msg = (Message*)msg->prev;
|
||||
}
|
||||
notYetSentDownRequest.insertBefore(msg->next, message);
|
||||
}
|
||||
transmitAwaitingDownRequests();
|
||||
}
|
||||
}
|
||||
|
||||
void MessageManager::onUpRequestReceived(bool status, EncodedMessage * message)
|
||||
{
|
||||
if (!status)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Broadcast the up-request message to all
|
||||
// the receivers on messageReceivers
|
||||
//
|
||||
for (ListElement * i = messageReceivers.begin(); i!=messageReceivers.end(); i=i->next)
|
||||
{
|
||||
MessageReceiver * rcr = (MessageReceiver *)i;
|
||||
if (rcr->process((EncodedMessage *)message))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DP_ASSERT(0 && "Warning: Unknown upstream UP_REQ message");
|
||||
}
|
||||
|
||||
|
||||
void MessageManager::onDownReplyReceived(bool status, EncodedMessage * message)
|
||||
{
|
||||
if (!status)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Broadcast the down-request message to all
|
||||
// the receivers on awaitingReplyDownRequest
|
||||
//
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); i=i->next)
|
||||
{
|
||||
Message * messageAwaitingReply = (Message *)i;
|
||||
|
||||
if( messageAwaitingReply->state.target == message->address &&
|
||||
messageAwaitingReply->state.messageNumber == message->messageNumber)
|
||||
{
|
||||
awaitingReplyDownRequest.remove(messageAwaitingReply);
|
||||
if (messageAwaitingReply->parseResponse(message) == ParseResponseWrong)
|
||||
{
|
||||
//
|
||||
// parseResponse() returns ParseResposeWrong when 'Request_Identifier' of down request
|
||||
// message and down reply message are mis-matched. So insert message in waiting queue
|
||||
// and wait for correct down reply message.
|
||||
//
|
||||
awaitingReplyDownRequest.insertBack(messageAwaitingReply);
|
||||
}
|
||||
|
||||
goto nextMessage;
|
||||
}
|
||||
}
|
||||
|
||||
DP_PRINTF(DP_WARNING, "DPMM> Warning: Unmatched reply message");
|
||||
nextMessage:
|
||||
transmitAwaitingUpReplies();
|
||||
transmitAwaitingDownRequests();
|
||||
}
|
||||
|
||||
MessageManager::~MessageManager()
|
||||
{
|
||||
// This causes any posts they may attempt to do to fail
|
||||
isBeingDestroyed = true;
|
||||
|
||||
//
|
||||
// The message manager should not be shut down until
|
||||
// all outgoing messages are in the cancelled state
|
||||
//
|
||||
NakData nakUndef;
|
||||
nakUndef.reason = NakUndefined;
|
||||
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
if (((Message *)i)->sink)
|
||||
((Message *)i)->sink->messageFailed(((Message *)i), &nakUndef);
|
||||
i = next;
|
||||
}
|
||||
if (!notYetSentDownRequest.isEmpty())
|
||||
{
|
||||
|
||||
for (ListElement * i = notYetSentDownRequest.begin(); i!=notYetSentDownRequest.end(); )
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
DP_PRINTF(DP_WARNING, "Down request message type 0x%x client is not cleaning up.", ((Message *)i)->requestIdentifier);
|
||||
i = next;
|
||||
}
|
||||
}
|
||||
|
||||
for (ListElement * i = notYetSentUpReply.begin(); i!=notYetSentUpReply.end();)
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
if (((Message *)i)->sink)
|
||||
((Message *)i)->sink->messageFailed(((Message *)i), &nakUndef);
|
||||
i = next;
|
||||
}
|
||||
if (!notYetSentUpReply.isEmpty())
|
||||
{
|
||||
|
||||
for (ListElement * i = notYetSentUpReply.begin(); i!=notYetSentUpReply.end(); )
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
DP_PRINTF(DP_WARNING, "Up reply message type 0x%x client is not cleaning up.", ((Message *)i)->requestIdentifier);
|
||||
i = next;
|
||||
}
|
||||
}
|
||||
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
if (((Message *)i)->sink)
|
||||
((Message *)i)->sink->messageFailed(((Message *)i), &nakUndef);
|
||||
i = next;
|
||||
}
|
||||
if (!awaitingReplyDownRequest.isEmpty())
|
||||
{
|
||||
|
||||
for (ListElement * i = awaitingReplyDownRequest.begin(); i!=awaitingReplyDownRequest.end(); )
|
||||
{
|
||||
ListElement * next = i->next;
|
||||
DP_PRINTF(DP_WARNING, "Down request message type 0x%x client is not cleaning up.", ((Message *)i)->requestIdentifier);
|
||||
i = next;
|
||||
}
|
||||
}
|
||||
|
||||
// Do not reclaim the memory of our registered receivers
|
||||
while (!messageReceivers.isEmpty())
|
||||
messageReceivers.remove(messageReceivers.front());
|
||||
}
|
||||
|
||||
ParseResponseStatus MessageManager::Message::parseResponse(EncodedMessage * message)
|
||||
{
|
||||
BitStreamReader reader(&message->buffer, 0, message->buffer.length*8);
|
||||
|
||||
// Read ReplyType
|
||||
bool replyNacked = !!reader.readOrDefault(1, true);
|
||||
|
||||
// Read RequestIdentifier
|
||||
unsigned requestId = reader.readOrDefault(7, 0);
|
||||
if (requestId != requestIdentifier)
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-MM> Requested = %x Received = %x", requestId, requestIdentifier);
|
||||
DP_ASSERT(0 && "Reply type doesn't match");
|
||||
return ParseResponseWrong;
|
||||
}
|
||||
|
||||
if (replyNacked)
|
||||
{
|
||||
NakData nakData;
|
||||
|
||||
// failure handler will parse the NAK response and do the required action
|
||||
if (DisplayPort::extractGUID(&reader, &nakData.guid) == false)
|
||||
{
|
||||
DP_ASSERT(0 && "Invalid GUID in NAK");
|
||||
}
|
||||
|
||||
nakData.reason = (NakReason)reader.readOrDefault(8, 0);
|
||||
nakData.nak_data = reader.readOrDefault(8, 0);
|
||||
|
||||
// call specific handler after parsing.
|
||||
parent->timer->cancelCallbacks(this);
|
||||
|
||||
MessageManager * parent = this->parent;
|
||||
|
||||
if (sink)
|
||||
sink->messageFailed(this, &nakData);
|
||||
|
||||
parent->transmitAwaitingDownRequests();
|
||||
|
||||
return ParseResponseSuccess;
|
||||
}
|
||||
|
||||
ParseResponseStatus parseResult = parseResponseAck(message, &reader);
|
||||
|
||||
if (parseResult == ParseResponseSuccess)
|
||||
{
|
||||
parent->timer->cancelCallbacks(this);
|
||||
|
||||
if (this->sink)
|
||||
{
|
||||
MessageEventSink * msgSink = this->sink;
|
||||
msgSink->messageCompleted(this);
|
||||
}
|
||||
}
|
||||
|
||||
return parseResult;
|
||||
}
|
||||
|
||||
void MessageManager::Message::MessageEventSink::messageFailed(Message * from, NakData * nakData)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MessageManager::registerReceiver(MessageReceiver * receiver)
|
||||
{
|
||||
messageReceivers.insertBack(receiver);
|
||||
}
|
||||
|
||||
|
||||
bool MessageManager::MessageReceiver::process(EncodedMessage * message)
|
||||
{
|
||||
BitStreamReader reader(&message->buffer, 0, message->buffer.length*8);
|
||||
|
||||
// Read RequestIdentifier
|
||||
reader.readOrDefault(1, 0);
|
||||
unsigned reqId = reader.readOrDefault(7, 0);
|
||||
|
||||
if (reqId != this->getRequestId())
|
||||
{
|
||||
//
|
||||
// This receiver is not meant for this message;
|
||||
// let the next in the queue handle it.
|
||||
//
|
||||
return false;
|
||||
}
|
||||
|
||||
this->address = message->address;
|
||||
|
||||
// processByType should parse the request, create a response and queue it if needed
|
||||
bool status = processByType(message, &reader);
|
||||
if (!status)
|
||||
{
|
||||
//
|
||||
// if we are here; we could get a receiver to handle the request
|
||||
// but something else went wrong.
|
||||
//
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
189
src/common/displayport/src/dp_mst_edid.cpp
Normal file
189
src/common/displayport/src/dp_mst_edid.cpp
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_mst_edid.c *
|
||||
* Implementation Multi Stream EDID reads *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_address.h"
|
||||
#include "dp_messagecodings.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
EdidReadMultistream::~EdidReadMultistream()
|
||||
{
|
||||
timer->cancelCallbacks(this);
|
||||
}
|
||||
|
||||
void EdidReadMultistream::startReadingEdid()
|
||||
{
|
||||
NvU8 offset = 0;
|
||||
I2cWriteTransaction i2cWriteTransactions[1];
|
||||
Address::StringBuffer buffer;
|
||||
DP_USED(buffer);
|
||||
DP_PRINTF(DP_NOTICE, "%s(): start for %s", __FUNCTION__,
|
||||
topologyAddress.toString(buffer));
|
||||
|
||||
edidReaderManager.reset();
|
||||
edid.resetData();
|
||||
|
||||
DDCAddress = ddcAddrList[ddcIndex];
|
||||
|
||||
// set offset within segment 0, no need to set segment, because we're starting reading EDID
|
||||
i2cWriteTransactions[0] = I2cWriteTransaction(DDCAddress >> 1,
|
||||
sizeof(offset),
|
||||
&offset,
|
||||
true);
|
||||
NvU8 nWriteTransactions = 1;
|
||||
|
||||
remoteI2cRead.set(topologyAddress.parent(), // topology Address
|
||||
nWriteTransactions, // number of write transactions
|
||||
topologyAddress.tail(), // port of Device
|
||||
i2cWriteTransactions, // list of write transactions
|
||||
DDCAddress >> 1, // right shifted DDC Address (request identifier in spec)
|
||||
EDID_BLOCK_SIZE); // requested size
|
||||
|
||||
manager->post(&remoteI2cRead, this);
|
||||
}
|
||||
|
||||
void EdidReadMultistream::messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
RemoteI2cReadMessage* I2CReadMessage = (RemoteI2cReadMessage*)from;
|
||||
unsigned char * data = 0;
|
||||
unsigned numBytesRead;
|
||||
Address::StringBuffer buffer;
|
||||
DP_USED(buffer);
|
||||
|
||||
NvU8 seg;
|
||||
NvU8 offset;
|
||||
DP_PRINTF(DP_NOTICE, "%s for %s", __FUNCTION__, topologyAddress.toString(buffer));
|
||||
|
||||
DP_ASSERT(DDCAddress && "DDCAddress is 0, it is wrong");
|
||||
|
||||
data = I2CReadMessage->replyGetI2CData(&numBytesRead);
|
||||
DP_ASSERT(data);
|
||||
|
||||
// this is not required, but I'd like to keep things simple at first submission
|
||||
DP_ASSERT(numBytesRead == EDID_BLOCK_SIZE);
|
||||
edidReaderManager.postReply(data, numBytesRead, true);
|
||||
|
||||
if (edidReaderManager.readNextRequest(seg, offset))
|
||||
{
|
||||
readNextBlock(seg, offset);
|
||||
}
|
||||
else // EDID read is finished or failed.
|
||||
{
|
||||
edidAttemptDone(edidReaderManager.readIsComplete() && edid.verifyCRC());
|
||||
}
|
||||
}
|
||||
|
||||
void EdidReadMultistream::edidAttemptDone(bool succeeded)
|
||||
{
|
||||
if (succeeded)
|
||||
sink->mstEdidCompleted(this);
|
||||
else if (ddcIndex + 1 < ddcAddrListSize)
|
||||
{
|
||||
ddcIndex++;
|
||||
startReadingEdid();
|
||||
}
|
||||
else
|
||||
sink->mstEdidReadFailed(this);
|
||||
}
|
||||
|
||||
void EdidReadMultistream::readNextBlock(NvU8 seg, NvU8 offset)
|
||||
{
|
||||
I2cWriteTransaction i2cWriteTransactions[2];
|
||||
Address::StringBuffer buffer;
|
||||
DP_USED(buffer);
|
||||
|
||||
// ensure that init function for i2cWriteTranscation for segment and offset won't break
|
||||
DP_ASSERT(sizeof(seg) == 1);
|
||||
DP_ASSERT(sizeof(offset) == 1);
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "%s(): for %s (seg/offset) = %d/%d", __FUNCTION__,
|
||||
topologyAddress.toString(buffer),
|
||||
seg, offset);
|
||||
|
||||
unsigned nWriteTransactions = 2;
|
||||
if (seg)
|
||||
{
|
||||
// select segment
|
||||
i2cWriteTransactions[0] = I2cWriteTransaction(EDID_SEG_SELECTOR_OFFSET >> 1,
|
||||
1, &seg, true);
|
||||
// set offset within segment
|
||||
i2cWriteTransactions[1] = I2cWriteTransaction(DDCAddress >> 1,
|
||||
1, &offset, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// set offset within segment 0
|
||||
i2cWriteTransactions[0] = I2cWriteTransaction(DDCAddress >> 1, 1, &offset, true);
|
||||
nWriteTransactions = 1;
|
||||
}
|
||||
|
||||
remoteI2cRead.set(topologyAddress.parent(), // topology Address
|
||||
nWriteTransactions, // number of write transactions
|
||||
topologyAddress.tail(), // port of Device
|
||||
i2cWriteTransactions, // list of write transactions
|
||||
DDCAddress >> 1, // right shifted DDC Address (request identifier in spec)
|
||||
EDID_BLOCK_SIZE); // requested size
|
||||
|
||||
manager->post(&remoteI2cRead, this, false);
|
||||
}
|
||||
|
||||
void EdidReadMultistream::expired(const void * tag)
|
||||
{
|
||||
Address::StringBuffer buffer;
|
||||
DP_USED(buffer);
|
||||
DP_PRINTF(DP_NOTICE, "%s on %s", __FUNCTION__, topologyAddress.toString(buffer));
|
||||
startReadingEdid();
|
||||
}
|
||||
|
||||
void EdidReadMultistream::messageFailed(MessageManager::Message * from, NakData * nakData)
|
||||
{
|
||||
Address::StringBuffer buffer;
|
||||
DP_USED(buffer);
|
||||
DP_PRINTF(DP_NOTICE, "%s on %s", __FUNCTION__, topologyAddress.toString(buffer));
|
||||
|
||||
if (nakData->reason == NakDefer || nakData->reason == NakTimeout)
|
||||
{
|
||||
if (retries < MST_EDID_RETRIES)
|
||||
{
|
||||
++retries;
|
||||
timer->queueCallback(this, "EDID", MST_EDID_COOLDOWN);
|
||||
}
|
||||
else
|
||||
edidAttemptDone(false /* failed */);
|
||||
}
|
||||
else
|
||||
{
|
||||
edidAttemptDone(false /* failed */);
|
||||
}
|
||||
}
|
||||
293
src/common/displayport/src/dp_qse.cpp
Normal file
293
src/common/displayport/src/dp_qse.cpp
Normal file
@@ -0,0 +1,293 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_qse.cpp *
|
||||
* The DP HDCP Query Stream Encryption. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_auxdefs.h"
|
||||
|
||||
#include "dp_qse.h"
|
||||
#include "dp_internal.h"
|
||||
#include "dp_deviceimpl.h"
|
||||
#include "dp_connectorimpl.h"
|
||||
#include "dp_printf.h"
|
||||
#include <nvmisc.h>
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
NvU64
|
||||
QSENonceGenerator::random()
|
||||
{
|
||||
NvU64 randomNumber;
|
||||
|
||||
previousRandomLSB = static_cast<NvU32>(((NvU64)1664525 * previousRandomLSB + 1013904223));
|
||||
previousRandomMSB = static_cast<NvU32>(((NvU64)1664525 * previousRandomMSB + 1013904223));
|
||||
|
||||
randomNumber = ((NvU64)previousRandomMSB << 32) | previousRandomLSB ;
|
||||
|
||||
return randomNumber;
|
||||
}
|
||||
|
||||
void
|
||||
QSENonceGenerator::clientIdBuilder
|
||||
(
|
||||
NvU64 aN
|
||||
)
|
||||
{
|
||||
previousRandomMSB = (NvU32)(aN >> 32) ;
|
||||
previousRandomLSB = (NvU32)(aN & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
void
|
||||
QSENonceGenerator::makeClientId
|
||||
(
|
||||
CLIENTID &clientId
|
||||
)
|
||||
{
|
||||
// Generate 56 bit nonce
|
||||
NvU64 rnd = random();
|
||||
|
||||
clientId.data[0] = static_cast<NvU8>( rnd & 0xFF);
|
||||
clientId.data[1] = static_cast<NvU8>((rnd >> 8) & 0xFF);
|
||||
clientId.data[2] = static_cast<NvU8>((rnd >> 16) & 0xFF);
|
||||
clientId.data[3] = static_cast<NvU8>((rnd >> 24) & 0xFF);
|
||||
clientId.data[4] = static_cast<NvU8>((rnd >> 32) & 0xFF);
|
||||
clientId.data[5] = static_cast<NvU8>((rnd >> 40) & 0xFF);
|
||||
clientId.data[6] = static_cast<NvU8>((rnd >> 48) & 0xFF);
|
||||
}
|
||||
|
||||
StreamEncryptionStatusDetection::~StreamEncryptionStatusDetection()
|
||||
{
|
||||
connector->timer->cancelCallbacks(this);
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::messageFailed
|
||||
(
|
||||
MessageManager::Message *from,
|
||||
NakData *nakData
|
||||
)
|
||||
{
|
||||
if (from == &qseMessage)
|
||||
{
|
||||
connector->messageManager->clearAwaitingQSEReplyDownRequest();
|
||||
|
||||
if ((retriesSendQSEMessage < DPCD_QUERY_STREAM_MESSAGE_RETRIES) &&
|
||||
(nakData->reason == NakDefer || nakData->reason == NakTimeout))
|
||||
{
|
||||
connector->timer->cancelCallback(parent, &(parent->tagStreamValidation));
|
||||
retriesSendQSEMessage++;
|
||||
sendQSEMessage(parent);
|
||||
connector->timer->queueCallback(parent, &(parent->tagStreamValidation), HDCP_STREAM_VALIDATION_REQUEST_COOLDOWN);
|
||||
return;
|
||||
}
|
||||
//
|
||||
// If message failed is called after all retries have expired then
|
||||
// we should disable the HDCP.
|
||||
//
|
||||
else
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Downstream failed to handle %s QSES message",
|
||||
reason == qseReason_Ssc ? "SSC" : "generic");
|
||||
//
|
||||
// Non-QSE supported branch would get HDCP off if we honor QSES's result even w/o SSC from it.
|
||||
// So to improve compatibility, we honor QSES's result to have HDCP off only if it's fired for SSC.
|
||||
//
|
||||
if (reason == qseReason_Ssc)
|
||||
{
|
||||
for (ListElement * i = connector->activeGroups.begin(); i != connector->activeGroups.end(); i = i->next)
|
||||
{
|
||||
GroupImpl * group = (GroupImpl *)i;
|
||||
if (group->hdcpEnabled)
|
||||
{
|
||||
//
|
||||
// In case of MST, time slots will be deleted and add back for clearing ECF
|
||||
// This will lead to blank screen momentarily
|
||||
// Similarly for all other QSES errors
|
||||
//
|
||||
group->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
}
|
||||
}
|
||||
connector->main->configureHDCPAbortAuthentication(KSV_SIG);
|
||||
connector->main->configureHDCPDisableAuthentication();
|
||||
// Clear HDCP cap for groups and connector and devices.
|
||||
connector->isHDCPAuthOn = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
connector->bIsEncryptionQseValid = false;
|
||||
}
|
||||
|
||||
retriesSendQSEMessage = 0;
|
||||
parent->streamValidationDone = true;
|
||||
|
||||
//Reset the MessageManager pointer state
|
||||
resetQseMessageState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::expired(
|
||||
const void * tag
|
||||
)
|
||||
{
|
||||
// Not required as of now.
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::handleQSEDownReply()
|
||||
{
|
||||
if ((connector->bValidQSERequest) && (handleQSEReplyValidation()))
|
||||
{
|
||||
parent->streamValidationDone = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
connector->bValidQSERequest = true;
|
||||
parent->streamValidationDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::messageCompleted
|
||||
(
|
||||
MessageManager::Message *from
|
||||
)
|
||||
{
|
||||
if (from == &qseMessage)
|
||||
{
|
||||
handleQSEDownReply();
|
||||
|
||||
//Reset the MessageManager pointer state
|
||||
resetQseMessageState();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::sendQSEMessage
|
||||
(
|
||||
GroupImpl *group,
|
||||
QSE_REASON reasonId
|
||||
)
|
||||
{
|
||||
Address address(0);
|
||||
CLIENTID clientId;
|
||||
HDCPState hdcpState = {0};
|
||||
|
||||
// Get hdcp version to see if hdcp22 QSE or not.
|
||||
connector->main->configureHDCPGetHDCPState(hdcpState);
|
||||
setHdcp22Qse(hdcpState.HDCP_State_22_Capable);
|
||||
|
||||
// Check whether repeater or not.
|
||||
bIsRepeater = hdcpState.HDCP_State_Repeater_Capable;
|
||||
|
||||
//Generate the Pseudo Random number
|
||||
connector->qseNonceGenerator->makeClientId(clientId);
|
||||
for (unsigned i = 0 ; i < CLIENT_ID_SIZE; i++)
|
||||
{
|
||||
group->clientId[i] = clientId.data[i];
|
||||
}
|
||||
this->reason = reasonId;
|
||||
group->streamValidationDone = false;
|
||||
qseMessage.set( address,
|
||||
group->streamIndex,
|
||||
clientId.data,
|
||||
CP_IRQ_ON,
|
||||
STREAM_EVENT_MASK_ON,
|
||||
Force_Reauth,
|
||||
STREAM_BEHAVIOUR_MASK_ON);
|
||||
connector->messageManager->post(&qseMessage, this);
|
||||
}
|
||||
|
||||
bool
|
||||
StreamEncryptionStatusDetection::handleQSEReplyValidation()
|
||||
{
|
||||
if (parent->streamIndex != qseMessage.getStreamId())
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Query the active Stream ID %d, but reply Stream ID %d mismatch.", parent->streamIndex, qseMessage.getStreamId());
|
||||
parent->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU16 streamStatus = 0;
|
||||
streamStatus = qseMessage.getStreamStatus();
|
||||
DP_PRINTF(DP_NOTICE, "DP-QSE> Query the active Stream ID %d. The reply streamStatus: %d", parent->streamIndex, streamStatus);
|
||||
|
||||
NvU16 streamState = DRF_VAL(_DP, _HDCP, _STREAM_STATE, streamStatus);
|
||||
if ((streamState == NV_DP_HDCP_STREAM_STATE_NO_EXIST) ||
|
||||
(streamState == NV_DP_HDCP_STREAM_STATE_ERROR))
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Query the active Stream ID %d, but reply as Stream does not exist or Error/Reserved", parent->streamIndex);
|
||||
parent->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
return false;
|
||||
}
|
||||
else if (streamState == NV_DP_HDCP_STREAM_STATE_NOT_ACTIVE)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Query the active Stream ID %d, but reply as Stream not active", parent->streamIndex);
|
||||
parent->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU16 streamAuth = DRF_VAL(_DP, _HDCP, _STREAM_AUTHENTICATION, streamStatus);
|
||||
if (streamAuth == NV_DP_HDCP_STREAM_AUTHENTICATION_OFF)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Query the Stream ID %d, reply as failed authentication all the way down", parent->streamIndex);
|
||||
|
||||
parent->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Watch here for not over reacting encryption policy here.
|
||||
NvU16 streamEncrypt = DRF_VAL(_DP, _HDCP, _STREAM_ENCRYPTION, streamStatus);
|
||||
if (streamEncrypt == NV_DP_HDCP_STREAM_ENCRYPTION_OFF)
|
||||
{
|
||||
if (parent->hdcpEnabled)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP-QSE> Query the Stream ID %d, reply as not encryption all the way down", parent->streamIndex);
|
||||
parent->qseEncryptionStatusMismatch = parent->hdcpEnabled;
|
||||
parent->hdcpSetEncrypted(false, NV0073_CTRL_SPECIFIC_HDCP_CTRL_HDCP22_TYPE_0, NV_TRUE, NV_TRUE);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::resetQseMessageState()
|
||||
{
|
||||
qseMessage.clear();
|
||||
}
|
||||
|
||||
void
|
||||
StreamEncryptionStatusDetection::setHdcp22Qse(bool bHdcp22Qse)
|
||||
{
|
||||
bIsHdcp22Qse = bHdcp22Qse;
|
||||
qseMessage.setHdcp22Qse(bHdcp22Qse);
|
||||
}
|
||||
315
src/common/displayport/src/dp_splitter.cpp
Normal file
315
src/common/displayport/src/dp_splitter.cpp
Normal file
@@ -0,0 +1,315 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort********************************\
|
||||
* *
|
||||
* Module: dp_splitter.cpp *
|
||||
* Asynchronous Message Splitter *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_internal.h"
|
||||
#include "dp_bitstream.h"
|
||||
#include "dp_splitter.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_crc.h"
|
||||
#include "dp_configcaps.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
#define DP_MAX_HEADER_SIZE 16
|
||||
// timeout after 110ms with a retry recurring every 5ms for 10 times
|
||||
#define DOWNSTREAM_RETRY_ON_DEFER_TIMEOUT 110
|
||||
#define DOWNSTREAM_RETRY_ON_DEFER_PERIOD 5
|
||||
#define DOWNSTREAM_RETRY_ON_DEFER_COUNT 10
|
||||
|
||||
bool MessageTransactionSplitter::get(Buffer & assemblyBuffer)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned payloadSize;
|
||||
bool isTransactionStart, isTransactionEnd;
|
||||
Address address;
|
||||
unsigned LCT;
|
||||
unsigned LCR;
|
||||
unsigned headerSizeBits;
|
||||
|
||||
assemblyBuffer.reset();
|
||||
|
||||
//
|
||||
// Done?
|
||||
//
|
||||
if (this->messageOutstanding->buffer.length == this->assemblyTransmitted)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
address = this->messageOutstanding->address;
|
||||
if (this->messageOutstanding->isBroadcast)
|
||||
{
|
||||
// no RAD
|
||||
address.clear();
|
||||
LCT = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
LCT = address.size();
|
||||
}
|
||||
|
||||
// Calculate header size
|
||||
headerSizeBits = 8 + // LCT/LCR
|
||||
(((4 * (LCT -1)) + 4) &~ 7) + // byte aligned RAD
|
||||
16;
|
||||
|
||||
//
|
||||
// Pick how much data to send. Header+payloadSize <= 48 bytes.
|
||||
//
|
||||
payloadSize = DP_MIN(DPCD_MESSAGEBOX_SIZE - (headerSizeBits+7)/8, /*crc*/1 + this->messageOutstanding->buffer.length - this->assemblyTransmitted);
|
||||
|
||||
//
|
||||
// Is the first or last transaction in the sequence?
|
||||
//
|
||||
isTransactionStart = assemblyTransmitted == 0;
|
||||
isTransactionEnd = (assemblyTransmitted + payloadSize - 1) == messageOutstanding->buffer.length;
|
||||
|
||||
BitStreamWriter writer(&assemblyBuffer, 0);
|
||||
|
||||
//
|
||||
// Write the header
|
||||
//
|
||||
writer.write(LCT, 4);
|
||||
|
||||
LCR = this->messageOutstanding->isBroadcast ? 6 : LCT > 1 ? LCT - 1 : 0;
|
||||
|
||||
writer.write(LCR, 4);
|
||||
|
||||
// port at i=0 is the outport of source/gpu which should not be included in the RAD in outgoing message header
|
||||
// if this is a broadcast message; LCT would be 1; hence no RAD.
|
||||
for (i = 1; i < LCT; i++)
|
||||
writer.write(address[i], 4);
|
||||
writer.align(8);
|
||||
|
||||
writer.write(this->messageOutstanding->isBroadcast, 1);
|
||||
writer.write(this->messageOutstanding->isPathMessage, 1);
|
||||
writer.write(payloadSize, 6);
|
||||
|
||||
writer.write(isTransactionStart, 1);
|
||||
writer.write(isTransactionEnd, 1);
|
||||
writer.write(0, 1);
|
||||
|
||||
DP_ASSERT(messageOutstanding->messageNumber == 0 || messageOutstanding->messageNumber == 1);
|
||||
writer.write(messageOutstanding->messageNumber, 1);
|
||||
|
||||
//
|
||||
// Generate 4 bit CRC. (Nibble-wise CRC of previous values)
|
||||
//
|
||||
BitStreamReader reader(&assemblyBuffer, 0, writer.offset());
|
||||
writer.write(dpCalculateHeaderCRC(&reader), 4);
|
||||
|
||||
DP_ASSERT(writer.offset() == headerSizeBits && "Header size mismatch");
|
||||
DP_ASSERT((writer.offset() & 7) == 0 && "Packet header must end byte aligned");
|
||||
|
||||
//
|
||||
// Generate body CRC
|
||||
//
|
||||
BitStreamReader bodyReader(&this->messageOutstanding->buffer, this->assemblyTransmitted * 8, (payloadSize - 1) * 8);
|
||||
NvU8 bodyCrc = (NvU8)dpCalculateBodyCRC(&bodyReader);
|
||||
|
||||
// Copy in remaining buffer (leaving room for the CRC)
|
||||
for (i = 0; i < payloadSize - 1; ++i)
|
||||
writer.write(this->messageOutstanding->buffer.data[i + this->assemblyTransmitted], 8);
|
||||
writer.write(bodyCrc, 8);
|
||||
|
||||
this->assemblyTransmitted += payloadSize - 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OutgoingTransactionManager::expired(const void * tag)
|
||||
{
|
||||
writeToWindow(false);
|
||||
}
|
||||
|
||||
void OutgoingTransactionManager::cancel(OutgoingTransactionManagerEventSink * sink)
|
||||
{
|
||||
if (activeMessage && activeMessage->eventSink == sink)
|
||||
activeMessage->eventSink = 0;
|
||||
|
||||
for (ListElement * el = queuedMessages.begin(); el && el!=queuedMessages.end(); el = el->next)
|
||||
if (((OutgoingMessage *)el)->eventSink == sink)
|
||||
((OutgoingMessage *)el)->eventSink = 0;
|
||||
}
|
||||
|
||||
bool OutgoingTransactionManager::send( EncodedMessage & payload, OutgoingTransactionManagerEventSink * sink)
|
||||
{
|
||||
OutgoingMessage * om = new OutgoingMessage();
|
||||
|
||||
if (!om)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
om->eventSink = sink;
|
||||
om->message.swap(payload);
|
||||
|
||||
if (!activeMessage)
|
||||
{
|
||||
activeMessage = om;
|
||||
transactionSplitter.set(&om->message);
|
||||
transactionSplitter.get(this->assemblyBuffer);
|
||||
writeToWindow(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
queuedMessages.insertBack(om);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OutgoingTransactionManager::writeToWindow( bool firstAttempt)
|
||||
{
|
||||
AuxRetry::status result;
|
||||
|
||||
if (!activeMessage || !activeMessage->eventSink)
|
||||
goto findNextMessage;
|
||||
|
||||
result = this->writeMessageBox(assemblyBuffer.data, assemblyBuffer.length);
|
||||
|
||||
if (result == AuxRetry::defer)
|
||||
{
|
||||
|
||||
//
|
||||
// if retries left; queue one.
|
||||
//
|
||||
if (firstAttempt || retriesLeft )
|
||||
{
|
||||
if (firstAttempt)
|
||||
{
|
||||
// initialize retriesLeft
|
||||
retriesLeft = DOWNSTREAM_RETRY_ON_DEFER_COUNT;
|
||||
}
|
||||
|
||||
retriesLeft--;
|
||||
DP_PRINTF(DP_WARNING, "DP-MM> Messagebox write defer-ed. Q-ing retry.");
|
||||
this->timer->queueCallback(this, "SPDE", DOWNSTREAM_RETRY_ON_DEFER_PERIOD);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Notify message sender of failure. Keep in mind sender
|
||||
// might turn around immediately with a queue'd send.
|
||||
//
|
||||
if (activeMessage)
|
||||
{
|
||||
activeMessage->eventSink->splitterFailed(this);
|
||||
}
|
||||
|
||||
goto findNextMessage;
|
||||
}
|
||||
else if (result == AuxRetry::ack)
|
||||
{
|
||||
//
|
||||
// Split off another chunk and transmit
|
||||
//
|
||||
if (transactionSplitter.get(assemblyBuffer))
|
||||
{
|
||||
writeToWindow(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Notify message sender of success. Keep in mind sender
|
||||
// might turn around immediately with a queue'd send.
|
||||
//
|
||||
if (activeMessage)
|
||||
{
|
||||
activeMessage->eventSink->splitterTransmitted(this);
|
||||
}
|
||||
|
||||
goto findNextMessage;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Notify message sender of failure. Keep in mind sender
|
||||
// might turn around immediately with a queued send.
|
||||
//
|
||||
if (activeMessage)
|
||||
{
|
||||
activeMessage->eventSink->splitterFailed(this);
|
||||
}
|
||||
|
||||
findNextMessage:
|
||||
//
|
||||
// The old transaction is complete. Free the memory
|
||||
//
|
||||
delete activeMessage;
|
||||
activeMessage = 0;
|
||||
|
||||
//
|
||||
// Look for the next transaction
|
||||
//
|
||||
if (queuedMessages.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
activeMessage = (OutgoingMessage *)queuedMessages.begin();
|
||||
queuedMessages.remove(activeMessage);
|
||||
|
||||
transactionSplitter.set(&activeMessage->message);
|
||||
transactionSplitter.get(this->assemblyBuffer);
|
||||
writeToWindow(true);
|
||||
}
|
||||
}
|
||||
|
||||
OutgoingTransactionManager::OutgoingTransactionManager(Timer * timer)
|
||||
: timer(timer)
|
||||
{
|
||||
this->activeMessage = 0;
|
||||
}
|
||||
|
||||
AuxRetry::status DownRequestManager::writeMessageBox(NvU8 * data, size_t length)
|
||||
{
|
||||
return hal->writeDownRequestMessageBox(data, length);
|
||||
}
|
||||
|
||||
size_t DownRequestManager::getMessageBoxSize()
|
||||
{
|
||||
return hal->getDownRequestMessageBoxSize();
|
||||
}
|
||||
|
||||
AuxRetry::status UpReplyManager::writeMessageBox(NvU8 * data, size_t length)
|
||||
{
|
||||
return hal->writeUpReplyMessageBox(data, length);
|
||||
}
|
||||
|
||||
size_t UpReplyManager::getMessageBoxSize()
|
||||
{
|
||||
return hal->getUpReplyMessageBoxSize();
|
||||
}
|
||||
343
src/common/displayport/src/dp_sst_edid.cpp
Normal file
343
src/common/displayport/src/dp_sst_edid.cpp
Normal file
@@ -0,0 +1,343 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_sst_edid.c *
|
||||
* Implementation Single Stream EDID reads *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#include "dp_buffer.h"
|
||||
#include "dp_auxbus.h"
|
||||
#include "dp_internal.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
/*
|
||||
* seg -> 256 segment of EDID
|
||||
* offset -> offset within segment
|
||||
*/
|
||||
static bool readNextBlock(AuxBus * auxBus, NvU8 seg, NvU8 offset, Buffer & buffer, unsigned & totalRead, unsigned DDCAddress, Timer * timer)
|
||||
{
|
||||
AuxBus::Type type = AuxBus::i2cMot;
|
||||
AuxBus::status auxStatus;
|
||||
|
||||
unsigned retries = 0;
|
||||
unsigned sizeRequested;
|
||||
unsigned sizeCompleted;
|
||||
unsigned transactionSize = auxBus->transactionSize();
|
||||
totalRead = 0;
|
||||
|
||||
DP_ASSERT(auxBus);
|
||||
DP_ASSERT(transactionSize > 0);
|
||||
|
||||
// ASSERT if edidOffset offset wasn't increased in block len sizes
|
||||
DP_ASSERT(offset == 0 || offset == EDID_BLOCK_SIZE);
|
||||
|
||||
sizeRequested = transactionSize;
|
||||
if (!buffer.resize(EDID_BLOCK_SIZE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DP_ASSERT(sizeof(seg) == 1);
|
||||
DP_ASSERT(sizeof(offset) == 1);
|
||||
|
||||
// only set segment if it is required
|
||||
if (seg)
|
||||
{
|
||||
// start EDID read by specifying appropriate Edid segment id
|
||||
for (unsigned retry = 0; retry < EDID_MAX_AUX_RETRIES; retry++)
|
||||
{
|
||||
auxStatus = auxBus->transaction(AuxBus::write, AuxBus::i2cMot, EDID_SEG_SELECTOR_OFFSET >> 1,
|
||||
&seg, sizeof(seg), &sizeCompleted);
|
||||
if (auxStatus == AuxBus::success)
|
||||
break;
|
||||
|
||||
// If deferred due to timeout
|
||||
if (auxStatus == AuxBus::defer)
|
||||
{
|
||||
// Wait for sometime between retries
|
||||
timer->sleep(EDID_AUX_WAIT_TIME);
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
auxStatus = AuxBus::nack;
|
||||
|
||||
for (retries = 0; totalRead < EDID_BLOCK_SIZE;)
|
||||
{
|
||||
//
|
||||
// For retry, rewrite the Offset for the internal read pointer
|
||||
// except when the previous Read auxstatus was an Aux::defer
|
||||
// since in that case, the offset was never incremented by sink
|
||||
//
|
||||
if ((auxStatus != AuxBus::success) && (auxStatus != AuxBus::defer))
|
||||
{
|
||||
// start from this offset, need to verify with display with multiple edid blocks
|
||||
for (unsigned retry = 0; retry < EDID_MAX_AUX_RETRIES; retry++)
|
||||
{
|
||||
auxStatus = auxBus->transaction(AuxBus::write, AuxBus::i2cMot, DDCAddress >> 1,
|
||||
(NvU8*)(&offset), sizeof(offset), &sizeCompleted);
|
||||
if (auxStatus == AuxBus::success)
|
||||
break;
|
||||
// If deferred due to timeout
|
||||
if (auxStatus == AuxBus::defer)
|
||||
{
|
||||
// Wait for sometime between retries
|
||||
timer->sleep(EDID_AUX_WAIT_TIME);
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// if retries exceed EDID_MAX_AUX_RETRIES, give up
|
||||
if (auxStatus != AuxBus::success)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// need to change to I2C (not MOT) to read just one last part of EDID block
|
||||
if (totalRead + transactionSize >= EDID_BLOCK_SIZE)
|
||||
type = AuxBus::i2c;
|
||||
|
||||
sizeRequested = DP_MIN(transactionSize, EDID_BLOCK_SIZE - totalRead);
|
||||
auxStatus = auxBus->transaction(AuxBus::read, type, DDCAddress >> 1,
|
||||
&(buffer.data[totalRead]), sizeRequested, &sizeCompleted);
|
||||
|
||||
if (AuxBus::success != auxStatus || (sizeRequested && (sizeCompleted == 0)))
|
||||
{
|
||||
if (retries >= EDID_MAX_AUX_RETRIES)
|
||||
return false;
|
||||
|
||||
DP_PRINTF(DP_WARNING, "DisplayPort: %s: Retrying at totalRead 0x%08x (replyType %x, size %x)",
|
||||
__FUNCTION__, totalRead, auxStatus, sizeRequested);
|
||||
|
||||
// Wait for sometime between retries
|
||||
timer->sleep(EDID_AUX_WAIT_TIME);
|
||||
retries++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Assert when size mismatches and it is not last block
|
||||
if ((sizeRequested != sizeCompleted) &&
|
||||
(totalRead + transactionSize < EDID_BLOCK_SIZE))
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DisplayPort: %s: dpAux returned edid block smaller than expected. Read from totalRead 0x%08x (replyType %x, size %x)",
|
||||
__FUNCTION__, totalRead, auxStatus, sizeRequested);
|
||||
DP_ASSERT(0);
|
||||
}
|
||||
|
||||
retries = 0; // reset the number of retries
|
||||
totalRead += sizeCompleted;
|
||||
offset += (NvU8)sizeCompleted;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @return: true => EDID read is success, false => read is failure
|
||||
*/
|
||||
static bool sstReadEdid(AuxBus * auxBus, Edid & edid, unsigned DDCAddr, Timer * timer, bool pendingTestRequestEdidRead)
|
||||
{
|
||||
//
|
||||
// If there is pending test request for edid read,
|
||||
// ask edidReaderManager to take whatever posted,
|
||||
// instead of discarding bytes read by a failed read.
|
||||
// Because cert devices may need to see the checksum of these bytes,
|
||||
// even if they seem corrupted.
|
||||
//
|
||||
EdidAssembler edidReaderManager(&edid, pendingTestRequestEdidRead);
|
||||
NvU32 retryCount = 0;
|
||||
Buffer buffer;
|
||||
if (!buffer.resize(EDID_BLOCK_SIZE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DP_ASSERT(auxBus);
|
||||
|
||||
do
|
||||
{
|
||||
NvU8 seg = 0;
|
||||
NvU8 offset = 0;
|
||||
unsigned totalRead = 0;
|
||||
edidReaderManager.reset();
|
||||
|
||||
// start by reading first EDID block, posting it and analyzing for next request
|
||||
do
|
||||
{
|
||||
bool success = readNextBlock(auxBus, seg, offset, buffer, totalRead, DDCAddr, timer);
|
||||
edidReaderManager.postReply(buffer, totalRead, success);
|
||||
}
|
||||
while (edidReaderManager.readNextRequest(seg, offset));
|
||||
if (!edid.isPatchedChecksum())
|
||||
break;
|
||||
} while (retryCount++ < EDID_POLICY_BLOCK_READ_MAX_RETRY_COUNT);
|
||||
|
||||
//
|
||||
// EDID read is successful when
|
||||
// 1. read was done to the end (i.e. no corruption, no blocks exceeding retry count)
|
||||
// 2. EDID CRC is correct
|
||||
//
|
||||
return edidReaderManager.readIsComplete();
|
||||
}
|
||||
|
||||
EDID_DDC DisplayPort::sstDDCPing(AuxBus & dpAux)
|
||||
{
|
||||
unsigned sizeRequested = 0, sizeCompleted;
|
||||
AuxBus::status auxStatus = AuxBus::nack;
|
||||
NvU8 offset = 0;
|
||||
unsigned ddcAddrIdx;
|
||||
|
||||
for (ddcAddrIdx = 0; ddcAddrIdx < ddcAddrListSize; ddcAddrIdx++)
|
||||
{
|
||||
//
|
||||
// Don't use an I2C write. Some devices erroneously ACK on the write
|
||||
//
|
||||
auxStatus = dpAux.transaction(AuxBus::read, AuxBus::i2c, ddcAddrList[ddcAddrIdx] >> 1,
|
||||
&offset, sizeRequested, &sizeCompleted);
|
||||
|
||||
if (AuxBus::success == auxStatus)
|
||||
return (EDID_DDC)ddcAddrList[ddcAddrIdx];
|
||||
}
|
||||
|
||||
return EDID_DDC_NONE;
|
||||
|
||||
}
|
||||
|
||||
bool DisplayPort::EdidReadSST(Edid & edid, AuxBus * auxBus, Timer* timer,
|
||||
bool pendingTestRequestEdidRead, bool bBypassAssembler,
|
||||
MainLink * main)
|
||||
{
|
||||
Edid previousEdid;
|
||||
Buffer *buffer;
|
||||
bool status;
|
||||
bool firstTrial = true;
|
||||
NvU64 startTime, elapsedTime;
|
||||
for (unsigned i = 0; i < ddcAddrListSize; i++)
|
||||
{
|
||||
startTime = timer->getTimeUs();
|
||||
elapsedTime = 0;
|
||||
do
|
||||
{
|
||||
//
|
||||
// Client asks to use RM control code to fetch EDID.
|
||||
//
|
||||
if (bBypassAssembler && main)
|
||||
{
|
||||
unsigned blockCnt;
|
||||
buffer = edid.getBuffer();
|
||||
if (!buffer->resize(EDID_BLOCK_SIZE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
status = main->fetchEdidByRmCtrl(buffer->getData(), buffer->getLength());
|
||||
|
||||
if (status)
|
||||
{
|
||||
blockCnt = edid.getBlockCount();
|
||||
|
||||
// If read successfully, check if there are two or more blocks.
|
||||
if (blockCnt != 1)
|
||||
{
|
||||
if (!buffer->resize(EDID_BLOCK_SIZE * blockCnt))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
status = main->fetchEdidByRmCtrl(buffer->getData(), buffer->getLength());
|
||||
}
|
||||
}
|
||||
if (!status)
|
||||
{
|
||||
//
|
||||
// If fetchEdidByRmCtrl fails for some reasons:
|
||||
// Try to read again using DPLib read function.
|
||||
// One reason client to request read from RM is to making sure
|
||||
// the EDID is overridden (regkey or others). So call the RM
|
||||
// control call to apply the EDID overrides.
|
||||
//
|
||||
status = sstReadEdid(auxBus, edid, ddcAddrList[i], timer,
|
||||
pendingTestRequestEdidRead);
|
||||
if (status)
|
||||
{
|
||||
main->applyEdidOverrideByRmCtrl(buffer->getData(),
|
||||
buffer->getLength());
|
||||
}
|
||||
else
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "EDID> Failed to read EDID from RM and DPLib");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// If there is pending test request for edid read, make sure we get the raw bytes without check.
|
||||
// Because cert devices may need to see the checksum of whatever is read for edid, even if they seem corrupted.
|
||||
//
|
||||
status = sstReadEdid(auxBus, edid, ddcAddrList[i], timer, pendingTestRequestEdidRead);
|
||||
|
||||
}
|
||||
|
||||
if (status)
|
||||
{
|
||||
if (edid.verifyCRC())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (firstTrial) // first failure?
|
||||
{
|
||||
previousEdid.swap(edid);
|
||||
firstTrial = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (previousEdid == edid)
|
||||
{
|
||||
// we got the same invalid checksum again; we will assume it is valid.
|
||||
edid.setForcedEdidChecksum(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elapsedTime = timer->getTimeUs() - startTime;
|
||||
timer->sleep(1);
|
||||
} while (elapsedTime < (EDID_READ_RETRY_TIMEOUT_MS * 1000));
|
||||
}
|
||||
|
||||
DP_PRINTF(DP_ERROR, "EDID> Failed to ping sst DDC addresses");
|
||||
|
||||
return false;
|
||||
}
|
||||
200
src/common/displayport/src/dp_timer.cpp
Normal file
200
src/common/displayport/src/dp_timer.cpp
Normal file
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_timer.cpp *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_timer.h"
|
||||
#include "dp_printf.h"
|
||||
using namespace DisplayPort;
|
||||
|
||||
void Timer::expired()
|
||||
{
|
||||
fire(false);
|
||||
}
|
||||
|
||||
// Take care, this function is re-entrant.
|
||||
// Consider that sleep() is effectively a call to fire().
|
||||
// Clients may sleep in response to a timer callback.
|
||||
unsigned Timer::fire(bool fromSleep) // returns min time to next item to be fired
|
||||
{
|
||||
restart:
|
||||
|
||||
NvU64 now = getTimeUs();
|
||||
NvU64 nearest = (NvU64)-1;
|
||||
for (PendingCallback * i = (PendingCallback*)pending.begin(); i!=pending.end(); )
|
||||
{
|
||||
if (fromSleep && !i->executeInSleep) {
|
||||
i = (PendingCallback*)i->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (now >= i->timestamp)
|
||||
{
|
||||
const void * context = i->context;
|
||||
TimerCallback * target = i->target;
|
||||
delete i;
|
||||
if (target)
|
||||
target->expired(context); // Take care, the client may have made
|
||||
// a recursive call to fire in here.
|
||||
// Easy solution: Restart at front of list.
|
||||
// current time may have also changed
|
||||
// drastically from a nested sleep
|
||||
goto restart;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i->timestamp < nearest)
|
||||
nearest = i->timestamp;
|
||||
i = (PendingCallback*)i->next;
|
||||
}
|
||||
}
|
||||
unsigned minleft = (unsigned)((nearest - now + 999)/ 1000);
|
||||
return minleft;
|
||||
}
|
||||
|
||||
void Timer::_pump(unsigned milliseconds, bool fromSleep)
|
||||
{
|
||||
do
|
||||
{
|
||||
unsigned amt = fire(fromSleep);
|
||||
if (amt >= milliseconds) {
|
||||
raw->sleep(milliseconds);
|
||||
return;
|
||||
}
|
||||
raw->sleep(amt);
|
||||
milliseconds-=amt;
|
||||
} while(milliseconds);
|
||||
}
|
||||
|
||||
//
|
||||
// Queue a timer callback.
|
||||
// Unless the dont-execute-in-sleep flag is set
|
||||
//
|
||||
void Timer::queueCallback(Timer::TimerCallback * target, const void * context, unsigned milliseconds, bool executeInSleep)
|
||||
{
|
||||
NvU64 now = getTimeUs();
|
||||
PendingCallback * callback = new PendingCallback();
|
||||
if (callback == NULL)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "DP> %s: Failed to allocate callback",
|
||||
__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
callback->target = target;
|
||||
callback->context = context;
|
||||
callback->timestamp = now + milliseconds * 1000;
|
||||
callback->executeInSleep = executeInSleep;
|
||||
pending.insertBack(callback);
|
||||
raw->queueCallback(this, milliseconds);
|
||||
}
|
||||
|
||||
NvU64 Timer::getTimeUs()
|
||||
{
|
||||
return raw->getTimeUs();
|
||||
}
|
||||
|
||||
// Sleep a number of milliseconds.
|
||||
// timer callbacks will be serviced!
|
||||
void Timer::sleep(unsigned milliseconds)
|
||||
{
|
||||
_pump(milliseconds, true);
|
||||
}
|
||||
|
||||
void Timer::cancelCallbacks(Timer::TimerCallback * to)
|
||||
{
|
||||
if (!to)
|
||||
return;
|
||||
for (PendingCallback * i = (PendingCallback*)pending.begin(); i!=pending.end(); i = (PendingCallback *)i->next)
|
||||
if (i->target == to)
|
||||
i->target = 0;
|
||||
}
|
||||
|
||||
void Timer::cancelCallback(Timer::TimerCallback * to, const void * context)
|
||||
{
|
||||
if (!to)
|
||||
return;
|
||||
for (PendingCallback * i = (PendingCallback *)pending.begin(); i!=pending.end(); i = (PendingCallback*)i->next)
|
||||
if (i->target == to && i->context == context)
|
||||
i->target = 0;
|
||||
}
|
||||
|
||||
// Queue callbacks in order.
|
||||
void Timer::queueCallbackInOrder(Timer::TimerCallback * target, const void * context, unsigned milliseconds, bool executeInSleep)
|
||||
{
|
||||
NvU64 now = getTimeUs();
|
||||
PendingCallback * callback = new PendingCallback();
|
||||
callback->target = target;
|
||||
callback->context = context;
|
||||
callback->timestamp = now + milliseconds * 1000;
|
||||
callback->executeInSleep = executeInSleep;
|
||||
|
||||
//Figure out where to insert the current callback
|
||||
Timer::PendingCallback* i;
|
||||
|
||||
for (i = (PendingCallback*)pending.begin(); i != pending.end();)
|
||||
{
|
||||
// only for the given context.
|
||||
if(i->context == context)
|
||||
{
|
||||
if(i->timestamp > callback->timestamp)
|
||||
break;
|
||||
}
|
||||
i = (PendingCallback*) i->next;
|
||||
}
|
||||
if (i == pending.end())
|
||||
{
|
||||
pending.insertBack(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
pending.insertBefore(i, callback);
|
||||
}
|
||||
|
||||
raw->queueCallback(this, milliseconds);
|
||||
}
|
||||
|
||||
void Timer::cancelAllCallbacks()
|
||||
{
|
||||
for (PendingCallback * i = (PendingCallback*)pending.begin(); i!=pending.end(); i = (PendingCallback *)i->next)
|
||||
i->target = 0;
|
||||
}
|
||||
|
||||
void Timer::cancelCallbacksWithoutContext(const void * context)
|
||||
{
|
||||
for (PendingCallback * i = (PendingCallback*)pending.begin(); i!=pending.end(); i = (PendingCallback *)i->next)
|
||||
if(i->context != context)
|
||||
i->target = 0;
|
||||
}
|
||||
|
||||
bool Timer::checkCallbacksOfSameContext(const void * context)
|
||||
{
|
||||
for (PendingCallback * i = (PendingCallback*)pending.begin(); i!=pending.end(); i = (PendingCallback *)i->next)
|
||||
if(i->context == context)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
248
src/common/displayport/src/dp_vrr.cpp
Normal file
248
src/common/displayport/src/dp_vrr.cpp
Normal file
@@ -0,0 +1,248 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_vrr.cpp *
|
||||
* Implementation of VRR enablement *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_connectorimpl.h"
|
||||
#include "dp_vrr.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
bool VrrEnablement::start()
|
||||
{
|
||||
bool rc;
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> **** VRR Enablement Started ****");
|
||||
rc = vrrGetPublicInfo();
|
||||
if(rc)
|
||||
{
|
||||
rc = vrrEnableMonitor();
|
||||
if(rc != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
rc = vrrEnableDriver();
|
||||
if(rc != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> **** VRR Enablement Ends ****");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VrrEnablement::vrrGetPublicInfo()
|
||||
{
|
||||
MainLink *main = this->parent->connector->main;
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_INIT_PUBLIC_INFO, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_RESET_MONITOR, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_GET_PUBLIC_INFO, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return vrrWaitOnEnableStatus();
|
||||
}
|
||||
|
||||
bool VrrEnablement::vrrEnableMonitor()
|
||||
{
|
||||
MainLink *main = this->parent->connector->main;
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> ** VRR_MON_ENABLE starts **");
|
||||
|
||||
// Always set the enable F/W state m/c to a known state.
|
||||
if(main->vrrRunEnablementStage(VRR_ENABLE_STAGE_RESET_MONITOR, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wait for VRR to be 'ready'.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(main->vrrRunEnablementStage(VRR_ENABLE_STAGE_MONITOR_ENABLE_BEGIN, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wait for VRR to be 'ready'.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
main->vrrRunEnablementStage(VRR_ENABLE_STAGE_MONITOR_ENABLE_CHALLENGE, NULL);
|
||||
|
||||
// Wait for VRR to be ready.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Compare and enable on successful comparison.
|
||||
if(main->vrrRunEnablementStage(VRR_ENABLE_STAGE_MONITOR_ENABLE_CHECK, NULL) == true)
|
||||
{
|
||||
this->bMonitorEnabled = true;
|
||||
}
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> ** VRR_MON_ENABLE ends **");
|
||||
|
||||
return this->bMonitorEnabled;
|
||||
}
|
||||
|
||||
bool VrrEnablement::vrrEnableDriver()
|
||||
{
|
||||
NvU32 enableResult;
|
||||
|
||||
MainLink *main = this->parent->connector->main;
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> ** VRR_DRV_ENABLE starts **");
|
||||
|
||||
// Always set the enable F/W state m/c to a known state.
|
||||
if(main->vrrRunEnablementStage(VRR_ENABLE_STAGE_RESET_MONITOR, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wait for VRR to be 'ready'.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_DRIVER_ENABLE_BEGIN, &enableResult) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enableResult == NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_PENDING)
|
||||
{
|
||||
// Wait for VRR to be ready.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (enableResult == NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_OK)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_DRIVER_ENABLE_CHALLENGE, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wait for VRR to be 'ready'.
|
||||
if (vrrWaitOnEnableStatus() != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_DRIVER_ENABLE_CHECK, NULL) != true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DP_PRINTF(DP_NOTICE, "DPHAL_VRR_ENABLE> ** VRR_DRV_ENABLE ends **");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VrrEnablement::vrrWaitOnEnableStatus(void)
|
||||
{
|
||||
NvU32 timeout = VRR_ENABLE_STATUS_TIMEOUT_THRESHOLD;
|
||||
NvU32 enableResult;
|
||||
|
||||
MainLink *main = this->parent->connector->main;
|
||||
ConnectorImpl *connector = this->parent->connector;
|
||||
do
|
||||
{
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_STATUS_CHECK, &enableResult) == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (enableResult == NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_READ_ERROR)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (enableResult == NV0073_CTRL_DP_CMD_ENABLE_VRR_STATUS_PENDING)
|
||||
{
|
||||
Timeout timeout(connector->timer, VRR_ENABLE_STATUS_TIMEOUT_INTERVAL_MS);
|
||||
while(timeout.valid());
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}while(--timeout);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool VrrEnablement::isMonitorEnabled(void)
|
||||
{
|
||||
return (this->bMonitorEnabled);
|
||||
}
|
||||
|
||||
bool VrrEnablement::isDriverEnabled(void)
|
||||
{
|
||||
NvU32 enableResult;
|
||||
MainLink *main = this->parent->connector->main;
|
||||
if (main->vrrRunEnablementStage(VRR_ENABLE_STAGE_DRIVER_ENABLE_CHECK,
|
||||
&enableResult) == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
650
src/common/displayport/src/dp_wardatabase.cpp
Normal file
650
src/common/displayport/src/dp_wardatabase.cpp
Normal file
@@ -0,0 +1,650 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_wardatabase.cpp *
|
||||
* EDID and OUI based workarounds for panel/TCON issues *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_wardatabase.h"
|
||||
#include "dp_edid.h"
|
||||
#include "dp_connectorimpl.h"
|
||||
#include "dp_printf.h"
|
||||
|
||||
using namespace DisplayPort;
|
||||
|
||||
void ConnectorImpl::applyOuiWARs()
|
||||
{
|
||||
switch (ouiId)
|
||||
{
|
||||
// Megachips Mystique
|
||||
case 0xE18000:
|
||||
if (((modelName[0] == 'D') && (modelName[1] == 'p') && (modelName[2] == '1') &&
|
||||
(modelName[3] == '.') && (modelName[4] == '1')))
|
||||
{
|
||||
//
|
||||
// Mystique based link box for HTC Vive has a peculiar behaviour
|
||||
// of sending a link retraining pulse if the link is powered down in the absence
|
||||
// of an active stream. Bug# 1793084. Set the flag so that link is not powered down.
|
||||
//
|
||||
bKeepOptLinkAlive = true;
|
||||
}
|
||||
|
||||
if (((modelName[0] == 'D') && (modelName[1] == 'p') && (modelName[2] == '1') &&
|
||||
(modelName[3] == '.') && (modelName[4] == '2')))
|
||||
{
|
||||
//
|
||||
// ASUS monitor loses link sometimes during assessing link or link training.
|
||||
// So if we retrain link by lowering config from HBR2 to HBR we see black screen
|
||||
// Set the flag so that we first retry link training with same link config
|
||||
// before following link training fallback. Bug #1846925
|
||||
//
|
||||
bNoFallbackInPostLQA = true;
|
||||
}
|
||||
break;
|
||||
|
||||
// Synaptics
|
||||
case 0x24CC90:
|
||||
if ((modelName[0] == 'S') && (modelName[1] == 'Y') && (modelName[2] == 'N') &&
|
||||
(modelName[3] == 'A') && (((modelName[4] == 'S') &&
|
||||
((modelName[5] == '1') || (modelName[5] == '2') ||
|
||||
(modelName[5] == '3') || (modelName[5] == '#') ||
|
||||
(modelName[5] == '\"')))||((modelName[4] == 0x84) &&
|
||||
(modelName[5] == '0'))))
|
||||
{
|
||||
//
|
||||
// Extended latency from link-train end to FEC enable pattern
|
||||
// to avoid link lost or blank screen with Synaptics branch.
|
||||
//
|
||||
LT2FecLatencyMs = 57;
|
||||
|
||||
if (bDscMstCapBug3143315)
|
||||
{
|
||||
//
|
||||
// Synaptics branch device doesn't support Virtual Peer Devices so DSC
|
||||
// capability of downstream device should be decided based on device's own
|
||||
// and its parent's DSC capability
|
||||
//
|
||||
bDscCapBasedOnParent = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Edid::applyEdidWorkArounds(NvU32 warFlag, const DpMonitorDenylistData *pDenylistData)
|
||||
{
|
||||
unsigned ManufacturerID = this->getManufId();
|
||||
unsigned ProductID = this->getProductId();
|
||||
unsigned YearWeek = this->getYearWeek();
|
||||
|
||||
//
|
||||
// Work around EDID problems, using manufacturer, product ID, and date of manufacture,
|
||||
// to identify each case.
|
||||
//
|
||||
switch (ManufacturerID)
|
||||
{
|
||||
// Apple
|
||||
case 0x1006:
|
||||
if (0x9227 == ProductID)
|
||||
{
|
||||
this->WARFlags.powerOnBeforeLt = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> WAR for Apple thunderbolt J29 panel");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> - Monitor needs to be powered up before LT. Bug 933051");
|
||||
}
|
||||
break;
|
||||
|
||||
// Acer
|
||||
case 0x7204:
|
||||
// Bug 451868: Acer AL1512 monitor has a wrong extension count:
|
||||
if(0xad15 == ProductID && YearWeek <= 0x0d01)
|
||||
{
|
||||
// clear the extension count
|
||||
buffer.data[0x7E] = 0;
|
||||
this->WARFlags.extensionCountDisabled = true;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid override on Acer AL1512");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> - Disabling extension count.Bug 451868");
|
||||
}
|
||||
break;
|
||||
|
||||
// Westinghouse
|
||||
case 0x855C:
|
||||
|
||||
// Westinghouse 37" 1080p TV. LVM-37w3 (Port DVI1 EDID).
|
||||
// Westinghouse 42" 1080p TV. LVM-42w2 (Port DVI1 EDID).
|
||||
if (ProductID == 0x3703 || ProductID == 0x4202)
|
||||
{
|
||||
// Claims HDMI support, but audio causes picture corruption.
|
||||
// Removing HDMI extension block
|
||||
|
||||
if (buffer.getLength() > 0x80 &&
|
||||
buffer.data[0x7E] == 1 && // extension block present
|
||||
buffer.data[0x80] == 0x02 && // CEA block
|
||||
buffer.data[0x81] == 0x03 && // revision 3
|
||||
!(buffer.data[0x83] & 0x40)) // No basic audio, must not be the HDMI port
|
||||
{
|
||||
// clear the extension count
|
||||
buffer.data[0x7E] = 0;
|
||||
this->WARFlags.extensionCountDisabled = true;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on Westinghouse AL1512 LVM- <37/42> w <2/3>");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> - Disabling extension count.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// IBM
|
||||
case 0x4D24:
|
||||
if(ProductID == 0x1A03)
|
||||
{
|
||||
// 2001 Week 50
|
||||
if (YearWeek == 0x0B32)
|
||||
{
|
||||
// Override IBM T210. IBM T210 reports 2048x1536x60Hz in the edid but it's
|
||||
// actually 2048x1536x40Hz. See bug 76347. This hack was, earlier, in disp driver
|
||||
// Now it's being moved down to keep all overrides in same place.
|
||||
// This hack was also preventing disp driver from comparing entire edid when
|
||||
// trying to figure out whether or not the edid for some device has changed.
|
||||
buffer.data[0x36] = 0x32;
|
||||
buffer.data[0x37] = 0x3E;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on IBM T210");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> 2048x1536x60Hz(misreported) -> 2048x1536x40Hz. Bug 76347");
|
||||
}
|
||||
}
|
||||
break;
|
||||
// GWY (Gateway) or EMA (eMachines)
|
||||
case 0xF91E: // GWY
|
||||
case 0xA115: // EMA
|
||||
// Some Gateway monitors present the eMachines mfg code, so these two cases are combined.
|
||||
// Future fixes may require the two cases to be separated.
|
||||
// Fix for Bug 343870. NOTE: Problem found on G80; fix applied to all GPUs.
|
||||
if ((ProductID >= 0x0776 ) && (ProductID <= 0x0779)) // Product id's range from decimal 1910 to 1913
|
||||
{
|
||||
// if detailed pixel clock frequency = 106.50MHz
|
||||
if ((buffer.data[0x36] == 0x9A) &&
|
||||
(buffer.data[0x37] == 0x29) )
|
||||
{
|
||||
// then change detailed pixel clock frequency to 106.54MHz to fix bug 343870
|
||||
buffer.data[0x36] = 0x9E;
|
||||
buffer.data[0x37] = 0x29;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on GWY/EMA");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> 106.50MHz(misreported) -> 106.50MHz.Bug 343870");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// INX
|
||||
case 0x2C0C:
|
||||
// INX L15CX monitor has an invalid detailed timing 10x311 @ 78Hz.
|
||||
if( ProductID == 0x1502)
|
||||
{
|
||||
// remove detailed timing #4: zero out the first 3 bytes of DTD#4 block
|
||||
buffer.data[0x6c] = 0x0;
|
||||
buffer.data[0x6d] = 0x0;
|
||||
buffer.data[0x6e] = 0x0;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on INX L15CX");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Removing invalid detailed timing 10x311 @ 78Hz");
|
||||
}
|
||||
break;
|
||||
|
||||
// AUO
|
||||
case 0xAF06:
|
||||
if ((ProductID == 0x103C) || (ProductID == 0x113C))
|
||||
{
|
||||
//
|
||||
// Acer have faulty AUO eDP panels which have
|
||||
// wrong HBlank in the EDID. Correcting it here.
|
||||
//
|
||||
buffer.data[0x39] = 0x4B; // new hblank width: 75
|
||||
buffer.data[0x3F] = 0x1B; // new hsync pulse width: 27
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on AUO eDP panel");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Modifying HBlank and HSync pulse width.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Bugs 907998, 1001160");
|
||||
}
|
||||
else if (ProductID == 0x109B || ProductID == 0x119B)
|
||||
{
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> AUO eDP");
|
||||
DP_PRINTF(DP_NOTICE, "implements only Legacy interrupt address range");
|
||||
|
||||
// Bug 1792962 - Panel got glitch on D3 write, apply this WAR.
|
||||
this->WARFlags.disableDpcdPowerOff = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Disable DPCD Power Off");
|
||||
}
|
||||
break;
|
||||
|
||||
// LPL
|
||||
case 0x0C32:
|
||||
if (ProductID == 0x0000)
|
||||
{
|
||||
//
|
||||
// Patch EDID for Quanta - Toshiba LG 1440x900 panel. See Bug 201428
|
||||
// Must 1st verify that we have that panel. It has MFG id 32, 0C
|
||||
// BUT product ID for this (and other different LG panels) are 0000.
|
||||
// So verify that the last "Custom Timing" area of the EDID has
|
||||
// a "Monitor Description" of type FE = "ASCII Data String" which
|
||||
// has this panel's name = "LP171WX2-A4K5".
|
||||
//
|
||||
if ((buffer.data[0x71] == 0x4C) &&
|
||||
(buffer.data[0x72] == 0x50) &&
|
||||
(buffer.data[0x73] == 0x31) &&
|
||||
(buffer.data[0x74] == 0x37) &&
|
||||
(buffer.data[0x75] == 0x31) &&
|
||||
(buffer.data[0x76] == 0x57) &&
|
||||
(buffer.data[0x77] == 0x58) &&
|
||||
(buffer.data[0x78] == 0x32) &&
|
||||
(buffer.data[0x79] == 0x2D) &&
|
||||
(buffer.data[0x7A] == 0x41) &&
|
||||
(buffer.data[0x7B] == 0x34) &&
|
||||
(buffer.data[0x7C] == 0x4B) &&
|
||||
(buffer.data[0x7D] == 0x35) )
|
||||
{
|
||||
//
|
||||
// Was 0x95, 0x25 = -> 0x2595 = 9621 or 96.21 Mhz.
|
||||
// 96,210,000 / 1760 / 912 = 59.939 Hz
|
||||
// Want 60 * 1760 * 912 ~= 9631 or 96.31 MHz
|
||||
// 9631 = 0x259F -> 0x9F 0x25.
|
||||
// So, change byte 36 from 0x95 to 0x9F.
|
||||
//
|
||||
buffer.data[0x36] = 0x9F;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on Quanta - Toshiba LG 1440x900");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Correcting pclk. Bug 201428");
|
||||
}
|
||||
}
|
||||
else
|
||||
if (ProductID == 0xE300)
|
||||
{
|
||||
//
|
||||
// Patch EDID for MSI - LG LPL 1280x800 panel. See Bug 359313
|
||||
// Must 1st verify that we have that panel. It has MFG id 32, 0C
|
||||
// BUT product ID for this (and other different LG panels) are E300.
|
||||
// So verify that the last "Custom Timing" area of the EDID has
|
||||
// a "Monitor Description" of type FE = "ASCII Data String" which
|
||||
// has this panel's name = "LP154WX4-TLC3".
|
||||
//
|
||||
if ((buffer.data[0x71] == 0x4C) &&
|
||||
(buffer.data[0x72] == 0x50) &&
|
||||
(buffer.data[0x73] == 0x31) &&
|
||||
(buffer.data[0x74] == 0x35) &&
|
||||
(buffer.data[0x75] == 0x34) &&
|
||||
(buffer.data[0x76] == 0x57) &&
|
||||
(buffer.data[0x77] == 0x58) &&
|
||||
(buffer.data[0x78] == 0x34) &&
|
||||
(buffer.data[0x79] == 0x2D) &&
|
||||
(buffer.data[0x7A] == 0x54) &&
|
||||
(buffer.data[0x7B] == 0x4C) &&
|
||||
(buffer.data[0x7C] == 0x43) &&
|
||||
(buffer.data[0x7D] == 0x33) )
|
||||
{
|
||||
//
|
||||
// Was 0xBC, 0x1B = -> 0x1BBC = 7100 or 71.00 Mhz.
|
||||
// 71,000,000 / 1488 / 826 = 59.939 Hz
|
||||
// Want 60 * 1488 * 826 ~= 7111 or 71.11 MHz
|
||||
// 7111 = 0x1BC7 -> 0xC7 0x1B.
|
||||
// So, change byte 36 from 0xBC to 0xC7.
|
||||
//
|
||||
buffer.data[0x36] = 0xC7;
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on MSI - LG LPL 1280x800");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Correcting pclk. Bug 359313");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// SKY
|
||||
case 0x794D:
|
||||
if (ProductID == 0x9880)
|
||||
{
|
||||
//
|
||||
// Override for Haier TV to remove resolution
|
||||
// 1366x768 from EDID data. Refer bug 351680 & 327891
|
||||
// Overriding 18 bytes from offset 0x36.
|
||||
//
|
||||
buffer.data[0x36] = 0x01;
|
||||
buffer.data[0x37] = 0x1D;
|
||||
buffer.data[0x38] = 0x00;
|
||||
buffer.data[0x39] = 0x72;
|
||||
buffer.data[0x3A] = 0x51;
|
||||
buffer.data[0x3B] = 0xD0;
|
||||
buffer.data[0x3C] = 0x1E;
|
||||
buffer.data[0x3D] = 0x20;
|
||||
buffer.data[0x3E] = 0x6E;
|
||||
buffer.data[0x3F] = 0x28;
|
||||
buffer.data[0x40] = 0x55;
|
||||
buffer.data[0x41] = 0x00;
|
||||
buffer.data[0x42] = 0xC4;
|
||||
buffer.data[0x43] = 0x8E;
|
||||
buffer.data[0x44] = 0x21;
|
||||
buffer.data[0x45] = 0x00;
|
||||
buffer.data[0x46] = 0x00;
|
||||
buffer.data[0x47] = 0x1E;
|
||||
|
||||
this->WARFlags.dataForced = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Edid overrid on Haier TV.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Removing 1366x768. bug 351680 & 327891");
|
||||
|
||||
}
|
||||
break;
|
||||
// HP
|
||||
case 0xF022:
|
||||
switch (ProductID)
|
||||
{
|
||||
case 0x192F:
|
||||
//
|
||||
// WAR for bug 1643712 - Issue specific to HP Z1 G2 (Zeus) All-In-One
|
||||
// Putting the Rx in power save mode before BL_EN is deasserted, makes this specific sink unhappy
|
||||
// Bug 1559465 will address the right power down sequence. We need to revisit this WAR once Bug 1559465 is fixed.
|
||||
//
|
||||
this->WARFlags.disableDpcdPowerOff = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Disable DPCD Power Off");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> HP Z1 G2 (Zeus) AIO Bug 1643712");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
// Sharp
|
||||
case 0x104d:
|
||||
switch (ProductID)
|
||||
{
|
||||
case 0x141c: // HP Valor QHD+ N15P-Q3 Sharp EDP
|
||||
//
|
||||
// HP Valor QHD+ N15P-Q3 EDP needs 50 ms delay
|
||||
// after D3 to avoid black screen issues.
|
||||
//
|
||||
this->WARFlags.delayAfterD3 = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> HP Valor QHD+ N15P-Q3 Sharp EDP needs 50 ms after D3");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> bug 1520011");
|
||||
break;
|
||||
|
||||
//Sharp EDPs that declares DP1.2 but doesn't implement ESI address space
|
||||
case 0x1414:
|
||||
case 0x1430:
|
||||
case 0x1445:
|
||||
case 0x1446:
|
||||
case 0x144C:
|
||||
case 0x1450:
|
||||
case 0x1467:
|
||||
case 0x145e:
|
||||
//
|
||||
// Use Legacy address space for DP1.2 panel
|
||||
//
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Sharp EDP implements only Legacy interrupt address range");
|
||||
break;
|
||||
|
||||
case 0x143B:
|
||||
//
|
||||
// Bug 200113041
|
||||
// Need to be unique to identify this Sharp panel. Besides
|
||||
// manufacturer ID and ProductID, we have to add the mode
|
||||
// name to make this happen as LQ156D1JW05 in ASCII.
|
||||
//
|
||||
if ((buffer.data[0x71] == 0x4C) &&
|
||||
(buffer.data[0x72] == 0x51) &&
|
||||
(buffer.data[0x73] == 0x31) &&
|
||||
(buffer.data[0x74] == 0x35) &&
|
||||
(buffer.data[0x75] == 0x36) &&
|
||||
(buffer.data[0x76] == 0x44) &&
|
||||
(buffer.data[0x77] == 0x31) &&
|
||||
(buffer.data[0x78] == 0x4A) &&
|
||||
(buffer.data[0x79] == 0x57) &&
|
||||
(buffer.data[0x7A] == 0x30) &&
|
||||
(buffer.data[0x7B] == 0x35) &&
|
||||
(buffer.data[0x7C] == 0x0A) &&
|
||||
(buffer.data[0x7D] == 0x20))
|
||||
{
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Sharp EDP implements only Legacy interrupt address range");
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
// EIZO
|
||||
case 0xc315:
|
||||
if (ProductID == 0x2227)
|
||||
{
|
||||
//
|
||||
// The EIZO FlexScan SX2762W generates a redundant long HPD
|
||||
// pulse after a modeset, which triggers another modeset on GPUs
|
||||
// without flush mode, triggering an infinite link training
|
||||
// loop.
|
||||
//
|
||||
this->WARFlags.ignoreRedundantHotplug = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> EIZO FlexScan SX2762W generates redundant");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> hotplugs (bug 1048796)");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
// MEI-Panasonic
|
||||
case 0xa934:
|
||||
if (ProductID == 0x96a2)
|
||||
{
|
||||
//
|
||||
// Bug 200113041
|
||||
// Need to be unique to identify this MEI-Panasonic panel.
|
||||
// Besides manufacturer ID and ProductID, we have to add the
|
||||
// model name to make this happen as VVX17P051J00^ in ASCII.
|
||||
//
|
||||
if ((buffer.data[0x71] == 0x56) &&
|
||||
(buffer.data[0x72] == 0x56) &&
|
||||
(buffer.data[0x73] == 0x58) &&
|
||||
(buffer.data[0x74] == 0x31) &&
|
||||
(buffer.data[0x75] == 0x37) &&
|
||||
(buffer.data[0x76] == 0x50) &&
|
||||
(buffer.data[0x77] == 0x30) &&
|
||||
(buffer.data[0x78] == 0x35) &&
|
||||
(buffer.data[0x79] == 0x31) &&
|
||||
(buffer.data[0x7A] == 0x4A) &&
|
||||
(buffer.data[0x7B] == 0x30) &&
|
||||
(buffer.data[0x7C] == 0x30) &&
|
||||
(buffer.data[0x7D] == 0x0A))
|
||||
{
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> MEI-Panasonic EDP");
|
||||
DP_PRINTF(DP_NOTICE, "implements only Legacy interrupt address range");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// LG
|
||||
case 0xE430:
|
||||
if (ProductID == 0x0469)
|
||||
{
|
||||
//
|
||||
// The LG display can't be driven at FHD with 2*RBR.
|
||||
// Force max link config
|
||||
//
|
||||
this->WARFlags.forceMaxLinkConfig = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Force maximum link config WAR required on LG panel.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> bug 1649626");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x8F34:
|
||||
if (ProductID == 0xAA55)
|
||||
{
|
||||
this->WARFlags.forceMaxLinkConfig = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Force maximum link config WAR required on Sharp-CerebrEx panel.");
|
||||
}
|
||||
break;
|
||||
|
||||
// CMN
|
||||
case 0xAE0D:
|
||||
if (ProductID == 0x1747)
|
||||
{
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> CMN eDP");
|
||||
DP_PRINTF(DP_NOTICE, "implements only Legacy interrupt address range");
|
||||
}
|
||||
break;
|
||||
|
||||
// BenQ
|
||||
case 0xD109:
|
||||
if ((ProductID == 0x7F2B) || (ProductID == 0x7F2F))
|
||||
{
|
||||
this->WARFlags.ignoreRedundantHotplug = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> BenQ GSync power on/off redundant hotplug");
|
||||
}
|
||||
break;
|
||||
|
||||
// MSI
|
||||
case 0x834C:
|
||||
if (ProductID == 0x4C48)
|
||||
{
|
||||
this->WARFlags.useLegacyAddress = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> MSI eDP\n");
|
||||
DP_PRINTF(DP_NOTICE, "implements only Legacy interrupt address range\n");
|
||||
}
|
||||
break;
|
||||
|
||||
// Unigraf
|
||||
case 0xC754:
|
||||
case 0x1863:
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Unigraf device, keep link alive during detection\n");
|
||||
this->WARFlags.keepLinkAlive = true;
|
||||
}
|
||||
break;
|
||||
|
||||
// BOE
|
||||
case 0xE509:
|
||||
if ((ProductID == 0x977) || (ProductID == 0x974) || (ProductID == 0x9D9))
|
||||
{
|
||||
this->WARFlags.bIgnoreDscCap = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> BOE panels incorrectly exposing DSC capability. Ignoring it.");
|
||||
}
|
||||
break;
|
||||
|
||||
// NCP
|
||||
case 0x7038:
|
||||
if (ProductID == 0x005F)
|
||||
{
|
||||
this->WARFlags.bIgnoreDscCap = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> NCP panels incorrectly exposing DSC capability. Ignoring it.");
|
||||
}
|
||||
break;
|
||||
|
||||
//
|
||||
// This panel advertise DSC capabilities, but panel doesn't support DSC
|
||||
// So ignoring DSC capability on this panel
|
||||
//
|
||||
case 0x6F0E:
|
||||
if (ProductID == 0x1609)
|
||||
{
|
||||
this->WARFlags.bIgnoreDscCap = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Ignoring DSC capability on Lenovo CSOT 1609 Panel.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Bug 3444252");
|
||||
}
|
||||
break;
|
||||
|
||||
// Asus
|
||||
case 0x6D1E:
|
||||
if (ProductID == 0x7707)
|
||||
{
|
||||
this->WARFlags.bIgnoreDscCap = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Panel incorrectly exposing DSC capability. Ignoring it.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Bug 3543158");
|
||||
}
|
||||
else if (ProductID == 0x5B9A)
|
||||
{
|
||||
this->WARFlags.bDisableDscMaxBppLimit = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Disable DSC max BPP limit of 16 for DSC.");
|
||||
}
|
||||
else if (ProductID == 0x5CA7 || ProductID == 0x9E9D || ProductID == 0x9EA0 || ProductID == 0x9EA5 || ProductID == 0x5CB7 ||
|
||||
ProductID == 0x9EA8 || ProductID == 0x9EAF || ProductID == 0x7846 || ProductID == 0x7849 || ProductID == 0x5CB5)
|
||||
{
|
||||
this->WARFlags.bForceHeadShutdownOnModeTransition = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Force head shutdown on Mode transition.");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Find out if the monitor needs a WAR to applied.
|
||||
if (warFlag)
|
||||
{
|
||||
if (warFlag & DP_MONITOR_CAPABILITY_DP_SKIP_REDUNDANT_LT)
|
||||
{
|
||||
this->WARFlags.skipRedundantLt = true;
|
||||
}
|
||||
|
||||
if (warFlag & DP_MONITOR_CAPABILITY_DP_SKIP_CABLE_BW_CHECK)
|
||||
{
|
||||
this->WARFlags.skipCableBWCheck = true;
|
||||
this->WARData.maxLaneAtHighRate = pDenylistData->dpSkipCheckLink.maxLaneAtHighRate;
|
||||
this->WARData.maxLaneAtLowRate = pDenylistData->dpSkipCheckLink.maxLaneAtLowRate;
|
||||
}
|
||||
|
||||
if (warFlag & DP_MONITOR_CAPABILITY_DP_WRITE_0x600_BEFORE_LT)
|
||||
{
|
||||
// all HP monitors need to be powered up before link training
|
||||
this->WARFlags.powerOnBeforeLt = true;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> HP monitors need to be powered up before LT");
|
||||
}
|
||||
|
||||
if (warFlag & DP_MONITOR_CAPABILITY_DP_OVERRIDE_OPTIMAL_LINK_CONFIG)
|
||||
{
|
||||
//
|
||||
// Instead of calculating the optimum link config
|
||||
// based on timing, bpc etc. just used a default
|
||||
// fixed link config for the monitor for all modes
|
||||
//
|
||||
this->WARFlags.overrideOptimalLinkCfg = true;
|
||||
// Force the fix max LT
|
||||
this->WARFlags.forceMaxLinkConfig = true;
|
||||
this->WARData.optimalLinkRate = pDenylistData->dpOverrideOptimalLinkConfig.linkRate;
|
||||
this->WARData.optimalLaneCount = pDenylistData->dpOverrideOptimalLinkConfig.laneCount;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Overriding optimal link config on Dell U2410.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> bug 632801");
|
||||
}
|
||||
|
||||
if (warFlag & DP_MONITOR_CAPABILITY_DP_OVERRIDE_MAX_LANE_COUNT)
|
||||
{
|
||||
//
|
||||
// Some monitors claim more lanes than they actually support.
|
||||
// This particular Lenovo monitos has just 2 lanes, but its DPCD says 4.
|
||||
// This WAR is to override the max lane count read from DPCD.
|
||||
//
|
||||
this->WARFlags.overrideMaxLaneCount = true;
|
||||
this->WARData.maxLaneCount = pDenylistData->dpMaxLaneCountOverride;
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> Overriding max lane count on Lenovo L2440x.");
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> bug 687952");
|
||||
}
|
||||
}
|
||||
|
||||
if (this->WARFlags.dataForced)
|
||||
{
|
||||
DP_PRINTF(DP_NOTICE, "DP-WAR> EDID was overridden for some data. Patching CRC.");
|
||||
this->patchCrc();
|
||||
}
|
||||
}
|
||||
879
src/common/displayport/src/dp_watermark.cpp
Normal file
879
src/common/displayport/src/dp_watermark.cpp
Normal file
@@ -0,0 +1,879 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_watermark.cpp *
|
||||
* DP watermark IsModePossible calculations *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_watermark.h"
|
||||
#include "dp_linkconfig.h"
|
||||
#include "dp_printf.h"
|
||||
#include "displayport.h"
|
||||
|
||||
#define FEC_TOTAL_SYMBOLS_PER_BLK(lanes) ((NvU32)((lanes == 1) ? 512U : 256U))
|
||||
#define FEC_PARITY_SYMBOLS_PER_BLK(lanes) ((NvU32)((lanes == 1) ? 12U : 6U))
|
||||
//return max number of FEC parity symbols in x link clock cycles
|
||||
#define FEC_PARITY_SYM_SST(lanes, x) (DP_MIN((NvU32)(x) % FEC_TOTAL_SYMBOLS_PER_BLK(lanes), FEC_PARITY_SYMBOLS_PER_BLK(lanes)) + (NvU32)(x) / FEC_TOTAL_SYMBOLS_PER_BLK(lanes) * FEC_PARITY_SYMBOLS_PER_BLK(lanes) + FEC_PARITY_SYMBOLS_PER_BLK(lanes) + 1U)
|
||||
#define FEC_PARITY_SYM_MST(lanes, x) (DP_MIN((NvU32)(x) % FEC_TOTAL_SYMBOLS_PER_BLK(lanes), FEC_PARITY_SYMBOLS_PER_BLK(lanes)) + (NvU32)(x) / FEC_TOTAL_SYMBOLS_PER_BLK(lanes) * FEC_PARITY_SYMBOLS_PER_BLK(lanes) + 1U)
|
||||
|
||||
|
||||
bool DisplayPort::isModePossibleMST
|
||||
(
|
||||
const LinkConfiguration & linkConfig,
|
||||
const ModesetInfo & modesetInfo,
|
||||
Watermark * dpInfo
|
||||
)
|
||||
{
|
||||
// For MST, use downspread 0.6%
|
||||
NvU64 linkFreq;
|
||||
linkFreq = LINK_RATE_TO_DATA_RATE_8B_10B(linkConfig.peakRate) * 994 / 1000;
|
||||
|
||||
// This function is for multistream only!
|
||||
DP_ASSERT(linkConfig.multistream);
|
||||
|
||||
if(!modesetInfo.pixelClockHz || !modesetInfo.depth)
|
||||
{
|
||||
DP_ASSERT(0 && "INVALID PIXEL CLOCK and DEPTH sent by the client ");
|
||||
return false;
|
||||
}
|
||||
|
||||
// depth is multiplied by 16 in case of DSC enable
|
||||
unsigned DSC_FACTOR = modesetInfo.bEnableDsc ? 16 : 1;
|
||||
|
||||
// Extra bits that we need to send
|
||||
//(hActiveDiv4Remainder > 0 ? (4- hActiveDiv4Remainder) : 0) -->
|
||||
// Number of extra pixels that we need to insert due to mapping pixels
|
||||
// to the DP lanes. (4 lanes for MS)
|
||||
//
|
||||
// 160 --> Extra bits that we need to send during horizontal blanking
|
||||
// (BS+VBID+MVID+MAUD+BE) => 5*8*num_lanes
|
||||
//
|
||||
// 6 * 4 --> Pixel padding worst case
|
||||
//
|
||||
NvU32 minHBlank = ( ((modesetInfo.surfaceWidth % 4) > 0) ? ((4-(modesetInfo.surfaceWidth % 4)) * modesetInfo.depth)/ DSC_FACTOR : 0 ) + (160 + 6 * 4);
|
||||
|
||||
// Rounding to nearest multiple of 32 since we always send 32 bits in one time slice
|
||||
minHBlank = minHBlank + (32 - minHBlank % 32);
|
||||
|
||||
// bpp - 1 --> Rounding
|
||||
minHBlank = ((minHBlank * DSC_FACTOR) + modesetInfo.depth - (1 * DSC_FACTOR))/modesetInfo.depth;
|
||||
|
||||
if (minHBlank > modesetInfo.rasterWidth - modesetInfo.surfaceWidth)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Blanking Width is smaller than minimum permissible value.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bug 702290 - Active Width should be greater than 60
|
||||
if (modesetInfo.surfaceWidth <= 60)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Minimum Horizontal Active Width <= 60 not supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
NvS32 vblank_symbols;
|
||||
NvS32 hblank_symbols = (NvS32)(((NvU64)(modesetInfo.rasterWidth - modesetInfo.surfaceWidth - minHBlank) * linkFreq) / modesetInfo.pixelClockHz);
|
||||
|
||||
//reduce HBlank Symbols to account for secondary data packet
|
||||
hblank_symbols -= 1; //Stuffer latency to send BS
|
||||
hblank_symbols -= 3; //SPKT latency to send data to stuffer
|
||||
|
||||
hblank_symbols -= linkConfig.lanes == 1 ? 9 : linkConfig.lanes == 2 ? 6 : 3;
|
||||
|
||||
dpInfo->hBlankSym = (hblank_symbols < 0) ? 0 : hblank_symbols;
|
||||
|
||||
|
||||
//
|
||||
// Audio IMP calculations
|
||||
// Perform the related audio calculation to determine the number of extra symbols needed.
|
||||
//
|
||||
NvU32 twoChannelAudio_symbols = 0;
|
||||
|
||||
if (modesetInfo.twoChannelAudioHz != 0)
|
||||
{
|
||||
// 1-2 channel case
|
||||
NvU32 samples = (NvU32)divide_ceil(modesetInfo.twoChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz);
|
||||
|
||||
// Round to the next even sample to account for stuffing (2 ch, 4 lanes)
|
||||
samples = samples + (2 - samples % 2);
|
||||
|
||||
// Convert sample count to symbols
|
||||
twoChannelAudio_symbols = 10 * samples + 16;
|
||||
}
|
||||
|
||||
NvU32 eightChannelAudio_symbols = 0;
|
||||
if (modesetInfo.eightChannelAudioHz != 0)
|
||||
{
|
||||
// 3-8 channel case
|
||||
NvU32 samples = (NvU32)divide_ceil(modesetInfo.eightChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz);
|
||||
|
||||
// Convert sample count to symbols
|
||||
eightChannelAudio_symbols = 40 * samples + 16;
|
||||
}
|
||||
|
||||
if (dpInfo->hBlankSym < DP_MAX(twoChannelAudio_symbols, eightChannelAudio_symbols))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Refer to dev_disp.ref for more information.
|
||||
// # symbols/vblank = ((SetRasterBlankEnd.X + SetRasterSize.Width - SetRasterBlankStart.X - 40) * link_clk / pclk) - Y - 1;
|
||||
// where Y = (# lanes == 4) 12 : (# lanes == 2) ? 21 : 39
|
||||
if (modesetInfo.surfaceWidth < 40)
|
||||
{
|
||||
vblank_symbols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vblank_symbols = (NvS32)(((NvU64)(modesetInfo.surfaceWidth - 40) * linkFreq) / modesetInfo.pixelClockHz) - 1;
|
||||
|
||||
vblank_symbols -= linkConfig.lanes == 1 ? 39 : linkConfig.lanes == 2 ? 21 : 12;
|
||||
}
|
||||
|
||||
dpInfo->vBlankSym = (vblank_symbols < 0) ? 0 : vblank_symbols;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DisplayPort::isModePossibleSST
|
||||
(
|
||||
const LinkConfiguration & linkConfig,
|
||||
const ModesetInfo & modesetInfo,
|
||||
Watermark * dpInfo,
|
||||
bool bUseIncreasedWatermarkLimits
|
||||
)
|
||||
{
|
||||
NvU64 laneDataRate;
|
||||
laneDataRate = linkConfig.convertMinRateToDataRate();
|
||||
|
||||
|
||||
// This function is for single stream only!
|
||||
DP_ASSERT(!linkConfig.multistream);
|
||||
|
||||
unsigned watermarkAdjust = DP_CONFIG_WATERMARK_ADJUST;
|
||||
unsigned watermarkMinimum = DP_CONFIG_WATERMARK_LIMIT;
|
||||
// depth is multiplied by 16 in case of DSC enable
|
||||
unsigned DSC_FACTOR = modesetInfo.bEnableDsc ? 16 : 1;
|
||||
|
||||
if(bUseIncreasedWatermarkLimits)
|
||||
{
|
||||
watermarkAdjust = DP_CONFIG_INCREASED_WATERMARK_ADJUST;
|
||||
watermarkMinimum = DP_CONFIG_INCREASED_WATERMARK_LIMIT;
|
||||
}
|
||||
|
||||
if(!modesetInfo.pixelClockHz || !modesetInfo.depth)
|
||||
{
|
||||
DP_ASSERT(0 && "INVALID PIXEL CLOCK or DEPTH sent by the client ");
|
||||
return false;
|
||||
}
|
||||
// number of link clocks per line.
|
||||
int vblank_symbols = 0;
|
||||
NvU64 PrecisionFactor, ratioF, watermarkF;
|
||||
|
||||
NvU32 numLanesPerLink = linkConfig.lanes;
|
||||
|
||||
DP_ASSERT(!linkConfig.multistream && "MST!");
|
||||
|
||||
// Check if we have a valid laneCount as currently we support only up to 4-lanes
|
||||
if (!IS_VALID_LANECOUNT(linkConfig.lanes))
|
||||
{
|
||||
//
|
||||
// Print debug message and Assert. All calculations assume a max of 8 lanes
|
||||
// & any increase in lanes should cause these calculation to be updated
|
||||
//
|
||||
DP_PRINTF(DP_ERROR, "ERROR: LaneCount - %d is not supported for waterMark calculations.", linkConfig.lanes);
|
||||
DP_PRINTF(DP_ERROR, "Current support is only up to 4-Lanes & any change/increase in supported lanes "
|
||||
"should be reflected in waterMark calculations algorithm. "
|
||||
"Ex: See calc for minHBlank variable below");
|
||||
|
||||
DP_ASSERT(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((modesetInfo.pixelClockHz * modesetInfo.depth) >= (8 * laneDataRate * linkConfig.lanes * DSC_FACTOR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// For DSC, if (pclk * bpp) < (1/64 * orclk * 8 * lanes) then some TU may end up with
|
||||
// 0 active symbols. This may cause HW hang. Bug 200379426
|
||||
//
|
||||
if ((modesetInfo.bEnableDsc) &&
|
||||
((modesetInfo.pixelClockHz * modesetInfo.depth) < ((8 * laneDataRate * linkConfig.lanes * DSC_FACTOR) / 64)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Perform the SST calculation.
|
||||
// For auto mode the watermark calculation does not need to track accumulated error the
|
||||
// formulas for manual mode will not work. So below calculation was extracted from the DTB.
|
||||
//
|
||||
dpInfo->tuSize = 64;
|
||||
PrecisionFactor = 100000;
|
||||
ratioF = ((NvU64)modesetInfo.pixelClockHz * modesetInfo.depth * PrecisionFactor) / DSC_FACTOR;
|
||||
|
||||
ratioF /= 8 * (NvU64) laneDataRate * linkConfig.lanes;
|
||||
|
||||
if (PrecisionFactor < ratioF) // Assert if we will end up with a negative number in below
|
||||
return false;
|
||||
|
||||
watermarkF = ratioF * dpInfo->tuSize * (PrecisionFactor - ratioF) / PrecisionFactor;
|
||||
dpInfo->waterMark = (unsigned)(watermarkAdjust + ((2 * (modesetInfo.depth * PrecisionFactor / (8 * numLanesPerLink * DSC_FACTOR)) + watermarkF) / PrecisionFactor));
|
||||
|
||||
// Bounds check the watermark
|
||||
NvU32 numSymbolsPerLine = (modesetInfo.surfaceWidth * modesetInfo.depth) / (8 * linkConfig.lanes * DSC_FACTOR);
|
||||
|
||||
if (dpInfo->waterMark > 39 || dpInfo->waterMark > numSymbolsPerLine)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: watermark should not be greater than 39.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clamp the low side
|
||||
if (dpInfo->waterMark < watermarkMinimum)
|
||||
dpInfo->waterMark = watermarkMinimum;
|
||||
|
||||
//Bits to send BS/BE/Extra symbols due to pixel padding
|
||||
//Also accounts for enhanced framing.
|
||||
NvU32 BlankingBits = 3*8*numLanesPerLink + (linkConfig.enhancedFraming ? 3*8*numLanesPerLink : 0);
|
||||
|
||||
//VBID/MVID/MAUD sent 4 times all the time
|
||||
BlankingBits += 3*8*4;
|
||||
|
||||
NvU32 surfaceWidthPerLink = modesetInfo.surfaceWidth;
|
||||
|
||||
//Extra bits sent due to pixel steering
|
||||
NvU32 PixelSteeringBits = (surfaceWidthPerLink % numLanesPerLink) ? (((numLanesPerLink - surfaceWidthPerLink % numLanesPerLink) * modesetInfo.depth) / DSC_FACTOR) : 0;
|
||||
|
||||
BlankingBits += PixelSteeringBits;
|
||||
NvU64 NumBlankingLinkClocks = (NvU64)BlankingBits * PrecisionFactor / (8 * numLanesPerLink);
|
||||
NvU32 MinHBlank = (NvU32)(NumBlankingLinkClocks * modesetInfo.pixelClockHz/ laneDataRate / PrecisionFactor);
|
||||
MinHBlank += 12;
|
||||
|
||||
if (MinHBlank > modesetInfo.rasterWidth - modesetInfo.surfaceWidth)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Blanking Width is smaller than minimum permissible value.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bug 702290 - Active Width should be greater than 60
|
||||
if (modesetInfo.surfaceWidth <= 60)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Minimum Horizontal Active Width <= 60 not supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
NvS32 hblank_symbols = (NvS32)(((NvU64)(modesetInfo.rasterWidth - modesetInfo.surfaceWidth - MinHBlank) * laneDataRate) / modesetInfo.pixelClockHz);
|
||||
|
||||
//reduce HBlank Symbols to account for secondary data packet
|
||||
hblank_symbols -= 1; //Stuffer latency to send BS
|
||||
hblank_symbols -= 3; //SPKT latency to send data to stuffer
|
||||
|
||||
hblank_symbols -= numLanesPerLink == 1 ? 9 : numLanesPerLink == 2 ? 6 : 3;
|
||||
|
||||
dpInfo->hBlankSym = (hblank_symbols < 0) ? 0 : hblank_symbols;
|
||||
|
||||
//
|
||||
// Audio IMP calculations
|
||||
//
|
||||
|
||||
// From dev_disp.ref:
|
||||
|
||||
// The packet generation logic needs to know the length of the hblank period. If there is no room
|
||||
// in the current hblank for a new packet, it will be delayed until the next blanking period. This
|
||||
// field should be programmed during the second Supervisor interrupt based on the new raster
|
||||
// dimensions.
|
||||
|
||||
// ...
|
||||
|
||||
// --------------------------------------
|
||||
// The following formulas can be used to calculate the maximum audio sampling rate that can
|
||||
// be supported by DisplayPort given the current raster dimensions. DisplayPort has much more
|
||||
// bandwidth during blanking periods than HDMI has, so hblank size is less of an issue.
|
||||
|
||||
// ...
|
||||
|
||||
// Size of a packet for 2ch audio = 20 symbols (up to 2 samples)
|
||||
// Size of a packet for 8ch audio = 40 symbols
|
||||
// Size of an audio packet header plus control symbols = 2*#lanes + 8 symbols (assuming < 32 samples per line)
|
||||
// number of packets/hblank for 2ch audio = Floor ((number of free symbols/hblank - (2*#lanes + 8) / 20)
|
||||
// number of packets/hblank for 8ch audio = Floor ((number of free symbols/hblank - (2*#lanes + 8) / 40)
|
||||
|
||||
// Maximum audio sample rate possible:
|
||||
// number of audio samples/line = SetRasterSize.Width * audio_fs / pclk
|
||||
// number of audio packets needed for 2ch audio = Ceiling(SetRasterSize.Width * audio_fs / (pclk*2))
|
||||
// number of audio packets needed for 3-8ch audio = SetRasterSize.Width * audio_fs / pclk
|
||||
|
||||
// If number of audio packets needed > number of packets/hblank, then you cannot support that audio frequency
|
||||
|
||||
// Note that the hBlankSym calculated is per lane. So the number of symbols available for audio is
|
||||
// (number of lanes * hBlankSym).
|
||||
// The calculation of audio packets per Hblank needs to account for the following -
|
||||
// 2 symbols for SS and SE; 8 symbols for header; and additional 2 symbols to account for actual values used by HW.
|
||||
// --------------------------------------
|
||||
|
||||
if (modesetInfo.twoChannelAudioHz != 0)
|
||||
{
|
||||
if ((dpInfo->hBlankSym * numLanesPerLink) < (2 * numLanesPerLink + 8))
|
||||
{
|
||||
// There aren't enough symbols/hblank available.
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU32 twoChannelAudioPacketsPerHBlank = (NvU32)divide_floor(((dpInfo->hBlankSym * numLanesPerLink) - (2 * numLanesPerLink) - 8 - (2 * numLanesPerLink)), 20);
|
||||
|
||||
NvU32 twoChannelAudioPackets = (NvU32)divide_ceil(modesetInfo.twoChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz * 2);
|
||||
|
||||
if (twoChannelAudioPackets > twoChannelAudioPacketsPerHBlank)
|
||||
{
|
||||
// There aren't enough packets/hblank available.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (modesetInfo.eightChannelAudioHz != 0)
|
||||
{
|
||||
if ((dpInfo->hBlankSym * numLanesPerLink) < (2 * numLanesPerLink + 8))
|
||||
{
|
||||
// There aren't enough symbols/hblank available.
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU32 eightChannelAudioPacketsPerHBlank = (NvU32)divide_floor(((dpInfo->hBlankSym * numLanesPerLink) - (2 * numLanesPerLink) - 8 - (2 * numLanesPerLink)), 40);
|
||||
|
||||
NvU32 eightChannelAudioPackets = (NvU32)divide_ceil(modesetInfo.eightChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz);
|
||||
|
||||
if (eightChannelAudioPackets > eightChannelAudioPacketsPerHBlank)
|
||||
{
|
||||
// There aren't enough packets/hblank available.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Refer to dev_disp.ref for more information.
|
||||
// # symbols/vblank = ((SetRasterBlankEnd.X + SetRasterSize.Width - SetRasterBlankStart.X - 40) * link_clk / pclk) - Y - 1;
|
||||
// where Y = (# lanes == 4) 12 : (# lanes == 2) ? 21 : 39
|
||||
if (modesetInfo.surfaceWidth < 40)
|
||||
{
|
||||
vblank_symbols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vblank_symbols = (NvS32)(((NvU64)(modesetInfo.surfaceWidth - 40) * laneDataRate) / modesetInfo.pixelClockHz) - 1;
|
||||
|
||||
vblank_symbols -= numLanesPerLink == 1 ? 39 : numLanesPerLink == 2 ? 21 : 12;
|
||||
}
|
||||
|
||||
dpInfo->vBlankSym = (vblank_symbols < 0) ? 0 : vblank_symbols;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DisplayPort::isModePossibleSSTWithFEC
|
||||
(
|
||||
const LinkConfiguration & linkConfig,
|
||||
const ModesetInfo & modesetInfo,
|
||||
Watermark * dpInfo,
|
||||
bool bUseIncreasedWatermarkLimits
|
||||
)
|
||||
{
|
||||
//
|
||||
// This function is for single stream only!
|
||||
// Refer to Bug 200406501 and 200401850 for algorithm
|
||||
//
|
||||
DP_ASSERT(!linkConfig.multistream);
|
||||
|
||||
unsigned watermarkAdjust = DP_CONFIG_WATERMARK_ADJUST;
|
||||
unsigned watermarkMinimum = DP_CONFIG_WATERMARK_LIMIT;
|
||||
// depth is multiplied by 16 in case of DSC enable
|
||||
unsigned DSC_FACTOR = modesetInfo.bEnableDsc ? 16 : 1;
|
||||
|
||||
if(bUseIncreasedWatermarkLimits)
|
||||
{
|
||||
watermarkAdjust = DP_CONFIG_INCREASED_WATERMARK_ADJUST;
|
||||
watermarkMinimum = DP_CONFIG_INCREASED_WATERMARK_LIMIT;
|
||||
}
|
||||
|
||||
NvU64 laneDataRate = linkConfig.convertMinRateToDataRate();
|
||||
|
||||
if(!modesetInfo.pixelClockHz || !modesetInfo.depth)
|
||||
{
|
||||
DP_ASSERT(0 && "INVALID PIXEL CLOCK or DEPTH sent by the client ");
|
||||
return false;
|
||||
}
|
||||
// number of link clocks per line.
|
||||
int vblank_symbols = 0;
|
||||
NvU64 PrecisionFactor, ratioF, watermarkF;
|
||||
NvS32 w0, s;
|
||||
|
||||
NvU32 numLanesPerLink = linkConfig.lanes;
|
||||
|
||||
DP_ASSERT(!linkConfig.multistream && "MST!");
|
||||
|
||||
// Check if we have a valid laneCount as currently we support only up to 4-lanes
|
||||
if (!IS_VALID_LANECOUNT(linkConfig.lanes))
|
||||
{
|
||||
//
|
||||
// Print debug message and Assert. All calculations assume a max of 8 lanes
|
||||
// & any increase in lanes should cause these calculation to be updated
|
||||
//
|
||||
DP_PRINTF(DP_ERROR, "ERROR: LaneCount - %d is not supported for waterMark calculations.", linkConfig.lanes);
|
||||
DP_PRINTF(DP_ERROR, "Current support is only up to 4-Lanes & any change/increase in supported lanes "
|
||||
"should be reflected in waterMark calculations algorithm. "
|
||||
"Ex: See calc for minHBlank variable below");
|
||||
|
||||
DP_ASSERT(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((modesetInfo.pixelClockHz * modesetInfo.depth) >= (8 * laneDataRate * linkConfig.lanes * DSC_FACTOR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// For DSC, if (pclk * bpp) < (1/64 * orclk * 8 * lanes) then some TU may end up with
|
||||
// 0 active symbols. This may cause HW hang. Bug 200379426
|
||||
//
|
||||
if ((modesetInfo.bEnableDsc) &&
|
||||
((modesetInfo.pixelClockHz * modesetInfo.depth) < ((8 * laneDataRate * linkConfig.lanes * DSC_FACTOR) / 64)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Perform the SST calculation.
|
||||
// For auto mode the watermark calculation does not need to track accumulated error the
|
||||
// formulas for manual mode will not work. So below calculation was extracted from the DTB.
|
||||
//
|
||||
dpInfo->tuSize = 64;
|
||||
PrecisionFactor = 100000;
|
||||
ratioF = ((NvU64)modesetInfo.pixelClockHz * modesetInfo.depth * PrecisionFactor) / DSC_FACTOR;
|
||||
|
||||
ratioF /= 8 * (NvU64)laneDataRate * linkConfig.lanes;
|
||||
|
||||
if (PrecisionFactor < ratioF) // Assert if we will end up with a negative number in below
|
||||
return false;
|
||||
|
||||
watermarkF = (ratioF * dpInfo->tuSize * (PrecisionFactor - ratioF)) / PrecisionFactor;
|
||||
|
||||
w0 = (8 / linkConfig.lanes);
|
||||
if (linkConfig.bEnableFEC)
|
||||
{
|
||||
s = (linkConfig.lanes == 1) ? 15 : 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
s = 3 - w0;
|
||||
}
|
||||
|
||||
dpInfo->waterMark = (unsigned)(watermarkAdjust + ((3 * (modesetInfo.depth * PrecisionFactor / (8 * numLanesPerLink * DSC_FACTOR)) + watermarkF) / PrecisionFactor) + w0 + 3);
|
||||
|
||||
s = ((NvS32)ratioF * s);
|
||||
|
||||
dpInfo->waterMark = (unsigned)((NvS32)dpInfo->waterMark + (s / (NvS32)PrecisionFactor));
|
||||
|
||||
//
|
||||
// Bounds check the watermark
|
||||
//
|
||||
NvU32 numSymbolsPerLine = (modesetInfo.surfaceWidth * modesetInfo.depth) / (8 * linkConfig.lanes * DSC_FACTOR);
|
||||
|
||||
if (dpInfo->waterMark > numSymbolsPerLine)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: watermark = %d should not be greater than numSymbolsPerLine = %d.", dpInfo->waterMark, numSymbolsPerLine);
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Clamp the low side
|
||||
//
|
||||
if (dpInfo->waterMark < watermarkMinimum)
|
||||
dpInfo->waterMark = watermarkMinimum;
|
||||
|
||||
unsigned MinHBlank = 0;
|
||||
unsigned MinHBlankFEC = 0;
|
||||
NvU32 BlankingBits = 0;
|
||||
NvU32 BlankingSymbolsPerLane = 0;
|
||||
|
||||
BlankingBits = (3U * 8U * 4U) + (2U * 8U * numLanesPerLink);
|
||||
|
||||
if (modesetInfo.bEnableDsc)
|
||||
{
|
||||
NvU32 sliceCount, sliceWidth, chunkSize;
|
||||
|
||||
sliceCount = (modesetInfo.mode == DSC_DUAL) ? 8U : 4U;
|
||||
sliceWidth = (NvU32)divide_ceil(modesetInfo.surfaceWidth, sliceCount);
|
||||
chunkSize = (NvU32)divide_ceil(modesetInfo.depth * sliceWidth, 8U * DSC_FACTOR);
|
||||
|
||||
if(((NvU64)(chunkSize + 1U) * sliceCount * modesetInfo.pixelClockHz) < (NvU64)(laneDataRate * numLanesPerLink * modesetInfo.surfaceWidth))
|
||||
{
|
||||
// BW is plenty, this is common case.
|
||||
//EOC symbols, when BW enough, only last EOC needs to be considered.
|
||||
BlankingBits += 8U * numLanesPerLink; //+BlankingBits_DSC_EOC
|
||||
BlankingBits += (chunkSize * 8U) - (sliceWidth * modesetInfo.depth / DSC_FACTOR); //+BlankingBits_DSC_bytePadding, only need to consider last slice
|
||||
BlankingBits += (NvU32)(sliceCount * 8U * (divide_ceil(chunkSize, numLanesPerLink) * numLanesPerLink - chunkSize)); //+BlankingBits_DSC_lane_padding
|
||||
}
|
||||
else
|
||||
{ // no extra room in link BW
|
||||
//EOC symbols, EOC will be accumulated until hblank period.
|
||||
BlankingBits += (sliceCount * 8U * numLanesPerLink); //+BlankingBits_EOC
|
||||
//padding, can also use simplified but pessimistic version : BlankingBits += SliceNum * (logic_lanes *8-1);
|
||||
BlankingBits += (NvU32)(sliceCount * ((divide_ceil(chunkSize, numLanesPerLink) * numLanesPerLink * 8U) - (NvU32)(sliceWidth * modesetInfo.depth / DSC_FACTOR))); //+BlankingBits_DSC_padding
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NvU32 surfaceWidthPerLink = modesetInfo.surfaceWidth;
|
||||
NvU32 surfaceWidthPerLane = (NvU32)divide_ceil(surfaceWidthPerLink, numLanesPerLink);
|
||||
|
||||
// Padding
|
||||
BlankingBits += (NvU32)divide_ceil(surfaceWidthPerLane * modesetInfo.depth, 8U) * 8U * numLanesPerLink - (NvU32)(surfaceWidthPerLink * modesetInfo.depth); //+BlankingBits_nonDSC_padding
|
||||
}
|
||||
|
||||
BlankingSymbolsPerLane = (NvU32)divide_ceil(BlankingBits , (8U * numLanesPerLink)); //in symbols per lane
|
||||
BlankingSymbolsPerLane += (linkConfig.enhancedFraming ? 3U : 0U);
|
||||
|
||||
if (linkConfig.bEnableFEC)
|
||||
{
|
||||
//
|
||||
// In worst case, FEC symbols fall into a narrow Hblank period,
|
||||
// we have to consider this in HBlank checker, see bug 200496977
|
||||
// but we don't have to consider this in the calculation of hblank_symbols
|
||||
//
|
||||
|
||||
MinHBlankFEC = FEC_PARITY_SYM_SST(numLanesPerLink, BlankingSymbolsPerLane); //in symbols
|
||||
BlankingSymbolsPerLane += MinHBlankFEC;
|
||||
}
|
||||
|
||||
// BlankingSymbolsPerLane is the MinHBlank in link clock cycles,
|
||||
MinHBlank = (unsigned)(divide_ceil(BlankingSymbolsPerLane * modesetInfo.pixelClockHz,
|
||||
LINK_RATE_TO_DATA_RATE_8B_10B(linkConfig.peakRate))); //in pclk cycles
|
||||
MinHBlank += 3U; //add some margin
|
||||
|
||||
NvU32 HBlank = (modesetInfo.rasterWidth - modesetInfo.surfaceWidth);
|
||||
|
||||
if (MinHBlank > HBlank)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Blanking Width is smaller than minimum permissible value.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bug 702290 - Active Width should be greater than 60
|
||||
if (modesetInfo.surfaceWidth <= 60)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Minimum Horizontal Active Width <= 60 not supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU32 total_hblank_symbols = (NvS32)divide_ceil((HBlank * LINK_RATE_TO_DATA_RATE_8B_10B(linkConfig.peakRate)), modesetInfo.pixelClockHz);
|
||||
NvS32 hblank_symbols = (NvS32)(((NvU64)(HBlank - MinHBlank) * LINK_RATE_TO_DATA_RATE_8B_10B(linkConfig.peakRate)) / modesetInfo.pixelClockHz);
|
||||
|
||||
if (linkConfig.bEnableFEC)
|
||||
{
|
||||
hblank_symbols -= (FEC_PARITY_SYM_SST(numLanesPerLink, total_hblank_symbols));
|
||||
hblank_symbols += MinHBlankFEC;
|
||||
}
|
||||
|
||||
//reduce HBlank Symbols to account for secondary data packet
|
||||
hblank_symbols -= 1; //Stuffer latency to send BS
|
||||
hblank_symbols -= 3; //SPKT latency to send data to stuffer
|
||||
hblank_symbols -= 3; //add some margin
|
||||
|
||||
dpInfo->hBlankSym = (hblank_symbols < 0) ? 0 : hblank_symbols;
|
||||
|
||||
//
|
||||
// Audio IMP calculations
|
||||
//
|
||||
|
||||
// From dev_disp.ref:
|
||||
|
||||
// The packet generation logic needs to know the length of the hblank period. If there is no room
|
||||
// in the current hblank for a new packet, it will be delayed until the next blanking period. This
|
||||
// field should be programmed during the second Supervisor interrupt based on the new raster
|
||||
// dimensions.
|
||||
|
||||
// ...
|
||||
|
||||
// --------------------------------------
|
||||
// The following formulas can be used to calculate the maximum audio sampling rate that can
|
||||
// be supported by DisplayPort given the current raster dimensions. DisplayPort has much more
|
||||
// bandwidth during blanking periods than HDMI has, so hblank size is less of an issue.
|
||||
|
||||
// ...
|
||||
|
||||
// Size of a packet for 2ch audio = 20 symbols (up to 2 samples)
|
||||
// Size of a packet for 8ch audio = 40 symbols
|
||||
// Size of an audio packet header plus control symbols = 2*#lanes + 8 symbols (assuming < 32 samples per line)
|
||||
// number of packets/hblank for 2ch audio = Floor ((number of free symbols/hblank - (2*#lanes + 8) / 20)
|
||||
// number of packets/hblank for 8ch audio = Floor ((number of free symbols/hblank - (2*#lanes + 8) / 40)
|
||||
|
||||
// Maximum audio sample rate possible:
|
||||
// number of audio samples/line = SetRasterSize.Width * audio_fs / pclk
|
||||
// number of audio packets needed for 2ch audio = Ceiling(SetRasterSize.Width * audio_fs / (pclk*2))
|
||||
// number of audio packets needed for 3-8ch audio = SetRasterSize.Width * audio_fs / pclk
|
||||
|
||||
// If number of audio packets needed > number of packets/hblank, then you cannot support that audio frequency
|
||||
|
||||
// Note that the hBlankSym calculated is per lane. So the number of symbols available for audio is
|
||||
// (number of lanes * hBlankSym).
|
||||
// The calculation of audio packets per Hblank needs to account for the following -
|
||||
// 2 symbols for SS and SE; 8 symbols for header; and additional 2 symbols to account for actual values used by HW.
|
||||
// --------------------------------------
|
||||
|
||||
if (modesetInfo.twoChannelAudioHz != 0)
|
||||
{
|
||||
if ((dpInfo->hBlankSym * numLanesPerLink) < ((2 * numLanesPerLink) + 8))
|
||||
{
|
||||
// There aren't enough symbols/hblank available.
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU32 twoChannelAudioPacketsPerHBlank = (NvU32)divide_floor(((dpInfo->hBlankSym * numLanesPerLink) - (2 * numLanesPerLink) - 8 - (2 * numLanesPerLink)), 20);
|
||||
|
||||
NvU32 twoChannelAudioPackets = (NvU32)divide_ceil(modesetInfo.twoChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz * 2);
|
||||
|
||||
if (twoChannelAudioPackets > twoChannelAudioPacketsPerHBlank)
|
||||
{
|
||||
// There aren't enough packets/hblank available.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (modesetInfo.eightChannelAudioHz != 0)
|
||||
{
|
||||
if ((dpInfo->hBlankSym * numLanesPerLink) < (2 * numLanesPerLink + 8))
|
||||
{
|
||||
// There aren't enough symbols/hblank available.
|
||||
return false;
|
||||
}
|
||||
|
||||
NvU32 eightChannelAudioPacketsPerHBlank = (NvU32)divide_floor(((dpInfo->hBlankSym * numLanesPerLink) - (2 * numLanesPerLink) - 8 - (2 * numLanesPerLink)), 40);
|
||||
|
||||
NvU32 eightChannelAudioPackets = (NvU32)divide_ceil(modesetInfo.eightChannelAudioHz * modesetInfo.rasterWidth, modesetInfo.pixelClockHz);
|
||||
|
||||
if (eightChannelAudioPackets > eightChannelAudioPacketsPerHBlank)
|
||||
{
|
||||
// There aren't enough packets/hblank available.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Refer to dev_disp.ref for more information.
|
||||
// # symbols/vblank = ((SetRasterBlankEnd.X + SetRasterSize.Width - SetRasterBlankStart.X - 40) * link_clk / pclk) - Y - 1;
|
||||
// where Y = (# lanes == 4) 12 : (# lanes == 2) ? 21 : 39
|
||||
if (modesetInfo.surfaceWidth < 40)
|
||||
{
|
||||
vblank_symbols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
vblank_symbols = (NvS32)(((NvU64)(modesetInfo.surfaceWidth - 3) * LINK_RATE_TO_DATA_RATE_8B_10B(linkConfig.peakRate)) / modesetInfo.pixelClockHz);
|
||||
|
||||
//
|
||||
// The active region transmission is delayed because of lane fifo storage.
|
||||
// compare to the negedge of hblank, all the BE will be delayed by watermark/ratio cycles.
|
||||
// compare to the posedge of hblank(i.e. the time of sending out BS symbols in vblank period),
|
||||
// all the BS after active pixels will be delayed by maximum 1.5 TU cycles,
|
||||
// the delay of the BS will cause the 1st vblank line shorter than expected,
|
||||
// but it will squeeze hblank period first,
|
||||
// if hblank is short, the BS will be in hactive period and impact vblank_symbols.
|
||||
//
|
||||
|
||||
NvS32 squeezed_symbols = (dpInfo->tuSize * 3 / 2) - hblank_symbols;
|
||||
squeezed_symbols = DP_MAX(squeezed_symbols, 0);
|
||||
NvS32 msa_symbols = (36 / numLanesPerLink) + 3;
|
||||
|
||||
//
|
||||
// MSA can't be in the 1st vblank line, except v_front_porch=0
|
||||
// if we know v_front_porch != 0,
|
||||
// we can use MAX(squeezed_symbols, msa_symbols) instead of squeezed_symbols+msa_symbols
|
||||
//
|
||||
vblank_symbols -= (squeezed_symbols + msa_symbols);
|
||||
|
||||
if (linkConfig.bEnableFEC)
|
||||
{
|
||||
vblank_symbols -= FEC_PARITY_SYM_SST(numLanesPerLink, vblank_symbols);
|
||||
}
|
||||
vblank_symbols -= 3U; //add some margin
|
||||
}
|
||||
|
||||
dpInfo->vBlankSym = (vblank_symbols < 0) ? 0 : vblank_symbols;
|
||||
|
||||
if (modesetInfo.bEnableDsc)
|
||||
{
|
||||
//
|
||||
// For DSC enabled case, the vblank_symbols must be large enough to accommodate DSC PPS SDP, see bug 2760673
|
||||
// For 1 lane, it requires at least 170+13 symbols
|
||||
// For 2 lane, it requires at least 86+3 symbols
|
||||
// For 4 lane, it requires at least 44+3 symbols
|
||||
// normally, no need to check this, except in some small resolution test case.
|
||||
//
|
||||
if ((numLanesPerLink == 1U) && (dpInfo->vBlankSym < 183U))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((numLanesPerLink == 2U) && (dpInfo->vBlankSym < 89U))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((numLanesPerLink == 4U) && (dpInfo->vBlankSym <47U))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DisplayPort::isModePossibleMSTWithFEC
|
||||
(
|
||||
const LinkConfiguration & linkConfig,
|
||||
const ModesetInfo & modesetInfo,
|
||||
Watermark * dpInfo
|
||||
)
|
||||
{
|
||||
//
|
||||
// This function is for multistream only!
|
||||
// Refer to Bug 200406501 and 200401850 for algorithm
|
||||
//
|
||||
DP_ASSERT(linkConfig.multistream);
|
||||
|
||||
if (!modesetInfo.pixelClockHz || !modesetInfo.depth)
|
||||
{
|
||||
DP_ASSERT(0 && "INVALID PIXEL CLOCK and DEPTH sent by the client ");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (linkConfig.lanes == 0)
|
||||
{
|
||||
DP_ASSERT(0 && "No Active link / link train failed ");
|
||||
return false;
|
||||
}
|
||||
|
||||
// depth is multiplied by 16 in case of DSC enable
|
||||
unsigned DSC_FACTOR = modesetInfo.bEnableDsc ? 16 : 1;
|
||||
dpInfo->tuSize = 64;
|
||||
|
||||
NvU32 BlankingBits, BlankingSymbolsPerLane;
|
||||
NvU32 numLanesPerLink = 4U;
|
||||
NvU32 MinHBlank;
|
||||
|
||||
BlankingBits = (3U * 8U * 4U) + (2U * 8U * numLanesPerLink);
|
||||
|
||||
if(modesetInfo.bEnableDsc)
|
||||
{
|
||||
NvU32 sliceCount, sliceWidth, chunkSize;
|
||||
|
||||
sliceCount = (modesetInfo.mode == DSC_DUAL) ? 8U : 4U;
|
||||
sliceWidth = (NvU32)divide_ceil(modesetInfo.surfaceWidth, sliceCount);
|
||||
chunkSize = (NvU32)divide_ceil(modesetInfo.depth * sliceWidth, 8U * DSC_FACTOR);
|
||||
|
||||
//EOC symbols, EOC will be accumulated until hblank period.
|
||||
BlankingBits += (sliceCount * 8U * numLanesPerLink); //+BlankingBits_EOC
|
||||
//+BlankingBits_DSC_padding
|
||||
BlankingBits += (NvU32)(sliceCount * ((divide_ceil(chunkSize, numLanesPerLink) * numLanesPerLink * 8U) - (NvU32)(sliceWidth * modesetInfo.depth / DSC_FACTOR)));
|
||||
}
|
||||
else
|
||||
{
|
||||
NvU32 surfaceWidthPerLane = (NvU32)divide_ceil(modesetInfo.surfaceWidth, numLanesPerLink);
|
||||
|
||||
//Extra bits sent due to pixel steering
|
||||
BlankingBits = (NvU32)divide_ceil(surfaceWidthPerLane * modesetInfo.depth, 8U) * 8U * numLanesPerLink - (NvU32)(modesetInfo.surfaceWidth * modesetInfo.depth); //+BlankingBits_nonDSC_padding
|
||||
}
|
||||
|
||||
BlankingSymbolsPerLane = (NvU32)divide_ceil(BlankingBits, (8U * numLanesPerLink)); //in symbols per lane
|
||||
|
||||
MinHBlank = (NvU32)divide_ceil(BlankingSymbolsPerLane * 8U * numLanesPerLink * DSC_FACTOR, modesetInfo.depth);
|
||||
MinHBlank += 3U; //add some margin
|
||||
|
||||
NvU32 HBlank = (modesetInfo.rasterWidth - modesetInfo.surfaceWidth);
|
||||
|
||||
if (MinHBlank > HBlank)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Blanking Width is smaller than minimum permissible value.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bug 702290 - Active Width should be greater than 60
|
||||
if (modesetInfo.surfaceWidth <= 60)
|
||||
{
|
||||
DP_PRINTF(DP_ERROR, "ERROR: Minimum Horizontal Active Width <= 60 not supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// MST can do SDP splitting so all audio configuration are possible.
|
||||
dpInfo->hBlankSym = 0U;
|
||||
dpInfo->vBlankSym = 0U;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned DisplayPort::pbnForMode(const ModesetInfo & modesetInfo, bool bAccountSpread)
|
||||
{
|
||||
unsigned bpp_factor;
|
||||
NvU64 pbn_numerator, pbn_denominator;
|
||||
|
||||
if (modesetInfo.bEnableDsc)
|
||||
{
|
||||
if (modesetInfo.depth > 512U)
|
||||
{
|
||||
bpp_factor = 256U;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pre-Blackwell, depth will have bppx16
|
||||
bpp_factor = 16U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (modesetInfo.depth > 36U)
|
||||
{
|
||||
// Blackwell and later, depth will have effectiveBppx256
|
||||
bpp_factor = 256U;
|
||||
}
|
||||
else
|
||||
{
|
||||
bpp_factor = 1U;
|
||||
}
|
||||
}
|
||||
|
||||
pbn_numerator = modesetInfo.pixelClockHz * modesetInfo.depth * 64 / 8;
|
||||
pbn_denominator = 54000000ULL * bpp_factor;
|
||||
|
||||
if (bAccountSpread)
|
||||
{
|
||||
pbn_numerator *= 1006;
|
||||
pbn_denominator *= 1000;
|
||||
}
|
||||
|
||||
return (NvU32)(divide_ceil(pbn_numerator, pbn_denominator));
|
||||
}
|
||||
168
src/common/displayport/src/dptestutil/dp_testmessage.cpp
Normal file
168
src/common/displayport/src/dptestutil/dp_testmessage.cpp
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2010-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/******************************* DisplayPort *******************************\
|
||||
* *
|
||||
* Module: dp_testmessage.cpp *
|
||||
* Used for DP Test Utility *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
#include "dp_internal.h"
|
||||
#include "dp_auxdefs.h"
|
||||
#include "dp_messages.h"
|
||||
#include "dp_testmessage.h"
|
||||
#include "dp_connectorimpl.h"
|
||||
using namespace DisplayPort;
|
||||
|
||||
// the dp lib status must be set to DONE indicating there is no pending message
|
||||
void DPTestMessageCompletion::messageFailed(MessageManager::Message * from, NakData * data)
|
||||
{
|
||||
parent->testMessageStatus = DP_TESTMESSAGE_REQUEST_STATUS_DONE;
|
||||
|
||||
if (from->getMsgType() == NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS)
|
||||
{
|
||||
delete (QueryStreamEncryptionMessage *)from;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
DP_ASSERT(0 && "unknown msg type when msg failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DPTestMessageCompletion::messageCompleted(MessageManager::Message * from)
|
||||
{
|
||||
parent->testMessageStatus = DP_TESTMESSAGE_REQUEST_STATUS_DONE;
|
||||
|
||||
if (from->getMsgType() == NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS)
|
||||
{
|
||||
((QueryStreamEncryptionMessage *)from)->getReply(&parent->qsesReply);
|
||||
delete (QueryStreamEncryptionMessage *)from;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
DP_ASSERT(0 && "unknown msg type when msg complete");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MessageManager * TestMessage::getMessageManager()
|
||||
{
|
||||
return pMsgManager;
|
||||
}
|
||||
|
||||
//pBuffer should point to a DP_TESTMESSAGE_REQUEST_QSES_INPUT structure
|
||||
void TestMessage::sendTestMsgQSES(void *pBuffer)
|
||||
{
|
||||
//Generate the Pseudo Random number
|
||||
QSENonceGenerator qseNonceGenerator;
|
||||
|
||||
//for qses, send to the root branch
|
||||
Address address(0);
|
||||
CLIENTID clientId;
|
||||
QueryStreamEncryptionMessage *pQseMessage = new QueryStreamEncryptionMessage();
|
||||
|
||||
DP_TESTMESSAGE_REQUEST_QSES_INPUT *pQSES =
|
||||
(DP_TESTMESSAGE_REQUEST_QSES_INPUT *)pBuffer;
|
||||
|
||||
pQseMessage->set(address,
|
||||
pQSES->streamID,
|
||||
clientId.data,
|
||||
CP_IRQ_ON,
|
||||
STREAM_EVENT_MASK_ON,
|
||||
Force_Reauth,
|
||||
STREAM_BEHAVIOUR_MASK_ON);
|
||||
|
||||
pMsgManager->post(pQseMessage, &diagCompl);
|
||||
}
|
||||
|
||||
//
|
||||
// The function request that the request struct size should be check first to ensure the right structure is used and
|
||||
// no BSOD will happen.
|
||||
//
|
||||
// For each request type, the DP lib status for that type should be check in case of request conflict. At one time,
|
||||
// for each request type, only ONE instance could be processed
|
||||
//
|
||||
DP_TESTMESSAGE_STATUS TestMessage::sendDPTestMessage
|
||||
(
|
||||
void *pBuffer,
|
||||
NvU32 requestSize,
|
||||
NvU32 *pDpStatus
|
||||
)
|
||||
{
|
||||
DP_ASSERT(pBuffer);
|
||||
DP_TESTMESSAGE_REQUEST_TYPE type;
|
||||
|
||||
// the buffer must contain a requestType field at least
|
||||
if (requestSize < sizeof(DP_TESTMESSAGE_REQUEST_TYPE))
|
||||
return DP_TESTMESSAGE_STATUS_ERROR_INVALID_PARAM;
|
||||
|
||||
type = *(DP_TESTMESSAGE_REQUEST_TYPE *)pBuffer;
|
||||
|
||||
if (!isValidStruct(type, requestSize))
|
||||
return DP_TESTMESSAGE_STATUS_ERROR_INVALID_PARAM;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DP_TESTMESSAGE_REQUEST_TYPE_QSES:
|
||||
// new request, try send message
|
||||
if (*pDpStatus == DP_TESTMESSAGE_REQUEST_STATUS_NEWREQUEST)
|
||||
{
|
||||
//there is still processing request, new one not allow now
|
||||
if (testMessageStatus == DP_TESTMESSAGE_REQUEST_STATUS_PENDING)
|
||||
{
|
||||
*pDpStatus = DP_TESTMESSAGE_REQUEST_STATUS_ERROR;
|
||||
return DP_TESTMESSAGE_STATUS_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
sendTestMsgQSES(pBuffer);
|
||||
//need change the DP lib status accordingly
|
||||
*pDpStatus = DP_TESTMESSAGE_REQUEST_STATUS_PENDING;
|
||||
testMessageStatus = DP_TESTMESSAGE_REQUEST_STATUS_PENDING;
|
||||
}
|
||||
}
|
||||
//old request, check if request finished
|
||||
else if(*pDpStatus == DP_TESTMESSAGE_REQUEST_STATUS_PENDING)
|
||||
{
|
||||
//already finished, fill in the data
|
||||
if (testMessageStatus == DP_TESTMESSAGE_REQUEST_STATUS_DONE)
|
||||
{
|
||||
DP_TESTMESSAGE_REQUEST_QSES_INPUT *p =
|
||||
(DP_TESTMESSAGE_REQUEST_QSES_INPUT *)pBuffer;
|
||||
p->reply = *(DP_TESTMESSAGE_REQUEST_QSES_OUTPUT *)&qsesReply;
|
||||
*pDpStatus = DP_TESTMESSAGE_REQUEST_STATUS_DONE;
|
||||
}
|
||||
//otherwise, just return and ask the user try again
|
||||
}
|
||||
break;
|
||||
default:
|
||||
*pDpStatus = DP_TESTMESSAGE_REQUEST_STATUS_ERROR;
|
||||
return DP_TESTMESSAGE_STATUS_ERROR;
|
||||
}
|
||||
|
||||
return DP_TESTMESSAGE_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
771
src/common/inc/displayport/displayport.h
Normal file
771
src/common/inc/displayport/displayport.h
Normal file
@@ -0,0 +1,771 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DISPLAYPORT_H_
|
||||
#define _DISPLAYPORT_H_
|
||||
#include "nvcfg_sdk.h"
|
||||
|
||||
#include "nvmisc.h"
|
||||
#include "dpcd.h"
|
||||
#include "dpcd14.h"
|
||||
#include "dpcd20.h"
|
||||
|
||||
/**************** Resource Manager Defines and Structures ******************\
|
||||
* *
|
||||
* Module: DISPLAYPORT.H *
|
||||
* Defines DISPLAYPORT V1.2 *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
//
|
||||
// 4 Legacy Link Rates: RBR, HBR, HBR2, HBR3
|
||||
// 4 ILRs: 2.16G, 2.43G, 3.24G, 4.32G
|
||||
//
|
||||
#define NV_SUPPORTED_DP1X_LINK_RATES__SIZE 8
|
||||
|
||||
// Displayport interoperability with HDMI dongle i2c addr
|
||||
#define DP2HDMI_DONGLE_I2C_ADDR 0x80
|
||||
#define DP2HDMI_DONGLE_DDC_BUFFER_ID_LEN 16
|
||||
#define DP2HDMI_DONGLE_CAP_BUFFER_LEN 32
|
||||
|
||||
// For 8b/10b link rate to data rate, linkRate * 8/10 * 1/8 * 10M -> (linkRate * 1000000)
|
||||
// For 8b/10b data rate to link rate, dataRate * 10/8 * 8 * 1/10M -> (dataRate / 1000000)
|
||||
#define LINK_RATE_TO_DATA_RATE_8B_10B(linkRate) (linkRate * 1000000UL)
|
||||
#define DATA_RATE_8B_10B_TO_LINK_RATE(dataRate) (dataRate / 1000000UL)
|
||||
|
||||
// To calculate the effective link rate with channel encoding accounted
|
||||
#define OVERHEAD_8B_10B(linkRate) ((linkRate * 8) * 1/10)
|
||||
|
||||
// Convert data rate to link rate in bps
|
||||
#define DATA_RATE_8B_10B_TO_LINK_RATE_BPS(dataRate) (dataRate * 10)
|
||||
|
||||
// Convert data rate to link rate in bps
|
||||
#define LINK_RATE_BPS_TO_DATA_RATE_8B_10B(linkRate) (linkRate / 10)
|
||||
|
||||
// Offset to read the dongle identifier
|
||||
#define NV_DP2HDMI_DONGLE_IDENTIFIER (0x00000010)
|
||||
#define NV_DP2HDMI_DONGLE_IDENTIFIER_ADAPTER_REV 2:0
|
||||
#define NV_DP2HDMI_DONGLE_IDENTIFIER_ADAPTER_REV_TYPE2 (0x00000000)
|
||||
#define NV_DP2HDMI_DONGLE_IDENTIFIER_ADAPTER_ID 7:4
|
||||
#define NV_DP2HDMI_DONGLE_IDENTIFIER_ADAPTER_ID_TYPE2 (0x0000000A)
|
||||
|
||||
// Offset to read the dongle TMDS clock rate
|
||||
#define NV_DP2HDMI_DONGLE_TMDS_CLOCK_RATE (0x0000001D)
|
||||
|
||||
// HDMI dongle types
|
||||
#define DP2HDMI_DONGLE_TYPE_1 0x1
|
||||
#define DP2HDMI_DONGLE_TYPE_2 0x2
|
||||
|
||||
// HDMI dongle frequency limits
|
||||
#define DP2HDMI_DONGLE_TYPE_1_PCLK_LIMIT 165*1000*1000
|
||||
#define DP2HDMI_DONGLE_TYPE_2_PCLK_LIMIT 300*1000*1000
|
||||
|
||||
#define DPCD_VERSION_12 0x12
|
||||
#define DPCD_VERSION_13 0x13
|
||||
#define DPCD_VERSION_14 0x14
|
||||
|
||||
#define DP_LINKINDEX_0 0x0
|
||||
#define DP_LINKINDEX_1 0x1
|
||||
|
||||
// Two Head One OR
|
||||
#define NV_PRIMARY_HEAD_INDEX_0 0
|
||||
#define NV_SECONDARY_HEAD_INDEX_1 1
|
||||
#define NV_PRIMARY_HEAD_INDEX_2 2
|
||||
#define NV_SECONDARY_HEAD_INDEX_3 3
|
||||
|
||||
typedef enum
|
||||
{
|
||||
displayPort_Lane0 = 0,
|
||||
displayPort_Lane1 = 1,
|
||||
displayPort_Lane2 = 2,
|
||||
displayPort_Lane3 = 3,
|
||||
displayPort_Lane4 = 4,
|
||||
displayPort_Lane5 = 5,
|
||||
displayPort_Lane6 = 6,
|
||||
displayPort_Lane7 = 7,
|
||||
displayPort_LaneSupported
|
||||
} DP_LANE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
laneCount_0 = 0x0,
|
||||
laneCount_1 = 0x1,
|
||||
laneCount_2 = 0x2,
|
||||
laneCount_4 = 0x4,
|
||||
laneCount_8 = 0x8,
|
||||
laneCount_Supported
|
||||
} DP_LANE_COUNT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// enum value unit = 270M
|
||||
linkBW_1_62Gbps = 0x06,
|
||||
linkBW_2_16Gbps = 0x08,
|
||||
linkBW_2_43Gbps = 0x09,
|
||||
linkBW_2_70Gbps = 0x0A,
|
||||
linkBW_3_24Gbps = 0x0C,
|
||||
linkBW_4_32Gbps = 0x10,
|
||||
linkBW_5_40Gbps = 0x14,
|
||||
linkBW_8_10Gbps = 0x1E,
|
||||
linkBW_Supported
|
||||
} DP_LINK_BANDWIDTH;
|
||||
typedef enum
|
||||
{
|
||||
// enum value unit = 10M
|
||||
dp2LinkRate_1_62Gbps = 0x00A2, // 162
|
||||
dp2LinkRate_2_16Gbps = 0x00D8, // 216
|
||||
dp2LinkRate_2_43Gbps = 0x00F3, // 243
|
||||
dp2LinkRate_2_50Gbps = 0x00FA, // 250
|
||||
dp2LinkRate_2_70Gbps = 0x010E, // 270
|
||||
dp2LinkRate_3_24Gbps = 0x0144, // 324
|
||||
dp2LinkRate_4_32Gbps = 0x01B0, // 432
|
||||
dp2LinkRate_5_40Gbps = 0x021C, // 540
|
||||
dp2LinkRate_8_10Gbps = 0x032A, // 810
|
||||
dp2LinkRate_Supported
|
||||
} DP2X_LINKRATE_10M;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// Uses 8b/10b channel encoding
|
||||
// Link Data Rate = link rate * (8 / 10) / 8
|
||||
// = link rate * 0.1
|
||||
dataRate_1_62Gbps = 162000000,
|
||||
dataRate_2_16Gbps = 216000000,
|
||||
dataRate_2_43Gbps = 243000000,
|
||||
dataRate_2_70Gbps = 270000000,
|
||||
dataRate_3_24Gbps = 324000000,
|
||||
dataRate_4_32Gbps = 432000000,
|
||||
dataRate_5_40Gbps = 540000000,
|
||||
dataRate_8_10Gbps = 810000000
|
||||
} DP_LINK_8B_10B_DATA_RATES;
|
||||
|
||||
#define IS_8B_10B_CODING(dataRate) (((NvU64)(dataRate)== dataRate_1_62Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_2_16Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_2_43Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_2_70Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_3_24Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_4_32Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_5_40Gbps) || \
|
||||
((NvU64)(dataRate)== dataRate_8_10Gbps))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
linkSpeedId_1_62Gbps = 0x00,
|
||||
linkSpeedId_2_70Gbps = 0x01,
|
||||
linkSpeedId_5_40Gbps = 0x02,
|
||||
linkSpeedId_8_10Gbps = 0x03,
|
||||
linkSpeedId_2_16Gbps = 0x04,
|
||||
linkSpeedId_2_43Gbps = 0x05,
|
||||
linkSpeedId_3_24Gbps = 0x06,
|
||||
linkSpeedId_4_32Gbps = 0x07,
|
||||
linkSpeedId_Supported
|
||||
} DP_LINK_SPEED_INDEX;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
postCursor2_Level0 = 0,
|
||||
postCursor2_Level1 = 1,
|
||||
postCursor2_Level2 = 2,
|
||||
postCursor2_Level3 = 3,
|
||||
postCursor2_Supported
|
||||
} DP_POSTCURSOR2;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
preEmphasis_Disabled = 0,
|
||||
preEmphasis_Level1 = 1,
|
||||
preEmphasis_Level2 = 2,
|
||||
preEmphasis_Level3 = 3,
|
||||
preEmphasis_Supported
|
||||
} DP_PREEMPHASIS;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
driveCurrent_Level0 = 0,
|
||||
driveCurrent_Level1 = 1,
|
||||
driveCurrent_Level2 = 2,
|
||||
driveCurrent_Level3 = 3,
|
||||
driveCurrent_Supported
|
||||
} DP_DRIVECURRENT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
trainingPattern_Disabled = 0x0,
|
||||
trainingPattern_1 = 0x1,
|
||||
trainingPattern_2 = 0x2,
|
||||
trainingPattern_3 = 0x3,
|
||||
trainingPattern_4 = 0xB
|
||||
} DP_TRAININGPATTERN;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
dpOverclock_Percentage_0 = 0,
|
||||
dpOverclock_Percentage_10 = 10,
|
||||
dpOverclock_Percentage_20 = 20
|
||||
}DP_OVERCLOCKPERCENTAGE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
dpColorFormat_RGB = 0,
|
||||
dpColorFormat_YCbCr444 = 0x1,
|
||||
dpColorFormat_YCbCr422 = 0x2, // this is for simple 422
|
||||
dpColorFormat_YCbCr420 = 0x3,
|
||||
dpColorFormat_YCbCr422_Native = 0x4,
|
||||
dpColorFormat_Unknown = 0xF
|
||||
} DP_COLORFORMAT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
dp_pktType_VideoStreamconfig = 0x7,
|
||||
dp_pktType_CeaHdrMetaData = 0x21,
|
||||
dp_pktType_SRInfoFrame = 0x7f, // Self refresh infoframe for eDP enter/exit self refresh, SRS 1698
|
||||
dp_pktType_Cea861BInfoFrame = 0x80,
|
||||
dp_pktType_VendorSpecInfoFrame = 0x81,
|
||||
dp_pktType_AviInfoFrame = 0x82,
|
||||
dp_pktType_AudioInfoFrame = 0x84,
|
||||
dp_pktType_SrcProdDescInfoFrame = 0x83,
|
||||
dp_pktType_MpegSrcInfoFrame = 0x85,
|
||||
dp_pktType_DynamicRangeMasteringInfoFrame = 0x87
|
||||
} DP_PACKET_TYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DSC_SLICES_PER_SINK_1 = 1,
|
||||
DSC_SLICES_PER_SINK_2 = 2,
|
||||
DSC_SLICES_PER_SINK_4 = 4,
|
||||
DSC_SLICES_PER_SINK_6 = 6,
|
||||
DSC_SLICES_PER_SINK_8 = 8,
|
||||
DSC_SLICES_PER_SINK_10 = 10,
|
||||
DSC_SLICES_PER_SINK_12 = 12,
|
||||
DSC_SLICES_PER_SINK_16 = 16,
|
||||
DSC_SLICES_PER_SINK_20 = 20,
|
||||
DSC_SLICES_PER_SINK_24 = 24
|
||||
} DscSliceCount;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DSC_BITS_PER_COLOR_MASK_8 = 1,
|
||||
DSC_BITS_PER_COLOR_MASK_10 = 2,
|
||||
DSC_BITS_PER_COLOR_MASK_12 = 4
|
||||
}DscBitsPerColorMask;
|
||||
|
||||
enum DSC_MODE
|
||||
{
|
||||
DSC_SINGLE,
|
||||
DSC_DUAL,
|
||||
DSC_DROP,
|
||||
DSC_MODE_NONE
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
BITS_PER_PIXEL_PRECISION_1_16 = 0,
|
||||
BITS_PER_PIXEL_PRECISION_1_8 = 1,
|
||||
BITS_PER_PIXEL_PRECISION_1_4 = 2,
|
||||
BITS_PER_PIXEL_PRECISION_1_2 = 3,
|
||||
BITS_PER_PIXEL_PRECISION_1 = 4
|
||||
}BITS_PER_PIXEL_INCREMENT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NV_DP_FEC_UNCORRECTED = 0,
|
||||
NV_DP_FEC_CORRECTED = 1,
|
||||
NV_DP_FEC_BIT = 2,
|
||||
NV_DP_FEC_PARITY_BLOCK = 3,
|
||||
NV_DP_FEC_PARITY_BIT = 4
|
||||
}FEC_ERROR_COUNTER;
|
||||
|
||||
typedef struct DscCaps
|
||||
{
|
||||
NvBool bDSCSupported;
|
||||
NvBool bDSCDecompressionSupported;
|
||||
NvBool bDynamicPPSSupported;
|
||||
NvBool bDynamicDscToggleSupported;
|
||||
NvBool bDSCPassThroughSupported;
|
||||
unsigned versionMajor, versionMinor;
|
||||
unsigned rcBufferBlockSize;
|
||||
unsigned rcBuffersize;
|
||||
unsigned maxSlicesPerSink;
|
||||
unsigned lineBufferBitDepth;
|
||||
NvBool bDscBlockPredictionSupport;
|
||||
unsigned maxBitsPerPixelX16;
|
||||
unsigned sliceCountSupportedMask;
|
||||
|
||||
struct
|
||||
{
|
||||
NvBool bRgb;
|
||||
NvBool bYCbCr444;
|
||||
NvBool bYCbCrSimple422;
|
||||
NvBool bYCbCrNative422;
|
||||
NvBool bYCbCrNative420;
|
||||
}dscDecoderColorFormatCaps;
|
||||
|
||||
unsigned dscDecoderColorDepthMask;
|
||||
unsigned dscPeakThroughputMode0;
|
||||
unsigned dscPeakThroughputMode1;
|
||||
unsigned dscMaxSliceWidth;
|
||||
|
||||
unsigned branchDSCOverallThroughputMode0;
|
||||
unsigned branchDSCOverallThroughputMode1;
|
||||
unsigned branchDSCMaximumLineBufferWidth;
|
||||
|
||||
BITS_PER_PIXEL_INCREMENT dscBitsPerPixelIncrement;
|
||||
} DscCaps;
|
||||
|
||||
typedef struct GpuDscCrc
|
||||
{
|
||||
NvU16 gpuCrc0;
|
||||
NvU16 gpuCrc1;
|
||||
NvU16 gpuCrc2;
|
||||
} gpuDscCrc;
|
||||
|
||||
typedef struct SinkDscCrc
|
||||
{
|
||||
NvU16 sinkCrc0;
|
||||
NvU16 sinkCrc1;
|
||||
NvU16 sinkCrc2;
|
||||
} sinkDscCrc;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NvBool bSourceControlModeSupported;
|
||||
NvBool bConcurrentLTSupported;
|
||||
NvBool bConv444To420Supported;
|
||||
NvU32 maxTmdsClkRate;
|
||||
NvU8 maxBpc;
|
||||
NvU8 maxHdmiLinkBandwidthGbps;
|
||||
} PCONCaps;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PCON_HDMI_LINK_BW_FRL_9GBPS = 0,
|
||||
PCON_HDMI_LINK_BW_FRL_18GBPS,
|
||||
PCON_HDMI_LINK_BW_FRL_24GBPS,
|
||||
PCON_HDMI_LINK_BW_FRL_32GBPS,
|
||||
PCON_HDMI_LINK_BW_FRL_40GBPS,
|
||||
PCON_HDMI_LINK_BW_FRL_48GBPS,
|
||||
PCON_HDMI_LINK_BW_FRL_INVALID
|
||||
} PCONHdmiLinkBw;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NV_DP_PCON_CONTROL_STATUS_SUCCESS = 0,
|
||||
NV_DP_PCON_CONTROL_STATUS_ERROR_TIMEOUT = 0x80000001,
|
||||
NV_DP_PCON_CONTROL_STATUS_ERROR_FRL_LT_FAILURE = 0x80000002,
|
||||
NV_DP_PCON_CONTROL_STATUS_ERROR_FRL_NOT_SUPPORTED = 0x80000003,
|
||||
NV_DP_PCON_CONTROL_STATUS_ERROR_GENERIC = 0x8000000F
|
||||
} NV_DP_PCON_CONTROL_STATUS;
|
||||
//
|
||||
// Poll HDMI-Link Status change and FRL Ready.
|
||||
// Spec says it should be done in 500ms, we give it 20% extra time:
|
||||
// 60 times with interval 10ms.
|
||||
//
|
||||
#define NV_PCON_SOURCE_CONTROL_MODE_TIMEOUT_THRESHOLD (60)
|
||||
#define NV_PCON_SOURCE_CONTROL_MODE_TIMEOUT_INTERVAL_MS (10)
|
||||
//
|
||||
// Poll HDMI-Link Status change IRQ and Link Status.
|
||||
// Spec says it should be done in 250ms, we give it 20% extra time:
|
||||
// 30 times with interval 10ms.
|
||||
//
|
||||
#define NV_PCON_FRL_LT_TIMEOUT_THRESHOLD (30)
|
||||
#define NV_PCON_FRL_LT_TIMEOUT_INTERVAL_MS (10)
|
||||
|
||||
typedef struct _PCONLinkControl
|
||||
{
|
||||
struct
|
||||
{
|
||||
// This struct is being passed in for assessPCONLink I/F
|
||||
NvU32 bAssessLink : 1;
|
||||
|
||||
// Specify if client wants to use src control - set it false DPLib can just do DP LT alone.
|
||||
// By default it should be true.
|
||||
NvU32 bSourceControlMode : 1;
|
||||
|
||||
// Default is sequential mode, set this to choose concurrent mode
|
||||
NvU32 bConcurrentMode : 1;
|
||||
|
||||
// Default is normal link training mode (stop once FRL-LT succeed).
|
||||
// Set this to link train all requested FRL Bw in allowedFrlBwMask.
|
||||
NvU32 bExtendedLTMode : 1;
|
||||
|
||||
// Keep PCON links (DP and FRL link) alive
|
||||
NvU32 bKeepPCONLinkAlive : 1;
|
||||
|
||||
// Default DPLib will fallback to autonomous mode and perform DP assessLink.
|
||||
NvU32 bSkipFallback : 1;
|
||||
} flags;
|
||||
|
||||
// Input: Clients use this to specify the FRL BW PCON should try.
|
||||
NvU32 frlHdmiBwMask;
|
||||
|
||||
struct
|
||||
{
|
||||
NV_DP_PCON_CONTROL_STATUS status;
|
||||
PCONHdmiLinkBw maxFrlBwTrained;
|
||||
NvU32 trainedFrlBwMask;
|
||||
} result;
|
||||
} PCONLinkControl;
|
||||
|
||||
static NV_INLINE PCONHdmiLinkBw getMaxFrlBwFromMask(NvU32 frlRateMask)
|
||||
{
|
||||
if (frlRateMask == 0)
|
||||
{
|
||||
// Nothing is set. Assume TMDS
|
||||
return PCON_HDMI_LINK_BW_FRL_INVALID;
|
||||
}
|
||||
|
||||
// find highest set bit (destructive operation)
|
||||
HIGHESTBITIDX_32(frlRateMask);
|
||||
|
||||
return (PCONHdmiLinkBw)frlRateMask;
|
||||
}
|
||||
|
||||
/*
|
||||
EDP VESA PSR defines
|
||||
*/
|
||||
|
||||
// PSR state transitions
|
||||
typedef enum
|
||||
{
|
||||
vesaPsrStatus_Inactive = 0,
|
||||
vesaPsrStatus_Transition2Active = 1,
|
||||
vesaPsrStatus_DisplayFromRfb = 2,
|
||||
vesaPsrStatus_CaptureAndDisplay = 3,
|
||||
vesaPsrStatus_Transition2Inactive = 4,
|
||||
vesaPsrStatus_Undefined5 = 5,
|
||||
vesaPsrStatus_Undefined6 = 6,
|
||||
vesaPsrStatus_SinkError = 7
|
||||
} vesaPsrState;
|
||||
|
||||
typedef struct VesaPsrConfig
|
||||
{
|
||||
NvU8 psrCfgEnable : 1;
|
||||
NvU8 srcTxEnabledInPsrActive : 1;
|
||||
NvU8 crcVerifEnabledInPsrActive : 1;
|
||||
NvU8 frameCaptureSecondActiveFrame : 1;
|
||||
NvU8 selectiveUpdateOnSecondActiveline : 1;
|
||||
NvU8 enableHpdIrqOnCrcMismatch : 1;
|
||||
NvU8 enablePsr2 : 1;
|
||||
NvU8 reserved : 1;
|
||||
} vesaPsrConfig;
|
||||
|
||||
typedef struct VesaPsrDebugStatus
|
||||
{
|
||||
NvBool lastSdpPsrState;
|
||||
NvBool lastSdpUpdateRfb;
|
||||
NvBool lastSdpCrcValid;
|
||||
NvBool lastSdpSuValid;
|
||||
NvBool lastSdpFirstSURcvd;
|
||||
NvBool lastSdpLastSURcvd;
|
||||
NvBool lastSdpYCoordValid;
|
||||
NvU8 maxResyncFrames;
|
||||
NvU8 actualResyncFrames;
|
||||
} vesaPsrDebugStatus;
|
||||
|
||||
typedef struct VesaPsrErrorStatus
|
||||
{
|
||||
NvU8 linkCrcError : 1;
|
||||
NvU8 rfbStoreError : 1;
|
||||
NvU8 vscSdpError : 1;
|
||||
NvU8 rsvd : 5;
|
||||
} vesaPsrErrorStatus;
|
||||
|
||||
typedef struct VesaPsrEventIndicator
|
||||
{
|
||||
NvU8 sinkCapChange : 1;
|
||||
NvU8 rsvd : 7;
|
||||
} vesaPsrEventIndicator;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct VesaPsrSinkCaps
|
||||
{
|
||||
NvU8 psrVersion;
|
||||
NvU8 linkTrainingRequired : 1;
|
||||
NvU8 psrSetupTime : 3;
|
||||
NvU8 yCoordinateRequired : 1;
|
||||
NvU8 psr2UpdateGranularityRequired : 1;
|
||||
NvU8 reserved : 2;
|
||||
NvU16 suXGranularity;
|
||||
NvU8 suYGranularity;
|
||||
} vesaPsrSinkCaps;
|
||||
#pragma pack()
|
||||
|
||||
typedef struct PanelReplayCaps
|
||||
{
|
||||
// Indicates if Panel replay is supported or not
|
||||
NvBool bPanelReplaySupported;
|
||||
} panelReplayCaps;
|
||||
|
||||
typedef struct PanelReplayConfig
|
||||
{
|
||||
// This field is used to configure Panel replay on sink device
|
||||
NvBool enablePanelReplay;
|
||||
|
||||
// This field is used to configure CRC with Panel replay on sink device
|
||||
NvBool bEnableCrcWithPr;
|
||||
|
||||
// Configures sink to Generate an IRQ_HPD when DPCD 02020h[3] = 1.
|
||||
NvBool bHpdOnAdaptiveSyncSdpMissing;
|
||||
|
||||
//
|
||||
// Used to configure sink to Generate an IRQ_HPD after finding a VSC SDP
|
||||
// for PR uncorrectable error.
|
||||
//
|
||||
NvBool bHpdOnSdpUncorrectableError;
|
||||
|
||||
// Configures sink to Generate an IRQ_HPD for RFB storage error.
|
||||
NvBool bHpdOnRfbStorageErrors;
|
||||
|
||||
//
|
||||
// Configures sink to generate an IRQ_HPD after finding an active video image
|
||||
// CRC mismatch.
|
||||
//
|
||||
NvBool bHpdOnRfbActiveFrameCrcError;
|
||||
} panelReplayConfig;
|
||||
|
||||
// PR state
|
||||
typedef enum
|
||||
{
|
||||
PanelReplay_Inactive = 0,
|
||||
PanelReplay_CaptureAndDisplay = 1,
|
||||
PanelReplay_DisplayFromRfb = 2,
|
||||
PanelReplay_Undefined = 7
|
||||
} PanelReplayState;
|
||||
|
||||
// PR Sink debug info
|
||||
typedef struct PanelReplaySinkDebugInfo
|
||||
{
|
||||
NvU8 activeFrameCrcError : 1;
|
||||
NvU8 rfbStorageError : 1;
|
||||
NvU8 vscSdpUncorrectableError: 1;
|
||||
NvU8 adaptiveSyncSdpMissing : 1;
|
||||
NvU8 sinkPrStatus : 3;
|
||||
NvU8 sinkFramelocked : 2;
|
||||
NvU8 sinkFrameLockedValid : 1;
|
||||
NvU8 currentPrState : 1;
|
||||
NvU8 crcValid: 1;
|
||||
NvU8 suCoordinatesValid: 1;
|
||||
} panelReplaySinkDebugInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PanelReplayState prState;
|
||||
} PanelReplayStatus;
|
||||
|
||||
// Multiplier constant to get link frequency in KHZ
|
||||
// Maximum link rate of Main Link lanes = Value x 270M.
|
||||
// To get it to KHz unit, we need to multiply 270K.
|
||||
#define DP_LINK_BW_FREQUENCY_MULTIPLIER_KHZ (270*1000)
|
||||
#define DP_LINK_BW_FREQUENCY_MULTIPLIER_270MHZ_TO_KHZ DP_LINK_BW_FREQUENCY_MULTIPLIER_KHZ
|
||||
|
||||
// Multiplier constant to get link rate table's in KHZ
|
||||
#define DP_LINK_RATE_TABLE_MULTIPLIER_KHZ 200
|
||||
|
||||
// Macro to convert link rate table to 10M convention
|
||||
#define LINK_RATE_200KHZ_TO_10MHZ(linkRate) (linkRate / 50)
|
||||
|
||||
//
|
||||
// Get link rate in multiplier of 10MHz from KHz:
|
||||
// a * 1000(KHz) / 10 * 1000 * 1000(10Mhz)
|
||||
//
|
||||
#define LINK_RATE_KHZ_TO_10MHZ(a) ((a) / 10000)
|
||||
#define LINK_RATE_10MHZ_TO_KHZ(a) ((a) * 10000)
|
||||
#define LINK_RATE_270MHZ_TO_10MHZ(a) ((a) * 27)
|
||||
#define LINK_RATE_10MHZ_TO_270MHZ(a) ((a) / 27)
|
||||
|
||||
//
|
||||
// Multiplier constant to get link frequency (multiplier of 270MHz) in MBps
|
||||
// a * 270 * 1000 * 1000(270Mhz) * (8 / 10)(8b/10b) / 8(Byte)
|
||||
// = a * 27000000
|
||||
//
|
||||
#define DP_LINK_BW_FREQ_MULTI_MBPS 27000000
|
||||
|
||||
// Convert link rate in 10M to its value in bps
|
||||
#define DP_LINK_RATE_10M_TO_BPS(linkRate) (linkRate * 10000000)
|
||||
|
||||
// Convert link rate in 270M to its value in bps
|
||||
#define DP_LINK_RATE_270M_TO_BPS(linkRate) (linkRate * 270000000)
|
||||
|
||||
// Convert link rate from bps to Bps
|
||||
#define DP_LINK_RATE_BITSPS_TO_BYTESPS(linkRate) (linkRate / 8)
|
||||
|
||||
//
|
||||
// Get link rate in multiplier of 270MHz from KHz:
|
||||
// a * 1000(KHz) / 270 * 1000 * 1000(270Mhz)
|
||||
//
|
||||
#define LINK_RATE_KHZ_TO_MULTP(a) ((a) / 270000)
|
||||
|
||||
//
|
||||
// Get link rate in MBps from KHz:
|
||||
// a * 1000 * (8 / 10)(8b/10b) / 8(Byte)
|
||||
// = a * 100
|
||||
//
|
||||
#define LINK_RATE_KHZ_TO_MBPS(a) ((a) * 100)
|
||||
|
||||
#define DP_MAX_LANES 8 // This defines the maximum number of lanes supported on a chip.
|
||||
#define DP_MAX_LANES_PER_LINK 4 // This defines the maximum number of lanes per link in a chip.
|
||||
#define DP_AUX_CHANNEL_MAX_BYTES 16
|
||||
#define DP_CLOCK_RECOVERY_TOT_TRIES 10
|
||||
#define DP_CLOCK_RECOVERY_MAX_TRIES 5
|
||||
#define DP_CH_EQ_MAX_RETRIES 5
|
||||
#define DP_LT_MAX_FOR_MST_MAX_RETRIES 3
|
||||
#define DP_READ_EDID_MAX_RETRIES 7
|
||||
#define DP_AUX_CHANNEL_DEFAULT_DEFER_MAX_TRIES 7
|
||||
#define DP_AUX_CHANNEL_TIMEOUT_MAX_TRIES 2
|
||||
#define DP_SET_POWER_D0_NORMAL_MAX_TRIES 3
|
||||
#define DP_SW_AUTO_READ_REQ_SIZE 6
|
||||
#define NV_DP_RBR_FALLBACK_MAX_TRIES 3
|
||||
|
||||
#define DP_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_DEFAULT_MS 1
|
||||
|
||||
#define DP_AUX_CHANNEL_TIMEOUT_WAITIDLE 400 // source is required to wait at least 400us before it considers the AUX transaction to have timed out.
|
||||
#define DP_AUX_CHANNEL_TIMEOUT_VALUE_DEFAULT 400
|
||||
#define DP_AUX_CHANNEL_TIMEOUT_VALUE_MAX 3200
|
||||
|
||||
#define DP_PHY_REPEATER_INDEX_FOR_SINK 0xFFFFFFFF
|
||||
|
||||
#define DP_MESSAGEBOX_SIZE 48
|
||||
#define DP_POST_LT_ADJ_REQ_LIMIT 6
|
||||
#define DP_POST_LT_ADJ_REQ_TIMER 200000
|
||||
|
||||
#define DP_AUX_HYBRID_TIMEOUT 600
|
||||
#define DP_AUX_SEMA_ACQUIRE_TIMEOUT 20000
|
||||
|
||||
#define DP_CONFIG_WATERMARK_ADJUST 2
|
||||
#define DP_CONFIG_WATERMARK_LIMIT 20
|
||||
#define DP_CONFIG_INCREASED_WATERMARK_ADJUST 8
|
||||
#define DP_CONFIG_INCREASED_WATERMARK_LIMIT 22
|
||||
|
||||
#define NV_DP_MSA_PROPERTIES_MISC1_STEREO 2:1
|
||||
|
||||
#define DP_LANE_STATUS_ARRAY_SIZE ((displayPort_LaneSupported + 1) / 2)
|
||||
#define DP_LANE_STATUS_ARRAY_INDEX(lane) ((lane) < displayPort_LaneSupported ? ((lane) / 2) : 0)
|
||||
|
||||
#define IS_VALID_LANECOUNT(val) (((NvU32)(val)==0) || ((NvU32)(val)==1) || \
|
||||
((NvU32)(val)==2) || ((NvU32)(val)==4) || \
|
||||
((NvU32)(val)==8))
|
||||
|
||||
#define IS_STANDARD_LINKBW(val) (((NvU32)(val)==linkBW_1_62Gbps) || \
|
||||
((NvU32)(val)==linkBW_2_70Gbps) || \
|
||||
((NvU32)(val)==linkBW_5_40Gbps) || \
|
||||
((NvU32)(val)==linkBW_8_10Gbps))
|
||||
|
||||
#define IS_INTERMEDIATE_LINKBW(val) (((NvU32)(val)==linkBW_2_16Gbps) || \
|
||||
((NvU32)(val)==linkBW_2_43Gbps) || \
|
||||
((NvU32)(val)==linkBW_3_24Gbps) || \
|
||||
((NvU32)(val)==linkBW_4_32Gbps))
|
||||
|
||||
#define IS_VALID_LINKBW(val) (IS_STANDARD_LINKBW(val) || \
|
||||
IS_INTERMEDIATE_LINKBW(val))
|
||||
|
||||
#define IS_VALID_LINKBW_10M(val) IS_VALID_LINKBW(LINK_RATE_10MHZ_TO_270MHZ(val))
|
||||
#define IS_INTERMEDIATE_LINKBW_10M(val) IS_INTERMEDIATE_LINKBW(LINK_RATE_10MHZ_TO_270MHZ(val))
|
||||
#define IS_STANDARD_LINKBW_10M(val) IS_STANDARD_LINKBW(LINK_RATE_10MHZ_TO_270MHZ(val))
|
||||
//
|
||||
// Phy Repeater count read from DPCD offset F0002h is an
|
||||
// 8 bit value where each bit represents the total count
|
||||
// 80h = 1 repeater, 40h = 2 , 20h = 3 ... 04h = 6
|
||||
// This function maps it to decimal system
|
||||
// Note: From DP2.x max count of LTTPR is set to 6.
|
||||
//
|
||||
static NV_INLINE NvU32 mapPhyRepeaterVal(NvU32 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_0:
|
||||
return 0;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_1:
|
||||
return 1;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_2:
|
||||
return 2;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_3:
|
||||
return 3;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_4:
|
||||
return 4;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_5:
|
||||
return 5;
|
||||
case NV_DPCD14_PHY_REPEATER_CNT_VAL_6:
|
||||
return 6;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// HDCP specific definitions
|
||||
|
||||
#define HDCP22_RTX_SIMPLE_PATTERN 0x12345678
|
||||
#define HDCP22_TX_CAPS_PATTERN_BIG_ENDIAN {0x02, 0x00, 0x00}
|
||||
|
||||
#define DP_MST_HEAD_TO_STREAMID(head, pipeId, numHeads) ((head) + 1 + (pipeId) * (numHeads))
|
||||
#define DP_MST_STREAMID_TO_HEAD(streamid, pipeId, numHeads) ((streamid) - 1 - ((pipeId) * (numHeads)))
|
||||
#define DP_MST_STREAMID_TO_PIPE(streamid, head, numHeads) (((streamid) - (head) - 1) / (numHeads))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NV_DP_SBMSG_REQUEST_ID_GET_MESSAGE_TRANSACTION_VERSION = 0x00,
|
||||
NV_DP_SBMSG_REQUEST_ID_LINK_ADDRESS = 0x01,
|
||||
NV_DP_SBMSG_REQUEST_ID_CONNECTION_STATUS_NOTIFY = 0x02,
|
||||
|
||||
NV_DP_SBMSG_REQUEST_ID_ENUM_PATH_RESOURCES = 0x10,
|
||||
NV_DP_SBMSG_REQUEST_ID_ALLOCATE_PAYLOAD = 0x11,
|
||||
NV_DP_SBMSG_REQUEST_ID_QUERY_PAYLOAD = 0x12,
|
||||
NV_DP_SBMSG_REQUEST_ID_RESOURCE_STATUS_NOTIFY = 0x13,
|
||||
NV_DP_SBMSG_REQUEST_ID_CLEAR_PAYLOAD_ID_TABLE = 0x14,
|
||||
|
||||
NV_DP_SBMSG_REQUEST_ID_REMOTE_DPCD_READ = 0x20,
|
||||
NV_DP_SBMSG_REQUEST_ID_REMOTE_DPCD_WRITE = 0x21,
|
||||
NV_DP_SBMSG_REQUEST_ID_REMOTE_I2C_READ = 0x22,
|
||||
NV_DP_SBMSG_REQUEST_ID_REMOTE_I2C_WRITE = 0x23,
|
||||
NV_DP_SBMSG_REQUEST_ID_POWER_UP_PHY = 0x24,
|
||||
NV_DP_SBMSG_REQUEST_ID_POWER_DOWN_PHY = 0x25,
|
||||
|
||||
NV_DP_SBMSG_REQUEST_ID_SINK_EVENT_NOTIFY = 0x30,
|
||||
NV_DP_SBMSG_REQUEST_ID_QUERY_STREAM_ENCRYPTION_STATUS = 0x38,
|
||||
|
||||
NV_DP_SBMSG_REQUEST_ID_UNDEFINED = 0xFF,
|
||||
} NV_DP_SBMSG_REQUEST_ID;
|
||||
|
||||
// FEC
|
||||
|
||||
#define NV_DP_FEC_FLAGS_SELECT_ALL 0x7
|
||||
#define NV_DP_ERROR_COUNTERS_PER_LANE 5
|
||||
#define NV_DP_MAX_NUM_OF_LANES 4
|
||||
#define NV_DP_FEC_ERROR_COUNT_INVALID 0xbadf
|
||||
#define NV_DP_UNCORRECTED_ERROR NV_DP_FEC_UNCORRECTED : NV_DP_FEC_UNCORRECTED
|
||||
#define NV_DP_CORRECTED_ERROR NV_DP_FEC_CORRECTED : NV_DP_FEC_CORRECTED
|
||||
#define NV_DP_BIT_ERROR NV_DP_FEC_BIT : NV_DP_FEC_BIT
|
||||
#define NV_DP_PARITY_BLOCK_ERROR NV_DP_FEC_PARITY_BLOCK : NV_DP_FEC_PARITY_BLOCK
|
||||
#define NV_DP_PARITY_BIT_ERROR NV_DP_FEC_PARITY_BIT : NV_DP_FEC_PARITY_BIT
|
||||
#define NV_DP_UNCORRECTED_ERROR_NO 0
|
||||
#define NV_DP_UNCORRECTED_ERROR_YES 1
|
||||
#define NV_DP_CORRECTED_ERROR_NO 0
|
||||
#define NV_DP_CORRECTED_ERROR_YES 1
|
||||
#define NV_DP_BIT_ERROR_NO 0
|
||||
#define NV_DP_BIT_ERROR_YES 1
|
||||
#define NV_DP_PARITY_BLOCK_ERROR_NO 0
|
||||
#define NV_DP_PARITY_BLOCK_ERROR_YES 1
|
||||
#define NV_DP_PARITY_BIT_ERROR_NO 0
|
||||
#define NV_DP_PARITY_BIT_ERROR_YES 1
|
||||
|
||||
|
||||
#endif // #ifndef _DISPLAYPORT_H_
|
||||
185
src/common/inc/displayport/displayport2x.h
Normal file
185
src/common/inc/displayport/displayport2x.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DISPLAYPORT2X_H_
|
||||
#define _DISPLAYPORT2X_H_
|
||||
|
||||
#include "nvmisc.h"
|
||||
#include "dpcd.h"
|
||||
#include "dpcd14.h"
|
||||
#include "dpcd20.h"
|
||||
#include "displayport.h"
|
||||
|
||||
/**************** Resource Manager Defines and Structures ******************\
|
||||
* *
|
||||
* Module: DISPLAYPORT2x.H *
|
||||
* Defines DISPLAYPORT V2.x *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
//
|
||||
// 4 Legacy Link Rates: RBR, HBR, HBR2, HBR3
|
||||
// 5 ILRs: 2.16G, 2.43G, 3.24G, 4.32G, 6.75G
|
||||
// 3 UHBRs: 10G, 13.5G, 20G
|
||||
// 2 Internal Test: 2.5G, 5G Do NOT use in any other use cases.
|
||||
//
|
||||
#define NV_SUPPORTED_DP2X_LINK_RATES__SIZE 14
|
||||
//
|
||||
// For 128b/132b link rate to data rate, linkRate * 128/132 * 1/8 * 10M -> ((linkRate * 4 * 1000000) / 33)
|
||||
// For 128b/132b data rate to link rate, dataRate * 132/128 * 8 * 1/10M -> ((dataRate * 33) / (4 * 10000000))
|
||||
// Data rates used here are in Bytes per second.
|
||||
//
|
||||
#define LINK_RATE_TO_DATA_RATE_128B_132B(linkRate) ((linkRate * 4 * 10000000UL) / 33)
|
||||
#define DATA_RATE_128B_132B_TO_LINK_RATE(dataRate) (NV_UNSIGNED_DIV_CEIL((dataRate * 33ULL), (4 * 10000000ULL)))
|
||||
|
||||
// To calculate the effective link rate with channel encoding accounted
|
||||
#define OVERHEAD_128B_132B(linkRate) ((linkRate * 128) / 132)
|
||||
|
||||
//
|
||||
// 128b/132b precise Data Bandwidth Efficiency.
|
||||
// Per Spec 3.5.2.18, effective BW with 128b/132b channel coding is linkRate * 0.9671.
|
||||
// This covers Phy logial layer efficiency 52/1584 and link layer efficiency of 4/65540 as well.
|
||||
// Also add SSC margin of 0.5%.
|
||||
// Additionally add another 0.1% for source to be slightly more conservative for DSC environments
|
||||
// and provide maximum compatibility for LTTPR CDS LT sequence.
|
||||
//
|
||||
// (1 - 52/1584) * (1 - 4/65540) * 0.994 = 0.9612
|
||||
//
|
||||
#define DATA_BW_EFF_128B_132B(linkRate) ((linkRate * 9612) / 10000)
|
||||
|
||||
// For channel equalization, max loop count is 20 when waiting CHANNEL_EQ_DONE set.
|
||||
#define NV_DP2X_MAX_LOOP_COUNT_POLL_CHNL_EQ_DONE (20U)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
linkBW_6_75Gbps = 0x19
|
||||
} DP2X_LINK_BANDWIDTH_270M;
|
||||
|
||||
// The definition here is to match HW register defines for link speed.
|
||||
typedef enum
|
||||
{
|
||||
dp2LinkSpeedId_1_62Gbps = 0x00,
|
||||
dp2LinkSpeedId_2_70Gbps = 0x01,
|
||||
dp2LinkSpeedId_5_40Gbps = 0x02,
|
||||
dp2LinkSpeedId_8_10Gbps = 0x03,
|
||||
dp2LinkSpeedId_2_16Gbps = 0x04,
|
||||
dp2LinkSpeedId_2_43Gbps = 0x05,
|
||||
dp2LinkSpeedId_3_24Gbps = 0x06,
|
||||
dp2LinkSpeedId_4_32Gbps = 0x07,
|
||||
dp2LinkSpeedId_6_75Gbps = 0x08,
|
||||
dp2LinkSpeedId_10_0Gbps = 0x12,
|
||||
dp2LinkSpeedId_13_5Gbps = 0x13,
|
||||
dp2LinkSpeedId_20_0Gbps = 0x14,
|
||||
dp2LinkSpeedId_UHBR_1_62Gbps = 0x1C,
|
||||
dp2LinkSpeedId_UHBR_5_00Gbps = 0x1D,
|
||||
dp2LinkSpeedId_UHBR_2_70Gbps = 0x1E,
|
||||
dp2LinkSpeedId_UHBR_2_50Gbps = 0x1F,
|
||||
dp2LinkSpeedId_Supported
|
||||
} DP2X_LINK_SPEED_INDEX;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
dp2xTxFFEPresetId_0 = 0,
|
||||
dp2xTxFFEPresetId_1 = 1,
|
||||
dp2xTxFFEPresetId_2 = 2,
|
||||
dp2xTxFFEPresetId_3 = 3,
|
||||
dp2xTxFFEPresetId_4 = 4,
|
||||
dp2xTxFFEPresetId_5 = 5,
|
||||
dp2xTxFFEPresetId_6 = 6,
|
||||
dp2xTxFFEPresetId_7 = 7,
|
||||
dp2xTxFFEPresetId_8 = 8,
|
||||
dp2xTxFFEPresetId_9 = 9,
|
||||
dp2xTxFFEPresetId_10 = 10,
|
||||
dp2xTxFFEPresetId_11 = 11,
|
||||
dp2xTxFFEPresetId_12 = 12,
|
||||
dp2xTxFFEPresetId_13 = 13,
|
||||
dp2xTxFFEPresetId_14 = 14,
|
||||
dp2xTxFFEPresetId_15 = 15,
|
||||
dp2xTxFFEPresetId_Supported
|
||||
} DP2X_TXFFE_PRESET_INDEX;
|
||||
|
||||
// Link Training stages for 128b/132b channel coding.
|
||||
typedef enum
|
||||
{
|
||||
DP2X_LT_Set_ResetLink = 0,
|
||||
DP2X_LT_Poll_ResetLink = 1,
|
||||
DP2X_LT_Set_PreLT = 2,
|
||||
DP2X_LT_Set_ChnlEq = 3,
|
||||
DP2X_LT_Poll_ChnlEq_Done = 4,
|
||||
DP2X_LT_Poll_ChnlEq_InterlaneAlign = 5,
|
||||
DP2X_LT_Set_CDS = 6,
|
||||
DP2X_LT_Poll_CDS = 7,
|
||||
DP2X_LT_Set_PostLT = 8,
|
||||
DP2X_LT_StageSupported
|
||||
} DP2X_LT_STAGES;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DP2X_ResetLinkForPreLT,
|
||||
DP2X_ResetLinkForFallback,
|
||||
DP2X_ResetLinkForChannelCoding
|
||||
} DP2X_RESET_LINK_REASON;
|
||||
|
||||
//
|
||||
// Multiplier constant to get link frequency (multiplier of 10MHz) in MBps with 128b/132b channel coding.
|
||||
// a * 10 * 1000 * 1000(10Mhz) * (128 / 132)(128b/132b) / 8(Byte)
|
||||
//
|
||||
#define DP_LINK_BW_FREQ_MULTI_10M_TO_MBPS (10 * 1000 * 1000 * 128 / (132 * 8))
|
||||
|
||||
//
|
||||
// Multiplier constant to get DP2X link frequency in KHZ
|
||||
// Maximum link rate of Main Link lanes = Value x 10M.
|
||||
// To get it to KHz unit, we need to multiply 10K.
|
||||
//
|
||||
#define DP_LINK_BW_FREQUENCY_MULTIPLIER_10MHZ_TO_KHZ (10*1000)
|
||||
|
||||
//
|
||||
// Multiplier constant to get link frequency (multiplier of 270MHz) in MBps
|
||||
// a * 10 * 1000 * 1000(10Mhz) * (8 / 10)(8b/10b) / 8(Byte)
|
||||
// = a * 1000000
|
||||
//
|
||||
#define DP_LINK_BW_FREQUENCY_MULTIPLIER_10MHZ_TO_10HZ (1000*1000)
|
||||
|
||||
#define IS_STANDARD_DP2_X_LINKBW(val) (((NvU32)(val)==dp2LinkRate_1_62Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_2_70Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_5_40Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_8_10Gbps))
|
||||
|
||||
#define IS_INTERMEDIATE_DP2_X_LINKBW(val) (((NvU32)(val)==dp2LinkRate_2_16Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_2_43Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_3_24Gbps) || \
|
||||
((NvU32)(val)==dp2LinkRate_4_32Gbps))
|
||||
|
||||
#define IS_DP2_X_UHBR_LINKBW(val) (0)
|
||||
|
||||
#define IS_VALID_DP2_X_LINKBW(val) (IS_STANDARD_DP2_X_LINKBW(val) || \
|
||||
IS_INTERMEDIATE_DP2_X_LINKBW(val) || \
|
||||
IS_DP2_X_UHBR_LINKBW(val))
|
||||
|
||||
#define IS_LEGACY_INTERMEDIATE_LINKBW(val) (((NvU32)(val)==linkBW_2_16Gbps) || \
|
||||
((NvU32)(val)==linkBW_2_43Gbps) || \
|
||||
((NvU32)(val)==linkBW_3_24Gbps) || \
|
||||
((NvU32)(val)==linkBW_4_32Gbps) || \
|
||||
((NvU32)(val)==linkBW_6_75Gbps))
|
||||
|
||||
#endif // #ifndef _DISPLAYPORT2X_H_
|
||||
1528
src/common/inc/displayport/dpcd.h
Normal file
1528
src/common/inc/displayport/dpcd.h
Normal file
File diff suppressed because it is too large
Load Diff
748
src/common/inc/displayport/dpcd14.h
Normal file
748
src/common/inc/displayport/dpcd14.h
Normal file
@@ -0,0 +1,748 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DISPLAYPORT14_H_
|
||||
#define _DISPLAYPORT14_H_
|
||||
|
||||
#define NV_DPCD14_GUID_2 (0x00000040) /* R-XUR */
|
||||
|
||||
#define NV_DPCD14_EXTEND_CAP_BASE (0x00002200)
|
||||
|
||||
#define NV_DPCD14_MAX_LINK_BANDWIDTH (0x00000001) /* R-XUR */
|
||||
#define NV_DPCD14_MAX_LINK_BANDWIDTH_VAL 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_MAX_LINK_BANDWIDTH_VAL_8_10_GBPS (0x0000001E) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_MAX_DOWNSPREAD (0x00000003) /* R-XUR */
|
||||
#define NV_DPCD14_MAX_DOWNSPREAD_TPS4_SUPPORTED 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_MAX_DOWNSPREAD_TPS4_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_MAX_DOWNSPREAD_TPS4_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL (0x0000000E) /* R-XUR */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_EXTENDED_RX_CAP 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_EXTENDED_RX_CAP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_EXTENDED_RX_CAP_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_SUPPORT (0x00000060) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_SUPPORT_DECOMPRESSION 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SUPPORT_DECOMPRESSION_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SUPPORT_DECOMPRESSION_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_ALGORITHM_REVISION (0x00000061) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_ALGORITHM_REVISION_MAJOR 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_ALGORITHM_REVISION_MINOR 7:4 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK (0x00000062) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK_SIZE 1:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK_SIZE_1KB (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK_SIZE_4KB (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK_SIZE_16KB (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_BLOCK_SIZE_64KB (0x00000003) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_RC_BUFFER (0x00000063) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_RC_BUFFER_SIZE 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1 (0x00000064) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_1 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_1_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_1_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_2 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_2_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_2_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_4 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_4_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_4_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_6 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_6_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_6_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_8 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_8_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_8_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_10 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_10_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_10_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_12 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_12_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_1_SLICES_PER_SINK_12_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER (0x00000065) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_9 (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_10 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_11 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_12 (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_13 (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_14 (0x00000005) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_15 (0x00000006) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_16 (0x00000007) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_LINE_BUFFER_BIT_DEPTH_8 (0x00000008) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_BLOCK_PREDICTION (0x00000066) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_BLOCK_PREDICTION_SUPPORT 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_BLOCK_PREDICTION_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_BLOCK_PREDICTION_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_MAXIMUM_BITS_PER_PIXEL_1 (0x00000067) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_MAXIMUM_BITS_PER_PIXEL_1_LSB 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DSC_MAXIMUM_BITS_PER_PIXEL_2 (0x00000068) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_MAXIMUM_BITS_PER_PIXEL_2_MSB 1:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES (0x00000069) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_RGB 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_RGB_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_RGB_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_444 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_444_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_444_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_SIMPLE_422 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_SIMPLE_422_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_SIMPLE_422_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_422 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_422_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_422_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_420 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_420_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_FORMAT_CAPABILITIES_YCbCr_NATIVE_420_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES (0x0000006A) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_8_BITS_PER_COLOR 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_8_BITS_PER_COLOR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_8_BITS_PER_COLOR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_10_BITS_PER_COLOR 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_10_BITS_PER_COLOR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_10_BITS_PER_COLOR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_12_BITS_PER_COLOR 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_12_BITS_PER_COLOR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_DECODER_COLOR_DEPTH_CAPABILITIES_12_BITS_PER_COLOR_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT (0x0000006B) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_340 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_400 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_450 (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_500 (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_550 (0x00000005) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_600 (0x00000006) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_650 (0x00000007) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_700 (0x00000008) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_750 (0x00000009) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_800 (0x0000000A) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_850 (0x0000000B) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_900 (0x0000000C) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_950 (0x0000000D) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE0_1000 (0x0000000E) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1 7:4 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_340 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_400 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_450 (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_500 (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_550 (0x00000005) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_600 (0x00000006) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_650 (0x00000007) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_700 (0x00000008) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_750 (0x00000009) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_800 (0x0000000A) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_850 (0x0000000B) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_900 (0x0000000C) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_950 (0x0000000D) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_PEAK_THROUGHPUT_MODE1_1000 (0x0000000E) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_MAXIMUM_SLICE_WIDTH (0x0000006C) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_MAXIMUM_SLICE_WIDTH_MAX 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2 (0x0000006D) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_16 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_16_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_16_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_20 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_20_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_20_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_24 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_24_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_SLICE_CAPABILITIES_2_SLICES_PER_SINK_24_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT (0x0000006F) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED 2:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED_1_16 (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED_1_8 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED_1_4 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED_1_2 (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_BITS_PER_PIXEL_INCREMENT_SUPPORTED_1 (0x00000004) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_ENABLE (0x00000160) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_ENABLE_DECOMPRESSION 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DSC_ENABLE_DECOMPRESSION_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DSC_ENABLE_DECOMPRESSION_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_FEC_CAPABILITY (0x00000090) /* R-XUR */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_CAPABLE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_CORRECTED_BLOCK_ERROR_COUNT_CAPABLE 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_CORRECTED_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_CORRECTED_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_BIT_ERROR_COUNT_CAPABLE 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_BIT_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_BIT_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_BLOCK_ERROR_COUNT_CAPABLE 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_ERROR_COUNT_CAPABLE 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_PARITY_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_RUNNING_INDICATOR_SUPPORT 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_RUNNING_INDICATOR_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_RUNNING_INDICATOR_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_ERROR_REPORTING_POLICY_SUPPORTED 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_ERROR_REPORTING_POLICY_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_CAPABILITY_FEC_ERROR_REPORTING_POLICY_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET (0x00000102) /* RWXUR */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS 3:0 /* RWXUF */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS_NONE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS_TP1 (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS_TP2 (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS_TP3 (0x00000003) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_TPS_TP4 (0x00000007) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_RECOVERED_CLOCK_OUT_EN 4:4 /* RWXUF */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_RECOVERED_CLOCK_OUT_EN_NO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_RECOVERED_CLOCK_OUT_EN_YES (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SCRAMBLING_DISABLED 5:5 /* RWXUF */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SCRAMBLING_DISABLED_FALSE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SCRAMBLING_DISABLED_TRUE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SYM_ERR_SEL 7:6 /* RWXUF */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SYM_ERR_SEL_DISPARITY_ILLEGAL_SYMBOL_ERROR (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SYM_ERR_SEL_DISPARITY_ERROR (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_SYM_ERR_SEL_ILLEGAL_SYMBOL_ERROR (0x00000002) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_LINK_QUAL_LANE_SET(i) (0x0000010B+(i)) /* RW-1A */
|
||||
#define NV_DPCD14_LINK_QUAL_LANE_SET__SIZE 4 /* R---S */
|
||||
#define NV_DPCD14_LINK_QUAL_LANE_SET_LQS 2:0 /* RWXUF */
|
||||
#define NV_DPCD14_LINK_QUAL_LANE_SET_LQS_CP2520PAT3 (0x00000007) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_FEC_CONFIGURATION (0x00000120) /* RWXUR */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_READY 0:0 /* RWXUF */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_READY_NO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_READY_YES (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL 3:1 /* RWXUF */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_FEC_ERROR_COUNT_DIS (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_UNCORRECTED_BLOCK_ERROR_COUNT (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_CORRECTED_BLOCK_ERROR_COUNT (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_BIT_ERROR_COUNT (0x00000003) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_PARITY_BLOCK_ERROR_COUNT (0x00000004) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_FEC_ERROR_COUNT_SEL_PARITY_BIT_ERROR_COUNT (0x00000005) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_LANE_SELECT 5:4 /* RWXUF */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_LANE_SELECT_LANE_0 (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_LANE_SELECT_LANE_1 (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_LANE_SELECT_LANE_2 (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_FEC_CONFIGURATION_LANE_SELECT_LANE_3 (0x00000003) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PHY_TEST_PATTERN (0x00000248) /* R-XUR */
|
||||
#define NV_DPCD14_PHY_TEST_PATTERN_SEL_CP2520PAT3 (0x00000007) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_DSC_CRC_0 (0x00000262) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_CRC_0_LOW_BYTE NV_DPCD14_DSC_CRC_0
|
||||
#define NV_DPCD14_DSC_CRC_0_HIGH_BYTE (0x00000263) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_CRC_1 (0x00000264) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_CRC_1_LOW_BYTE NV_DPCD14_DSC_CRC_1
|
||||
#define NV_DPCD14_DSC_CRC_1_HIGH_BYTE (0x00000265) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_CRC_2 (0x00000266) /* R-XUR */
|
||||
#define NV_DPCD14_DSC_CRC_2_LOW_BYTE NV_DPCD14_DSC_CRC_2
|
||||
#define NV_DPCD14_DSC_CRC_2_HIGH_BYTE (0x00000267) /* R-XUR */
|
||||
|
||||
#define NV_DPCD14_FEC_STATUS (0x00000280) /* R-XUR */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_EN_DETECTED 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_EN_DETECTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_EN_DETECTED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_DIS_DETECTED 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_DIS_DETECTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_STATUS_FEC_DECODE_DIS_DETECTED_YES (0x00000001) /* R-XUV */
|
||||
// Bits 7-2: RESERVED.
|
||||
#define NV_DPCD14_FEC_STATUS_CLEAR (0x00000001)
|
||||
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT (0x00000281) /* R-XUR */
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT_FEC_ERROR_COUNT_LOW_BYTE NV_DPCD14_FEC_ERROR_COUNT
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT_FEC_ERROR_COUNT_HIGH_BYTE (0x00000282) /* R-XUR */
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT_FEC_ERROR_COUNT_VALID 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT_FEC_ERROR_COUNT_VALID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_FEC_ERROR_COUNT_FEC_ERROR_COUNT_VALID_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// Field definitions for FW/SW Revision
|
||||
#define NV_DPCD14_FW_SW_REVISION_MAJOR (0x0000040A) /* R-XUR */
|
||||
#define NV_DPCD14_FW_SW_REVISION_MINOR (0x0000040B) /* R-XUR */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_REV (0x00002200) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_REV_MAJOR 7:4 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_REV_MAJOR_1 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_REV_MINOR 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_REV_MINOR_4 (0x00000004) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_MAX_LINK_BANDWIDTH (0x00002201) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LINK_BANDWIDTH_VAL 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LINK_BANDWIDTH_VAL_8_10_GBPS (0x0000001E) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT (0x00002202) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_LANE 4:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_LANE_1 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_LANE_2 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_LANE_4 (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_POST_LT_ADJ_REQ_SUPPORT 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_POST_LT_ADJ_REQ_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_POST_LT_ADJ_REQ_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_TPS3_SUPPORTED 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_TPS3_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_TPS3_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_ENHANCED_FRAMING 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_ENHANCED_FRAMING_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_LANE_COUNT_ENHANCED_FRAMING_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD (0x00002203) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_VAL 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_VAL_NONE (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_VAL_0_5_PCT (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_NO_AUX_HANDSHAKE_LT 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_NO_AUX_HANDSHAKE_LT_FALSE (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_NO_AUX_HANDSHAKE_LT_TRUE (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_TPS4_SUPPORTED 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_TPS4_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAX_DOWNSPREAD_TPS4_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// NORP = Number of Receiver Ports = Value + 1
|
||||
#define NV_DPCD14_EXTENDED_NORP (0x00002204) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_NORP_VAL 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_NORP_VAL_ONE (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_NORP_VAL_TWO (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_NORP_VAL_SST_MAX (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_NORP_DP_PWR_CAP_5V 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_NORP_DP_PWR_CAP_12V 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_NORP_DP_PWR_CAP_18V 7:7 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT (0x00002205) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_PRESENT 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_PRESENT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_PRESENT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_TYPE 2:1 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_TYPE_DISPLAYPORT (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_TYPE_ANALOG (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_TYPE_HDMI_DVI (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_TYPE_OTHERS (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_FORMAT_CONVERSION 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_FORMAT_CONVERSION_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_FORMAT_CONVERSION_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_DETAILED_CAP_INFO_AVAILABLE 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_DETAILED_CAP_INFO_AVAILABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWNSTREAMPORT_DETAILED_CAP_INFO_AVAILABLE_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_MAIN_LINK_CHANNEL_CODING (0x00002206) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_MAIN_LINK_CHANNEL_CODING_ANSI_8B_10B 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_MAIN_LINK_CHANNEL_CODING_ANSI_8B_10B_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_MAIN_LINK_CHANNEL_CODING_ANSI_8B_10B_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT (0x00002207) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_COUNT 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_MSA_TIMING_PAR_IGNORED 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_MSA_TIMING_PAR_IGNORED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_MSA_TIMING_PAR_IGNORED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_OUI_SUPPORT 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_OUI_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DOWN_STREAM_PORT_OUI_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORT0_CAP_0 (0x00002208) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORT1_CAP_0 (0x0000220A) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_LOCAL_EDID 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_LOCAL_EDID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_LOCAL_EDID_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_ASSO_TO_PRECEDING_PORT 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_ASSO_TO_PRECEDING_PORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_ASSO_TO_PRECEDING_PORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_HBLANK_EXPANSION_CAPABLE 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_HBLANK_EXPANSION_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_HBLANK_EXPANSION_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_UNIT 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_UNIT_PIXEL (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_UNIT_BYTE (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_PER_PORT 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_PER_PORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_0_BUFFER_SIZE_PER_PORT_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORT0_CAP_1 (0x00002209) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORT1_CAP_1 (0x0000220B) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_RECEIVE_PORTX_CAP_1_BUFFER_SIZE 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP (0x0000220C) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_1K (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_5K (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_10K (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_100K (0x00000008) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_400K (0x00000010) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_I2C_CTRL_CAP_SPEED_1M (0x00000020) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_EDP_CONFIG_CAP (0x0000220D) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_EDP_CONFIG_CAP_ALTERNATE_SCRAMBLER_RESET 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_EDP_CONFIG_CAP_ALTERNATE_SCRAMBLER_RESET_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_EDP_CONFIG_CAP_ALTERNATE_SCRAMBLER_RESET_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL (0x0000220E) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL 6:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL_DEFAULT (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL_4MS (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL_8MS (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL_12MS (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_VAL_16MS (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_EXTENDED_RECEIVER_CAP 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_EXTENDED_RECEIVER_CAP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_TRAINING_AUX_RD_INTERVAL_EXTENDED_RECEIVER_CAP_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP (0x0000220F) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_FORCE_LOAD_SENSE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_FORCE_LOAD_SENSE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_FORCE_LOAD_SENSE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_ALT_I2C_PATTERN 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_ALT_I2C_PATTERN_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_ADAPTER_CAP_ALT_I2C_PATTERN_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST (0x00002210) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_GTC_CAP 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_GTC_CAP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_GTC_CAP_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_AV_SYNC_CAP 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_AV_SYNC_CAP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_AV_SYNC_CAP_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_SDP_EXT_FOR_COLORIMETRY 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_SDP_EXT_FOR_COLORIMETRY_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_SDP_EXT_FOR_COLORIMETRY_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP_CHAINING 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP_CHAINING_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_VESA_SDP_CHAINING_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP_CHAINING 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP_CHAINING_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_FEATURE_ENUM_LIST_VSC_EXT_CTA_SDP_CHAINING_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST (0x00002211) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_1MS (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_20MS (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_40MS (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_60MS (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_80MS (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_EXTENDED_DPRX_SLEEP_WAKE_TIMEOUT_REQUEST_PERIOD_100MS (0x00000005) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_VSC_EXT_VESA_SDP_MAX_CHAINING (0x00002212) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_VSC_EXT_VESA_SDP_MAX_CHAINING_VAL 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_EXTENDED_VSC_EXT_CTA_SDP_MAX_CHAINING (0x00002213) /* R-XUR */
|
||||
#define NV_DPCD14_EXTENDED_VSC_EXT_CTA_SDP_MAX_CHAINING_VAL 7:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST (0x00002214) /* R-XUR */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_ADAPTIVE_SYNC_SDP_SUPPORTED 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_ADAPTIVE_SYNC_SDP_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_ADAPTIVE_SYNC_SDP_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_VSC_EXT_FRAMEWORK_V1_SUPPORTED 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_VSC_EXT_FRAMEWORK_V1_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_DPRX_FEATURE_ENUM_LIST_VSC_EXT_FRAMEWORK_V1_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR (0x00003030) /* R-XUR */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_REPORTING 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_REPORTING_NOT_SUPPORTED (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_REPORTING_SUPPORTED (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_TMDS_LINK_CLOCK_DATA_NOTIFICATION 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_TMDS_LINK_CLOCK_DATA_NOTIFICATION_NOT_SUPPORTED (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_TMDS_LINK_CLOCK_DATA_NOTIFICATION_SUPPORTED (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH(i) (0x00003031+(i)) /* R-XUR */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_THREE_ERRORS 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_THREE_ERRORS_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_THREE_ERRORS_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_TEN_ERRORS 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_TEN_ERRORS_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_TEN_ERRORS_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_HUNDRED_ERRORS 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_HUNDRED_ERRORS_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_HUNDRED_ERRORS_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_CLOCK_DATA_STATUS 5:4 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_CLOCK_DATA_STATUS_BOTH_LOCKED (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_CLOCK_DATA_STATUS_CLOCK_LOCKED (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_HDMI_ERROR_STATUS_CH_CLOCK_DATA_STATUS_NONE_LOCKED (0x00000002) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS (0x00003036) /* R-XUR */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_MODE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_MODE_TMDS (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_MODE_FRL (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RESULT 6:1 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_9G 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_9G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_9G_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_18G 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_18G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_18G_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_24G 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_24G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_24G_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_32G 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_32G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_32G_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_40G 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_40G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_40G_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_48G 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_48G_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_LINK_CONFIG_STATUS_LT_RES_48G_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE(i) (0x00003037+(i)) /* RW-1A */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE__SIZE 4 /* R---S */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE_COUNT 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE_COUNT_ZERO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE_COUNT_THREE (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE_COUNT_TEN (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_DOWNSTREAM_LINK_ERROR_LANE_COUNT_HUNDRED (0x00000004) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS (0x0000303B) /* R-XUR */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_ACTIVE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_ACTIVE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_ACTIVE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_READY 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_READY_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PCON_HDMI_TX_LINK_STATUS_LINK_READY_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PCON_CONTROL_0 (0x00003050) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_CONTROL_0_OUTPUT_CONFIG 0:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_0_OUTPUT_CONFIG_DVI (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_0_OUTPUT_CONFIG_HDMI (0x00000001) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PCON_CONTROL_1 (0x00003051) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_CONVERT_YCBCR420 0:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_CONVERT_YCBCR420_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_CONVERT_YCBCR420_ENABLE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_EDID_PROCESS 1:1 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_EDID_PROCESS_NO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_EDID_PROCESS_YES (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_AUTO_SCRAMBLING 2:2 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_AUTO_SCRAMBLING_NO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_AUTO_SCRAMBLING_YES (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_FORCE_SCRAMBLING 3:3 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_FORCE_SCRAMBLING_NO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_1_DISABLE_HDMI_FORCE_SCRAMBLING_YES (0x00000001) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PCON_CONTROL_2 (0x00003052) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_CONTROL_2_CONVERT_YCBCR422 0:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_2_CONVERT_YCBCR422_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_2_CONVERT_YCBCR422_ENABLE (0x00000001) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PCON_CONTROL_3 (0x00003053) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_CONTROL_3_COMPONENT_BIT_DEPTH 1:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_CONTROL_3_COMPONENT_BIT_DEPTH_SAME_AS_INC (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_3_COMPONENT_BIT_DEPTH_8BPC (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_3_COMPONENT_BIT_DEPTH_10BPC (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_CONTROL_3_COMPONENT_BIT_DEPTH_12BPC (0x00000003) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_OUTPUT_HTOTAL_LOW (0x00003054) /* RWXUR */
|
||||
#define NV_DPCD14_OUTPUT_HTOTAL_HIGH (0x00003055) /* RWXUR */
|
||||
|
||||
#define NV_DPCD14_OUTPUT_HSTART_LOW (0x00003056) /* RWXUR */
|
||||
#define NV_DPCD14_OUTPUT_HSTART_HIGH (0x00003057) /* RWXUR */
|
||||
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_LOW (0x00003056) /* RWXUR */
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_HIGH (0x00003057) /* RWXUR */
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_HIGH_VAL 6:0 /* RWXUF */
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_HIGH_OUTPUT_HSP 7:7 /* RWXUF */
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_HIGH_OUTPUT_HSP_POSITIVE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_OUTPUT_HSP_HSW_HIGH_OUTPUT_HSP_NEGATIVE (0x00000001) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1 (0x0000305A) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW 2:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_ZERO (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_9G (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_18G (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_24G (0x00000003) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_32G (0x00000004) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_40G (0x00000005) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_MAX_LINK_BW_48G (0x00000006) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_SRC_CONTROL_MODE 3:3 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_SRC_CONTROL_MODE_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_SRC_CONTROL_MODE_ENABLE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_CONCURRENT_LT_MODE 4:4 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_CONCURRENT_LT_MODE_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_CONCURRENT_LT_MODE_ENABLE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_LINK_FRL_MODE 5:5 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_LINK_FRL_MODE_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_LINK_FRL_MODE_ENABLE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_IRQ_LINK_FRL_MODE 6:6 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_IRQ_LINK_FRL_MODE_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_IRQ_LINK_FRL_MODE_ENABLE (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_HDMI_LINK 7:7 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_HDMI_LINK_DISABLE (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_1_HDMI_LINK_ENABLE (0x00000001) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2 (0x0000305B) /* RWXUR */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK 5:0 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_9G (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_18G (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_24G (0x00000004) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_32G (0x00000008) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_40G (0x00000010) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_LINK_BW_MASK_48G (0x00000020) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_FRL_LT_CONTROL 6:6 /* RWXUF */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_FRL_LT_CONTROL_NORMAL (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_PCON_FRL_LINK_CONFIG_2_FRL_LT_CONTROL_EXTENDED (0x00000001) /* RWXUV */
|
||||
|
||||
// LT Tunable Repeater Related offsets
|
||||
|
||||
#define NV_DPCD14_LT_TUNABLE_PHY_REPEATER_REV (0x000F0000) /* R-XUR */
|
||||
#define NV_DPCD14_LT_TUNABLE_PHY_REPEATER_REV_MINOR 3:0 /* R-XUF */
|
||||
#define NV_DPCD14_LT_TUNABLE_PHY_REPEATER_REV_MINOR_0 (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_LT_TUNABLE_PHY_REPEATER_REV_MAJOR 7:4 /* R-XUF */
|
||||
#define NV_DPCD14_LT_TUNABLE_PHY_REPEATER_REV_MAJOR_1 (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER (0x000F0001) /* R-XUR */
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER_VAL 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER_VAL_1_62_GBPS (0x00000006) /* R-XUV */
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER_VAL_2_70_GBPS (0x0000000A) /* R-XUV */
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER_VAL_5_40_GBPS (0x00000014) /* R-XUV */
|
||||
#define NV_DPCD14_MAX_LINK_RATE_PHY_REPEATER_VAL_8_10_GBPS (0x0000001E) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT (0x000F0002) /* R-XUR */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL 7:0 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_0 (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_1 (0x00000080) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_2 (0x00000040) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_3 (0x00000020) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_4 (0x00000010) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_5 (0x00000008) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_6 (0x00000004) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_7 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_VAL_8 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_CNT_MAX 6
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_MODE (0x000F0003) /* R-XUR */
|
||||
#define NV_DPCD14_PHY_REPEATER_MODE_VAL_TRANSPARENT (0x00000055) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_MODE_VAL_NON_TRANSPARENT (0x000000AA) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_MAX_LANE_COUNT_PHY_REPEATER (0x000F0004) /* R-XUR */
|
||||
#define NV_DPCD14_MAX_LANE_COUNT_PHY_REPEATER_VAL 4:0 /* R-XUF */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_EXTENDED_WAKE_TIMEOUT (0x000F0005) /* RWXUR */
|
||||
#define NV_DPCD14_PHY_REPEATER_EXTENDED_WAKE_TIMEOUT_REQ 6:0 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_EXTENDED_WAKE_TIMEOUT_GRANT 7:7 /* RWXUF */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_START(i) (0x000F0010+(i)*0x50) /* RW-1A */
|
||||
#define NV_DPCD14_PHY_REPEATER_START__SIZE 8 /* R---S */
|
||||
// Following defines are offsets
|
||||
#define NV_DPCD14_TRAINING_PATTERN_SET_PHY_REPEATER (0x00000000) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_LANE0_SET_PHY_REPEATER (0x00000001) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_LANE1_SET_PHY_REPEATER (0x00000002) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_LANE2_SET_PHY_REPEATER (0x00000003) /* RWXUV */
|
||||
#define NV_DPCD14_TRAINING_LANE3_SET_PHY_REPEATER (0x00000004) /* RWXUV */
|
||||
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER (0x00000010) /* R-XUR */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER_VAL 6:0 /* R-XUF */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER_VAL_4MS (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER_VAL_8MS (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER_VAL_12MS (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD14_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER_VAL_16MS (0x00000004) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER (0x00000011) /* R-XUR */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_VOLTAGE_SWING_3 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_VOLTAGE_SWING_3_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_VOLTAGE_SWING_3_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_PRE_EMPHASIS_3 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_PRE_EMPHASIS_3_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_TRANSMITTER_CAP_PHY_REPEATER_PRE_EMPHASIS_3_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_LANE0_1_STATUS_PHY_REPEATER (0x00000020) /* R-XUR */
|
||||
#define NV_DPCD14_LANE2_3_STATUS_PHY_REPEATER (0x00000021) /* R-XUR */
|
||||
#define NV_DPCD14_LANE_ALIGN_STATUS_UPDATED_PHY_REPEATER (0x00000022) /* R-XUR */
|
||||
#define NV_DPCD14_ADJUST_REQUEST_LANE0_1_PHY_REPEATER (0x00000023) /* R-XUR */
|
||||
#define NV_DPCD14_ADJUST_REQUEST_LANE2_3_PHY_REPEATER (0x00000024) /* R-XUR */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC__SIZE NV_DPCD14_PHY_REPEATER_CNT_MAX /* R---S */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS(i) (0x000F0290+(i)*8) /* R--1A */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_EN_DETECTED 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_EN_DETECTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_EN_DETECTED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_DIS_DETECTED 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_DIS_DETECTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_DECODE_DIS_DETECTED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_RUNNING_INDICATOR 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_RUNNING_INDICATOR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_STATUS_FEC_RUNNING_INDICATOR_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT(i) (0x000F0291+(i)*8) /* R--2A */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT_LOW_BYTE(i) (NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT(i))
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT_HIGH_BYTE(i) ((0x000F0292+(i)*8)) /* R-XUR */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT_VALID 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT_VALID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_ERR_COUNT_VALID_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0(i) (0x000F0294+(i)*8) /* R--1A */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_CAPABLE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE 1:1 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_UNCORRECTED_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_CORRECTED_BLOCK_ERROR_COUNT_CAPABLE 2:2 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0CORRECTED_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_CORRECTED_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_BIT_ERROR_COUNT_CAPABLE 3:3 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_BIT_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_BIT_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_BLOCK_ERROR_COUNT_CAPABLE 4:4 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_BLOCK_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_BLOCK_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_ERROR_COUNT_CAPABLE 5:5 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_ERROR_COUNT_CAPABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_PARITY_ERROR_COUNT_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_RUNNING_INDICATOR_SUPPORT 6:6 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_RUNNING_INDICATOR_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_RUNNING_INDICATOR_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_ERROR_REPORTING_POLICY_SUPPORTED 7:7 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_ERROR_REPORTING_POLICY_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_0_FEC_ERROR_REPORTING_POLICY_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_1(i) (0x000F0295+(i)*8) /* R--1A */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_1_AGGREGATE_ERR_COUNT_CAPABLE 0:0 /* R-XUF */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_1_AGGREGATE_ERR_COUNT_CAPABLE_CAPABLE_N (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD14_PHY_REPEATER_FEC_CAP_1_AGGREGATE_ERR_COUNT_CAPABLE_CAPABLE_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// BRANCH SPECIFIC DSC CAPS
|
||||
#define NV_DPCD14_BRANCH_DSC_OVERALL_THROUGHPUT_MODE_0 (0x000000A0)
|
||||
#define NV_DPCD14_BRANCH_DSC_OVERALL_THROUGHPUT_MODE_0_VALUE 7:0
|
||||
|
||||
#define NV_DPCD14_BRANCH_DSC_OVERALL_THROUGHPUT_MODE_1 (0x000000A1)
|
||||
#define NV_DPCD14_BRANCH_DSC_OVERALL_THROUGHPUT_MODE_1_VALUE 7:0
|
||||
|
||||
#define NV_DPCD14_BRANCH_DSC_MAXIMUM_LINE_BUFFER_WIDTH (0x000000A2)
|
||||
#define NV_DPCD14_BRANCH_DSC_MAXIMUM_LINE_BUFFER_WIDTH_VALUE 7:0
|
||||
|
||||
#endif // #ifndef _DISPLAYPORT14_H_
|
||||
|
||||
198
src/common/inc/displayport/dpcd20.h
Normal file
198
src/common/inc/displayport/dpcd20.h
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _DISPLAYPORT20_H_
|
||||
#define _DISPLAYPORT20_H_
|
||||
#include "nvcfg_sdk.h"
|
||||
|
||||
// DSC Pass Through related DPCD. New bits in DPCD 0x0060h defined in DPCD2.0.
|
||||
#define NV_DPCD20_DSC_SUPPORT_PASS_THROUGH 1:1 /* R-XUF */
|
||||
#define NV_DPCD20_DSC_SUPPORT_PASS_THROUGH_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DSC_SUPPORT_PASS_THROUGH_YES (0x00000001) /* R-XUV */
|
||||
// DSC Pass Through related DPCD. New bits in DPCD 0x0160h defined in DPCD2.0.
|
||||
#define NV_DPCD20_DSC_ENABLE_PASS_THROUGH 1:1 /* R-XUF */
|
||||
#define NV_DPCD20_DSC_ENABLE_PASS_THROUGH_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DSC_ENABLE_PASS_THROUGH_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// DSC Dynamic PPS related DPCD. New bits in DPCD 0x0060h defined in DPCD2.0.
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_COMPRESSED_TO_COMPRESSED 2:2
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_COMPRESSED_TO_COMPRESSED_NO (0x00000000)
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_COMPRESSED_TO_COMPRESSED_YES (0x00000001)
|
||||
|
||||
// DSC Dynamic PPS related DPCD. New bits in DPCD 0x0060h defined in DPCD2.0.
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_UNCOMPRESSED_TO_FROM_COMPRESSED 3:3
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_UNCOMPRESSED_TO_FROM_COMPRESSED_NO (0x00000000)
|
||||
#define NV_DPCD20_DSC_SUPPORT_DYNAMIC_PPS_UNCOMPRESSED_TO_FROM_COMPRESSED_YES (0x00000001)
|
||||
|
||||
// PANEL REPLAY RELATED DPCD
|
||||
#define NV_DPCD20_PANEL_REPLAY_CAPABILITY (0x000000B0) /* R-XUR */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CAPABILITY_SUPPORTED 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CAPABILITY_SUPPORTED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CAPABILITY_SUPPORTED_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION (0x000001B0) /* R-XUR */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_PR_MODE 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_PR_MODE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_PR_MODE_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_CRC 1:1 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_CRC_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_ENABLE_CRC_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_ADAPTIVE_SYNC_SDP_MISSING 2:2 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_ADAPTIVE_SYNC_SDP_MISSING_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_ADAPTIVE_SYNC_SDP_MISSING_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_SDP_UNCORRECTABLE_ERROR 3:3 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_SDP_UNCORRECTABLE_ERROR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_SDP_UNCORRECTABLE_ERROR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_STORAGE_ERRORS 4:4 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_STORAGE_ERRORS_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_STORAGE_ERRORS_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_ACTIVE_FRAME_CRC_ERROR 5:5 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_ACTIVE_FRAME_CRC_ERROR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_CONFIGURATION_HPD_RFB_ACTIVE_FRAME_CRC_ERROR_YES (0x00000001) /* R-XUV */
|
||||
|
||||
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS (0x00002020) /* R-XUR */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ACTIVE_FRAME_CRC_ERROR 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ACTIVE_FRAME_CRC_ERROR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ACTIVE_FRAME_CRC_ERROR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_RFB_STORAGE_ERROR 1:1 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_RFB_STORAGE_ERROR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_RFB_STORAGE_ERROR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_VSC_SDP_UNCORRECTABLE_ERROR 2:2 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_VSC_SDP_UNCORRECTABLE_ERROR_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_VSC_SDP_UNCORRECTABLE_ERROR_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ADAPTIVE_SYNC_SDP_MISSING 3:3 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ADAPTIVE_SYNC_SDP_MISSING_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_ERROR_STATUS_ADAPTIVE_SYNC_SDP_MISSING_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS (0x00002022) /* R-XUR */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_PR_STATUS 2:0 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_PR_STATUS_STATE_0 (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_PR_STATUS_STATE_1 (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_PR_STATUS_STATE_2 (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_PR_STATUS_STATE_ERROR (0x00000007) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED 4:3 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_LOCKED (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_COASTING (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_GOVERNING (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_RELOCKING (0x00000003) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_VALID 5:5 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_VALID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_AND_FRAME_LOCK_STATUS_SINK_FRAME_LOCKED_VALID_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO (0x00002024) /* R-XUR */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_STATE 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_STATE_INACTIVE (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_STATE_ACTIVE (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_CRC_VALID 2:2 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_CRC_VALID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_CRC_VALID_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_SU_COORDINATE_VALID 3:3 /* R-XUF */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_SU_COORDINATE_VALID_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PANEL_REPLAY_DEBUG_LAST_VSC_SDP_CARRYING_PR_INFO_SU_COORDINATE_VALID_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_PHY_REPEATER_ALPM_CAPS (0x000F0009) /* R-XUR */
|
||||
#define NV_DPCD20_PHY_REPEATER_ALPM_CAPS_AUX_LESS 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_PHY_REPEATER_ALPM_CAPS_AUX_LESS_NOT_SUPPORTED (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_PHY_REPEATER_ALPM_CAPS_AUX_LESS_SUPPORTED (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_PHY_REPEATER_TOTAL_LTTPR_CNT (0x000F000A) /* RWXUR */
|
||||
#define NV_DPCD20_PHY_REPEATER_TOTAL_LTTPR_CNT_VAL 7:0 /* R-XUF */
|
||||
|
||||
|
||||
//
|
||||
// Adding DPCD registers for DP Tunneling feature.
|
||||
//
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES (0x000E000D) /* R-XUR */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPTUNNELING_SUPPORT 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPTUNNELING_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPTUNNELING_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_PANEL_REPLAY_TUNNELING_OPTIMIZATION_SUPPORT 6:6 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_PANEL_REPLAY_TUNNELING_OPTIMIZATION_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_PANEL_REPLAY_TUNNELING_OPTIMIZATION_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPIN_BW_ALLOCATION_MODE_SUPPORT 7:7 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPIN_BW_ALLOCATION_MODE_SUPPORT_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_CAPABILITIES_DPIN_BW_ALLOCATION_MODE_SUPPORT_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// DPCD Registers for DPRX Event Status Indicator Field
|
||||
#define NV_DPCD20_LINK_SERVICE_IRQ_VECTOR_ESI0 (0x00002005) /* R-XUR */
|
||||
#define NV_DPCD20_LINK_SERVICE_IRQ_VECTOR_ESI0_DP_TUNNELING_IRQ 5:5 /* R-XUF */
|
||||
#define NV_DPCD20_LINK_SERVICE_IRQ_VECTOR_ESI0_DP_TUNNELING_IRQ_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_LINK_SERVICE_IRQ_VECTOR_ESI0_DP_TUNNELING_IRQ_YES (0x00000001) /* R-XUV */
|
||||
|
||||
// DPCD Registers for DP IN BW Allocation
|
||||
#define NV_DPCD20_USB4_DRIVER_BW_CAPABILITY (0x000E0020) /* R-XUR */
|
||||
#define NV_DPCD20_USB4_DRIVER_BW_ALLOCATION 7:7 /* R-XUF */
|
||||
#define NV_DPCD20_USB4_DRIVER_BW_ALLOCATION_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_USB4_DRIVER_BW_ALLOCATION_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNEL_BW_GRANULARITY (0x000E0022) /* R-XUR */
|
||||
#define NV_DPCD20_DP_TUNNEL_BW_GRANULARITY_VAL 1:0 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNEL_BW_GRANULARITY_VAL_0_25_GBPS (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_BW_GRANULARITY_VAL_0_50_GBPS (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNEL_BW_GRANULARITY_VAL_1_00_GBPS (0x00000002) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNEL_ESTIMATED_BW (0x000E0023) /* R-XUR */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNEL_ALLOCATED_BW (0x000E0024) /* R-XUR */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNEL_REQUESTED_BW (0x000E0031) /* R-XUR */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNELING_STATUS (0x000E0025) /* R-XUR */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_FAILED 0:0 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_FAILED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_FAILED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_SUCCEEDED 1:1 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_SUCCEEDED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_REQUEST_SUCCEEDED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_ESTIMATED_BW_CHANGED 2:2 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_ESTIMATED_BW_CHANGED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_ESTIMATED_BW_CHANGED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_ALLOCATION_CAPABILITY_CHANGED 3:3 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_ALLOCATION_CAPABILITY_CHANGED_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_BW_ALLOCATION_CAPABILITY_CHANGED_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_EXIT_DISCOVERY_MODE 4:4 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_EXIT_DISCOVERY_MODE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_EXIT_DISCOVERY_MODE_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE (0x000E0028) /* R-XUR */
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE_VAL 7:0 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE_VAL_1_62_GBPS (0x00000006) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE_VAL_2_70_GBPS (0x0000000A) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE_VAL_5_40_GBPS (0x00000014) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_8B10B_MAX_LINK_RATE_VAL_8_10_GBPS (0x0000001E) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_DP_TUNNELING_MAX_LANE_COUNT (0x000E0029) /* R-XUR */
|
||||
#define NV_DPCD20_DP_TUNNELING_MAX_LANE_COUNT_LANE 7:0 /* R-XUF */
|
||||
#define NV_DPCD20_DP_TUNNELING_MAX_LANE_COUNT_LANE_ONE (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_MAX_LANE_COUNT_LANE_TWO (0x00000002) /* R-XUV */
|
||||
#define NV_DPCD20_DP_TUNNELING_MAX_LANE_COUNT_LANE_FOUR (0x00000004) /* R-XUV */
|
||||
|
||||
#define NV_DPCD20_DPTX_BW_ALLOCATION_MODE_CONTROL (0x000E0030) /* R-XUR */
|
||||
#define NV_DPCD20_DPTX_UNMASK_BW_ALLOCATION_IRQ 6:6 /* R-XUF */
|
||||
#define NV_DPCD20_DPTX_UNMASK_BW_ALLOCATION_IRQ_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DPTX_UNMASK_BW_ALLOCATION_IRQ_YES (0x00000001) /* R-XUV */
|
||||
#define NV_DPCD20_DPTX_DISPLAY_DRIVER_BW_ALLOCATION_MODE_ENABLE 7:7 /* R-XUF */
|
||||
#define NV_DPCD20_DPTX_DISPLAY_DRIVER_BW_ALLOCATION_MODE_ENABLE_NO (0x00000000) /* R-XUV */
|
||||
#define NV_DPCD20_DPTX_DISPLAY_DRIVER_BW_ALLOCATION_MODE_ENABLE_YES (0x00000001) /* R-XUV */
|
||||
|
||||
#endif // #ifndef _DISPLAYPORT20_H_
|
||||
54
src/common/inc/gps.h
Normal file
54
src/common/inc/gps.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2011-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef GPS_H
|
||||
#define GPS_H
|
||||
|
||||
#define GPS_REVISION_ID 0x00000100
|
||||
#define GPS_2X_REVISION_ID 0x00000200
|
||||
|
||||
#define GPS_FUNC_SUPPORT 0x00000000 // Bit list of supported functions
|
||||
#define GPS_FUNC_GETOBJBYTYPE 0x00000010 // Fetch any specific Object by Type
|
||||
#define GPS_FUNC_GETALLOBJS 0x00000011 // Fetch all Objects
|
||||
#define GPS_FUNC_REQUESTDXSTATE 0x00000012 // Request D-Notifier state
|
||||
#define GPS_FUNC_GETCALLBACKS 0x00000013 // Get system requested callbacks
|
||||
#define GPS_FUNC_PCONTROL 0x0000001C // GPU power control function
|
||||
#define GPS_FUNC_PSHARESTATUS 0x00000020 // Get system requested Power Steering settings
|
||||
#define GPS_FUNC_GETPSS 0x00000021 // Get _PSS object
|
||||
#define GPS_FUNC_SETPPC 0x00000022 // Set _PPC object
|
||||
#define GPS_FUNC_GETPPC 0x00000023 // Get _PPC object
|
||||
#define GPS_FUNC_GETPPL 0x00000024 // Get CPU package power limits
|
||||
#define GPS_FUNC_SETPPL 0x00000025 // Set CPU package power limits
|
||||
#define GPS_FUNC_GETTRL 0x00000026 // Get CPU turbo ratio limits
|
||||
#define GPS_FUNC_SETTRL 0x00000027 // Set CPU turbo ratio limits
|
||||
#define GPS_FUNC_GETPPM 0x00000028 // Get system power modes
|
||||
#define GPS_FUNC_SETPPM 0x00000029 // Set system power modes
|
||||
#define GPS_FUNC_PSHAREPARAMS 0x0000002A // Get sensor information and capabilities
|
||||
#define GPS_FUNC_SETEDPPLIMITINFO 0x0000002B // Send the GPU EDPPeak limit info to platform
|
||||
#define GPS_FUNC_GETEDPPLIMIT 0x0000002C // Get EDPPeak limit from platform
|
||||
|
||||
#define GPS_EVENT_STATUS_CHANGE 0x000000C0 // when received call GPS_FUNC_PCONTROL,
|
||||
// depends on whether system is GPS enabled.
|
||||
|
||||
#endif // GPS_H
|
||||
|
||||
86
src/common/inc/hdmi_spec.h
Normal file
86
src/common/inc/hdmi_spec.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2019 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _HDMI_SPEC_H_
|
||||
#define _HDMI_SPEC_H_
|
||||
|
||||
/**************** Resource Manager Defines and Structures ******************\
|
||||
* *
|
||||
* Module: HDMI_SPEC.H *
|
||||
* Defines Common HDMI flags *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
/*
|
||||
* RM will be moving to separate packet types for DP and HDMI
|
||||
* since the SDP packet type differ between HDMI and DP. Going forward
|
||||
* clients are expected to use the respective packet type. Once all the
|
||||
* clients move to the new data types, we can remove the redundant
|
||||
* PACKET_TYPE definition.
|
||||
*/
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
pktType_AudioClkRegeneration = 0x01,
|
||||
pktType_GeneralControl = 0x03,
|
||||
pktType_GamutMetadata = 0x0a,
|
||||
pktType_SRInfoFrame = 0x7f, // Self refresh infoframe for eDP enter/exit self refresh, SRS 1698
|
||||
pktType_Cea861BInfoFrame = 0x80,
|
||||
pktType_VendorSpecInfoFrame = 0x81,
|
||||
pktType_AviInfoFrame = 0x82,
|
||||
pktType_AudioInfoFrame = 0x84,
|
||||
pktType_SrcProdDescInfoFrame = 0x83,
|
||||
pktType_MpegSrcInfoFrame = 0x85,
|
||||
pktType_DynamicRangeMasteringInfoFrame = 0x87
|
||||
} PACKET_TYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
hdmi_pktType_AudioClkRegeneration = 0x01,
|
||||
hdmi_pktType_GeneralControl = 0x03,
|
||||
hdmi_pktType_GamutMetadata = 0x0a,
|
||||
hdmi_pktType_ExtendedMetadata = 0x7f,
|
||||
hdmi_pktType_Cea861BInfoFrame = 0x80,
|
||||
hdmi_pktType_VendorSpecInfoFrame = 0x81,
|
||||
hdmi_pktType_AviInfoFrame = 0x82,
|
||||
hdmi_pktType_AudioInfoFrame = 0x84,
|
||||
hdmi_pktType_SrcProdDescInfoFrame = 0x83,
|
||||
hdmi_pktType_MpegSrcInfoFrame = 0x85,
|
||||
hdmi_pktType_DynamicRangeMasteringInfoFrame = 0x87
|
||||
} HDMI_PACKET_TYPE;
|
||||
|
||||
|
||||
#define HDMI_PKT_HDR_SIZE 3
|
||||
|
||||
#define HDMI_PKT_AVI_NUM_DBYTES 14
|
||||
#define HDMI_PKT_AUDIO_NUM_DBYTES 11
|
||||
#define HDMI_PKT_GENCTRL_NUM_DBYTES 7
|
||||
#define HDMI_PKT_ACR_NUM_DBYTES 7
|
||||
#define HDMI_PKT_GAMUT_METADATA_NUM_DBYTES 28
|
||||
#define HDMI_PKT_VS_MAX_NUM_DBYTES 28
|
||||
|
||||
#define HDMI_GENCTRL_PACKET_MUTE_ENABLE 0x01
|
||||
#define HDMI_GENCTRL_PACKET_MUTE_DISABLE 0x10
|
||||
|
||||
#endif // #ifndef _HDMI_SPEC_H_
|
||||
115
src/common/inc/jt.h
Normal file
115
src/common/inc/jt.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2012-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef JT_H
|
||||
#define JT_H
|
||||
|
||||
//
|
||||
// JT ACPI _DSM method related definitions
|
||||
//
|
||||
#define JT_REVISION_ID 0x00000103 // Revision number
|
||||
|
||||
// subfunction 0 is common use: NV_ACPI_ALL_FUNC_SUPPORT
|
||||
// #define JT_FUNC_SUPPORT 0x00000000 // Function is supported?
|
||||
#define JT_FUNC_CAPS 0x00000001 // Capabilities
|
||||
#define JT_FUNC_POLICYSELECT 0x00000002 // Query Policy Selector Status (reserved for future use)
|
||||
#define JT_FUNC_POWERCONTROL 0x00000003 // dGPU Power Control
|
||||
#define JT_FUNC_PLATPOLICY 0x00000004 // Query the Platform Policies (reserved for future use)
|
||||
#define JT_FUNC_DISPLAYSTATUS 0x00000005 // Query the Display Hot-Key
|
||||
#define JT_FUNC_MDTL 0x00000006 // Display Hot-Key Toggle List
|
||||
|
||||
//
|
||||
// JT_FUNC_CAPS return buffer definitions
|
||||
//
|
||||
#define NV_JT_FUNC_CAPS_JT_ENABLED 0:0
|
||||
#define NV_JT_FUNC_CAPS_JT_ENABLED_FALSE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_JT_ENABLED_TRUE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_NVSR_ENABLED 2:1
|
||||
#define NV_JT_FUNC_CAPS_NVSR_ENABLED_TRUE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_NVSR_ENABLED_FALSE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_PPR 4:3
|
||||
#define NV_JT_FUNC_CAPS_PPR_GC6 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_PPR_GC6S3SR 0x00000002
|
||||
#define NV_JT_FUNC_CAPS_SRPR 5:5
|
||||
#define NV_JT_FUNC_CAPS_SRPR_PANEL 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_SRPR_SUSPEND 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_FBPR 7:6
|
||||
#define NV_JT_FUNC_CAPS_FBPR_GC6_ON 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_FBPR_GC6_S3 0x00000002
|
||||
#define NV_JT_FUNC_CAPS_GPR 9:8
|
||||
#define NV_JT_FUNC_CAPS_GPR_COMBINED 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_GPR_PERGPU 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_GCR 10:10
|
||||
#define NV_JT_FUNC_CAPS_GCR_EXTERNAL 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_GCR_INTEGRATED 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_PTH_ENABLED 11:11
|
||||
#define NV_JT_FUNC_CAPS_PTH_ENABLED_YES 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_PTH_ENABLED_NO 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_NOT 12:12
|
||||
#define NV_JT_FUNC_CAPS_NOT_GC6DONE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_NOT_LINKCHANGE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_MSHYB_ENABLED 13:13
|
||||
#define NV_JT_FUNC_CAPS_MSHYB_ENABLED_FALSE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_MSHYB_ENABLED_TRUE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_RPC 14:14
|
||||
#define NV_JT_FUNC_CAPS_RPC_DEFAULT 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_RPC_FINEGRAIN 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_GC6V 16:15
|
||||
#define NV_JT_FUNC_CAPS_GC6V_GC6E 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_GC6V_GC6A 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_GC6V_GC6R 0x00000002
|
||||
#define NV_JT_FUNC_CAPS_GEI_ENABLED 17:17
|
||||
#define NV_JT_FUNC_CAPS_GEI_ENABLED_FALSE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_GEI_ENABLED_TRUE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_GSW_ENABLED 18:18
|
||||
#define NV_JT_FUNC_CAPS_GSW_ENABLED_FALSE 0x00000000
|
||||
#define NV_JT_FUNC_CAPS_GSW_ENABLED_TRUE 0x00000001
|
||||
#define NV_JT_FUNC_CAPS_REVISION_ID 31:20
|
||||
#define NV_JT_FUNC_CAPS_REVISION_ID_1_00 0x00000100
|
||||
#define NV_JT_FUNC_CAPS_REVISION_ID_1_01 0x00000101
|
||||
#define NV_JT_FUNC_CAPS_REVISION_ID_1_03 0x00000103
|
||||
#define NV_JT_FUNC_CAPS_REVISION_ID_2_00 0x00000200
|
||||
|
||||
//
|
||||
// JT_FUNC_POWERCONTROL argument definitions (Rev 1.0)
|
||||
//
|
||||
|
||||
//
|
||||
// GPU Power Control
|
||||
//
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_POWER_CONTROL 2:0
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_POWER_CONTROL_GSS 0x00000000
|
||||
//
|
||||
// JT_FUNC_POWERCONTROL return buffer definitions
|
||||
//
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE 2:0
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_TRANSITION 0x00000000
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_ON 0x00000001
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_OFF 0x00000002
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_GC6 0x00000003
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE 3:3
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE_OFF 0x00000000
|
||||
#define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE_PWOK 0x00000001
|
||||
|
||||
#endif // JT_H
|
||||
|
||||
36
src/common/inc/nvBinSegment.h
Normal file
36
src/common/inc/nvBinSegment.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef NVBINSEGMENT_H
|
||||
#define NVBINSEGMENT_H
|
||||
|
||||
#define PUSH_SEGMENTS
|
||||
#define POP_SEGMENTS
|
||||
#define CODE_SEGMENT(__seg)
|
||||
#define DATA_SEGMENT(__seg)
|
||||
#define BSS_SEGMENT(__seg)
|
||||
#define CONS_SEGMENT(__seg)
|
||||
#define PAGE_SEGMENT
|
||||
#define NONPAGE_SEGMENT
|
||||
|
||||
#endif // NVBINSEGMENT_H
|
||||
73
src/common/inc/nvBldVer.h
Normal file
73
src/common/inc/nvBldVer.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifndef _NVBLDVER_H_
|
||||
#define _NVBLDVER_H_
|
||||
|
||||
#ifndef NVBLDVER_STRINGIZE
|
||||
#define NVBLDVER_STRINGIZE(t) #t
|
||||
#endif
|
||||
#ifndef STRINGIZE
|
||||
#define STRINGIZE(t) NVBLDVER_STRINGIZE(t)
|
||||
#endif
|
||||
|
||||
// These variables can be overridden using ENV vars, see nvCommon.nvmk.
|
||||
// If no env vars are set, then the defaults seen here will be used.
|
||||
// In DVS builds, the ENV vars are used to control these values.
|
||||
// Note- the value of NV_BUILD_CL and NV_BUILD_TYPE_NON_BM is only used in
|
||||
// non-buildmeister builds, see override section below.
|
||||
// DVS_SW_CHANGELIST has been added to ENV vars in bug 1486673
|
||||
#ifndef DVS_SW_CHANGELIST
|
||||
#define DVS_SW_CHANGELIST 0
|
||||
#endif
|
||||
#ifndef NV_BUILD_CL
|
||||
#define NV_BUILD_CL (DVS_SW_CHANGELIST)
|
||||
#endif
|
||||
#if NV_BUILD_CL == 0
|
||||
#define NV_BUILD_CL (DVS_SW_CHANGELIST)
|
||||
#endif
|
||||
#ifndef NV_BUILD_TYPE_NON_BM
|
||||
#define NV_BUILD_TYPE_NON_BM Private
|
||||
#endif
|
||||
#ifndef NV_BUILD_AUTHOR
|
||||
#define NV_BUILD_AUTHOR unknown
|
||||
#endif
|
||||
// End ENV var section
|
||||
|
||||
|
||||
// The values of the following strings are set via a buildmeister python script,
|
||||
// and then checked back in. You cannot make changes to these sections without
|
||||
// corresponding changes to the buildmeister script
|
||||
#ifndef NV_BUILD_BRANCH
|
||||
#define NV_BUILD_BRANCH bugfix_main
|
||||
#endif
|
||||
#ifndef NV_PUBLIC_BRANCH
|
||||
#define NV_PUBLIC_BRANCH bugfix_main
|
||||
#endif
|
||||
|
||||
#if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS)
|
||||
#define NV_BUILD_BRANCH_VERSION "dev/gpu_drv/bugfix_main-16490"
|
||||
#define NV_BUILD_CHANGELIST_NUM (32065427)
|
||||
#define NV_BUILD_TYPE "Nightly"
|
||||
#define NV_BUILD_NAME "dev/gpu_drv/bugfix_main-16490"
|
||||
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (30396442)
|
||||
|
||||
#else /* Windows builds */
|
||||
#define NV_BUILD_BRANCH_VERSION "bugfix_main-17962"
|
||||
#define NV_BUILD_CHANGELIST_NUM (32066877)
|
||||
#define NV_BUILD_TYPE "Nightly"
|
||||
#define NV_BUILD_NAME "bugfix_main-221115"
|
||||
#define NV_LAST_OFFICIAL_CHANGELIST_NUM (32066644)
|
||||
#define NV_BUILD_BRANCH_BASE_VERSION R530
|
||||
#endif
|
||||
// End buildmeister python edited section
|
||||
|
||||
// A few of the values are defined differently for non-buildmeister builds,
|
||||
// this section redefines those defines
|
||||
#ifndef NV_BUILDMEISTER_BLD
|
||||
#undef NV_BUILD_TYPE
|
||||
#define NV_BUILD_TYPE STRINGIZE(NV_BUILD_TYPE_NON_BM)
|
||||
#undef NV_BUILD_CHANGELIST_NUM
|
||||
#define NV_BUILD_CHANGELIST_NUM NV_BUILD_CL
|
||||
#endif
|
||||
|
||||
#define NV_DISPLAY_DRIVER_TITLE NV_BUILD_TYPE " " STRINGIZE(NV_BUILD_BRANCH) " " NV_BUILD_NAME " " STRINGIZE(NV_BUILD_AUTHOR)
|
||||
|
||||
#endif
|
||||
438
src/common/inc/nvCpuIntrinsics.h
Normal file
438
src/common/inc/nvCpuIntrinsics.h
Normal file
@@ -0,0 +1,438 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1998,2015,2016 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __NV_CPU_INTRINSICS_H_
|
||||
#define __NV_CPU_INTRINSICS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "cpuopsys.h"
|
||||
#include "nvtypes.h"
|
||||
|
||||
/////////////////////////////////////
|
||||
// Page size
|
||||
/////////////////////////////////////
|
||||
|
||||
#if defined(NV_UNIX) && !defined(NV_CPU_INTRINSICS_KERNEL)
|
||||
// Page size is dynamic on all Unix systems
|
||||
#include <unistd.h>
|
||||
#define __NV_MEM_PAGE_SIZE_BYTES getpagesize()
|
||||
#else
|
||||
// And is static for all other known architectures.
|
||||
#define __NV_MEM_PAGE_SIZE_BYTES 4096
|
||||
#endif // defined(NV_UNIX)
|
||||
|
||||
#define __NV_MEM_PAGE_SIZE_MASK (__NV_MEM_PAGE_SIZE_BYTES - 1)
|
||||
|
||||
#define __NV_PAGE_PAD(x) \
|
||||
(((x) + __NV_MEM_PAGE_SIZE_MASK) & ~(__NV_MEM_PAGE_SIZE_MASK))
|
||||
|
||||
/////////////////////////////////////
|
||||
// Cache line size
|
||||
/////////////////////////////////////
|
||||
|
||||
#if defined(NVCPU_PPC)
|
||||
#define __NV_CACHE_LINE_BYTES 32
|
||||
#else
|
||||
#define __NV_CACHE_LINE_BYTES 64
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////
|
||||
// Spin loop hint
|
||||
/////////////////////////////////////
|
||||
|
||||
#if defined(NVCPU_X86_64)
|
||||
|
||||
// PAUSE (aka REP NOP) opcode is low-power on x86_64
|
||||
#if defined(NV_GNU_INLINE_ASM)
|
||||
#define NV_SPIN_LOOP_HINT() { \
|
||||
asm(".byte 0xf3\n\t" \
|
||||
".byte 0x90\n\t"); \
|
||||
}
|
||||
#else
|
||||
#define NV_SPIN_LOOP_HINT() _mm_pause()
|
||||
#endif
|
||||
|
||||
#elif defined(NVCPU_X86)
|
||||
|
||||
// PAUSE (aka REP NOP) opcode is low-power on P4's
|
||||
#if defined(NV_GNU_INLINE_ASM)
|
||||
#define NV_SPIN_LOOP_HINT() { \
|
||||
asm(".byte 0xf3\n\t" \
|
||||
".byte 0x90\n\t"); \
|
||||
}
|
||||
#else
|
||||
#define NV_SPIN_LOOP_HINT() _mm_pause()
|
||||
#endif
|
||||
|
||||
#elif defined(NVCPU_PPC)
|
||||
|
||||
#define NV_PPC_CACHE_LINE_SIZE_IN_BYTES 32
|
||||
#define NV_PPC_CACHE_LINE_SIZE_IN_U32S 8
|
||||
|
||||
// Not implemented yet
|
||||
#define NV_SPIN_LOOP_HINT()
|
||||
|
||||
#elif defined(NVCPU_FAMILY_ARM) || defined(NVCPU_PPC64LE) || defined(NVCPU_RISCV64)
|
||||
|
||||
// Not implemented yet
|
||||
#define NV_SPIN_LOOP_HINT()
|
||||
|
||||
#else
|
||||
#error Unknown CPU type
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////
|
||||
// Atomic operations
|
||||
/////////////////////////////////////
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
|
||||
// Include stdbool.h to pick up a definition of false to use with the
|
||||
// __atomic_* intrinsics below.
|
||||
#if !defined(__cplusplus)
|
||||
#include <stdbool.h>
|
||||
#endif // !defined(__cplusplus)
|
||||
|
||||
// Sets a 32-bit variable to the specified value as an atomic operation.
|
||||
// The function returns the initial value of the destination memory location.
|
||||
static NV_FORCEINLINE int __NVatomicExchange(volatile int *location, int value)
|
||||
{
|
||||
return __sync_lock_test_and_set(location, value);
|
||||
}
|
||||
|
||||
// Sets a pointer variable to the specified value as an atomic operation.
|
||||
// The function returns the initial value of the destination memory location.
|
||||
static NV_FORCEINLINE void* __NVatomicExchangePointer(void * volatile *location, void *value)
|
||||
{
|
||||
return __sync_lock_test_and_set(location, value);
|
||||
}
|
||||
|
||||
// Performs an atomic compare-and-exchange operation on the specified values. The function compares two
|
||||
// specified 32-bit values and exchanges with another 32-bit value based on the outcome of the comparison.
|
||||
// The function returns the initial value of the destination memory location.
|
||||
static NV_FORCEINLINE int __NVatomicCompareExchange(int volatile *location, int newValue, int oldValue)
|
||||
{
|
||||
return __sync_val_compare_and_swap(location, oldValue, newValue);
|
||||
}
|
||||
|
||||
// Performs an atomic compare-and-exchange operation on the specified values. The function compares two
|
||||
// specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison.
|
||||
// The function returns the initial value of the destination memory location.
|
||||
static NV_FORCEINLINE NvS64 __NVatomicCompareExchange64(NvS64 volatile *location, NvS64 newValue, NvS64 oldValue)
|
||||
{
|
||||
#if NVCPU_IS_ARM && !defined(__clang__)
|
||||
// GCC doesn't provided an ARMv7 64-bit sync-and-swap intrinsic, so define
|
||||
// one using inline assembly.
|
||||
NvU32 oldValLow = NvU64_LO32(oldValue);
|
||||
NvU32 oldValHigh = NvU64_HI32(oldValue);
|
||||
NvU32 newValLow = NvU64_LO32(newValue);
|
||||
NvU32 newValHigh = NvU64_HI32(newValue);
|
||||
NvU32 outValLow;
|
||||
NvU32 outValHigh;
|
||||
NvU32 res;
|
||||
|
||||
// The ldrexd and strexd instructions require use of an adjacent even/odd
|
||||
// pair of registers. GCC supports quad-word register operands and
|
||||
// modifiers to enable assignment of 64-bit values to two suitable 32-bit
|
||||
// registers, but Clang does not. To work around this, explicitly request
|
||||
// some suitable registers in the clobber list and manually shift the
|
||||
// necessary data in/out of them as needed.
|
||||
__asm__ __volatile__ (
|
||||
"1: ldrexd r2, r3, [%[loc]]\n"
|
||||
" mov %[res], #0\n"
|
||||
" mov %[outLo], r2\n"
|
||||
" mov %[outHi], r3\n"
|
||||
" mov r2, %[newLo]\n"
|
||||
" mov r3, %[newHi]\n"
|
||||
" teq %[outLo], %[oldLo]\n"
|
||||
" itt eq\n"
|
||||
" teqeq %[outHi], %[oldHi]\n"
|
||||
" strexdeq %[res], r2, r3, [%[loc]]\n"
|
||||
" teq %[res], #0\n"
|
||||
" bne 1b\n"
|
||||
// Outputs
|
||||
: [res] "=&r" (res),
|
||||
[outLo] "=&r" (outValLow), [outHi] "=&r" (outValHigh),
|
||||
"+Qo" (*location)
|
||||
// Inputs
|
||||
: [loc] "r" (location),
|
||||
[oldLo] "r" (oldValLow), [oldHi] "r" (oldValHigh),
|
||||
[newLo] "r" (newValLow), [newHi] "r" (newValHigh)
|
||||
// Clobbers
|
||||
: "memory", "cc", "r2", "r3");
|
||||
|
||||
__asm__ __volatile__ ("dmb" ::: "memory");
|
||||
|
||||
return (NvS64)(((NvU64)outValHigh << 32llu) | (NvU64)outValLow);
|
||||
#else
|
||||
__atomic_compare_exchange_n(location, &oldValue, newValue, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
|
||||
return oldValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Performs an atomic compare-and-exchange operation on the specified values. The function compares two
|
||||
// specified pointer values and exchanges with another pointer value based on the outcome of the comparison.
|
||||
// The function returns the initial value of the destination memory location.
|
||||
static NV_FORCEINLINE void* __NVatomicCompareExchangePointer(void * volatile *location, void *newValue, void *oldValue)
|
||||
{
|
||||
return __sync_val_compare_and_swap(location, oldValue, newValue);
|
||||
}
|
||||
|
||||
// Increments (increases by one) the value of the specified 32-bit variable as an atomic operation.
|
||||
// The function returns the resulting incremented value.
|
||||
static NV_FORCEINLINE int __NVatomicIncrement(int volatile *location)
|
||||
{
|
||||
return __sync_add_and_fetch(location, 1);
|
||||
}
|
||||
|
||||
// Decrements (decreases by one) the value of the specified 32-bit variable as an atomic operation.
|
||||
// The function returns the resulting decremented value.
|
||||
static NV_FORCEINLINE int __NVatomicDecrement(int volatile *location)
|
||||
{
|
||||
return __sync_sub_and_fetch(location, 1);
|
||||
}
|
||||
|
||||
// Adds the values of the specified 32-bit variables as an atomic operation.
|
||||
// The function returns the resulting added value.
|
||||
static NV_FORCEINLINE int __NVatomicExchangeAdd(int volatile *location, int value)
|
||||
{
|
||||
return __sync_add_and_fetch(location, value);
|
||||
}
|
||||
|
||||
#ifdef NV_CPU_QUERY_LSE_CAPS
|
||||
/*
|
||||
* Embedding hand coded instructions only for the inc/dec calls. These are the ones that
|
||||
* get called very often. The __NVatomicCompareExchange() and other calls for example,
|
||||
* are called only at init time, and a few times at most. So, keeping this hand-coding
|
||||
* minimal, and to only the most used ones.
|
||||
*
|
||||
* Disassembly for reference:
|
||||
* b820003e ldadd w0, w30, [x1]
|
||||
* 0b1e0000 add w0, w0, w30
|
||||
*
|
||||
* x16, x17, x30 are added to the clobber list since there could be veneers that maybe
|
||||
* generated.
|
||||
*/
|
||||
static NV_FORCEINLINE int __NVatomicIncrement_LSE(int volatile *location)
|
||||
{
|
||||
register int w0 asm ("w0") = 1;
|
||||
register volatile int *x1 asm ("x1") = location;
|
||||
|
||||
asm volatile
|
||||
(
|
||||
".inst 0xb820003e \n"
|
||||
"add w0, w0, w30"
|
||||
: "+r" (w0), "+r" (x1)
|
||||
: "r" (x1)
|
||||
: "x16", "x17", "x30", "memory"
|
||||
);
|
||||
|
||||
return w0;
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE int __NVatomicDecrement_LSE(int volatile *location)
|
||||
{
|
||||
register int w0 asm ("w0") = (int32_t)-1;
|
||||
register volatile int *x1 asm ("x1") = location;
|
||||
|
||||
asm volatile
|
||||
(
|
||||
".inst 0xb820003e \n"
|
||||
"add w0, w0, w30"
|
||||
: "+r" (w0), "+r" (x1)
|
||||
: "r" (x1)
|
||||
: "x16", "x17", "x30", "memory"
|
||||
);
|
||||
|
||||
return w0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error undefined architecture
|
||||
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////
|
||||
// Bit scan operations
|
||||
/////////////////////////////////////
|
||||
|
||||
// __NV_clz(mask) provides a generic count-leading-zeros. If "mask" is 0, then the return value is undefined.
|
||||
// __NV_ctz(mask) provides a generic count-trailing-zeros. If "mask" is 0, then the return value is undefined.
|
||||
//
|
||||
// __NVbsfFirst(), __NVbsfNext(), __NVbsrFirst() and __NVbsrNext() are helper functions to implement
|
||||
// generic bit scan operations over a 32 bit mask long the following template:
|
||||
//
|
||||
// for (__NVbsfFirst(&index, &mask, maskInit); mask; __NVbsfNext(&index, &mask)) { ... }
|
||||
//
|
||||
// These operations are implemented using gcc/MSVC builtins/intrinsics.
|
||||
//
|
||||
// The scan process provides the next valid "index". In __NVbsfNext() the bit corresponding to the passed in
|
||||
// (1 << index) will be masked out.
|
||||
//
|
||||
// bsf scan from the lsb to the msb, while bsr scans from the msb to the lsb.
|
||||
//
|
||||
// The use of inlines and defines below is dictated by insufficiencies of MSVC ...
|
||||
|
||||
#if defined (__GNUC__) || defined(__clang__)
|
||||
|
||||
static NV_FORCEINLINE int __NV_clz(unsigned int mask) {
|
||||
return __builtin_clz(mask);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE int __NV_ctz(unsigned int mask) {
|
||||
return __builtin_ctz(mask);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE int __NV_clzll(unsigned long long mask) {
|
||||
return __builtin_clzll(mask);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE int __NV_ctzll(unsigned long long mask) {
|
||||
return __builtin_ctzll(mask);
|
||||
}
|
||||
|
||||
#define __BitScanForward(_pindex, _mask) *((_pindex)) = __NV_ctz((_mask))
|
||||
#define __BitScanReverse(_pindex, _mask) *((_pindex)) = 31 - __NV_clz((_mask))
|
||||
#define __BitScanForward64(_pindex, _mask) *((_pindex)) = __NV_ctzll((_mask))
|
||||
#define __BitScanReverse64(_pindex, _mask) *((_pindex)) = 63 - __NV_clzll((_mask))
|
||||
|
||||
#else
|
||||
|
||||
#error Unsupported compiler
|
||||
|
||||
#endif // MSVC_VER
|
||||
|
||||
#ifndef __BitScanForward64
|
||||
// Implement bit scan forward for 64 bit using 32 bit instructions
|
||||
static NV_FORCEINLINE void _BitScanForward64on32(unsigned int *index, NvU64 mask)
|
||||
{
|
||||
const unsigned int lowMask = (unsigned int)(mask & 0xFFFFFFFFULL);
|
||||
|
||||
if (lowMask != 0) {
|
||||
__BitScanForward(index, lowMask);
|
||||
} else {
|
||||
const unsigned int highMask = (unsigned int)(mask >> 32);
|
||||
__BitScanForward(index, highMask);
|
||||
*index += 32;
|
||||
}
|
||||
}
|
||||
|
||||
#define __BitScanForward64(_pindex, _mask) _BitScanForward64on32((_pindex), (_mask))
|
||||
#endif // __BitScanForward64
|
||||
|
||||
#ifndef __BitScanReverse64
|
||||
// Implement bit scan reverse for 64 bit using 32 bit instructions
|
||||
static NV_FORCEINLINE void _BitScanReverse64on32(unsigned int *index, NvU64 mask)
|
||||
{
|
||||
const unsigned int highMask = (unsigned int)(mask >> 32);
|
||||
|
||||
if (highMask != 0) {
|
||||
__BitScanReverse(index, highMask);
|
||||
*index += 32;
|
||||
} else {
|
||||
const unsigned int lowMask = (unsigned int)(mask & 0xFFFFFFFFULL);
|
||||
__BitScanReverse(index, lowMask);
|
||||
}
|
||||
}
|
||||
|
||||
#define __BitScanReverse64(_pindex, _mask) _BitScanReverse64on32((_pindex), (_mask))
|
||||
#endif // __BitScanReverse64
|
||||
|
||||
static NV_FORCEINLINE void __NVbsfFirst(unsigned int *pindex, unsigned int *pmask, unsigned int maskInit)
|
||||
{
|
||||
*pmask = maskInit;
|
||||
__BitScanForward(pindex, maskInit);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsfNext(unsigned int *pindex, unsigned int *pmask)
|
||||
{
|
||||
unsigned int index, mask;
|
||||
|
||||
index = *pindex;
|
||||
mask = *pmask ^ (1ul << index);
|
||||
|
||||
*pmask = mask;
|
||||
__BitScanForward(pindex, mask);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsrFirst(unsigned int *pindex, unsigned int *pmask, unsigned int maskInit)
|
||||
{
|
||||
*pmask = maskInit;
|
||||
__BitScanReverse(pindex, maskInit);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsrNext(unsigned int *pindex, unsigned int *pmask)
|
||||
{
|
||||
unsigned int index, mask;
|
||||
|
||||
index = *pindex;
|
||||
mask = *pmask ^ (1ul << index);
|
||||
|
||||
*pmask = mask;
|
||||
__BitScanReverse(pindex, mask);
|
||||
}
|
||||
|
||||
// Variations for 64 bit maks
|
||||
static NV_FORCEINLINE void __NVbsfFirst64(unsigned int *pindex, NvU64 *pmask, NvU64 maskInit)
|
||||
{
|
||||
*pmask = maskInit;
|
||||
__BitScanForward64(pindex, maskInit);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsfNext64(unsigned int *pindex, NvU64 *pmask)
|
||||
{
|
||||
unsigned int index;
|
||||
NvU64 mask;
|
||||
|
||||
index = *pindex;
|
||||
mask = *pmask ^ (1ULL << index);
|
||||
|
||||
*pmask = mask;
|
||||
__BitScanForward64(pindex, mask);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsrFirst64(unsigned int *pindex, NvU64 *pmask, NvU64 maskInit)
|
||||
{
|
||||
*pmask = maskInit;
|
||||
__BitScanReverse64(pindex, maskInit);
|
||||
}
|
||||
|
||||
static NV_FORCEINLINE void __NVbsrNext64(unsigned int *pindex, NvU64 *pmask)
|
||||
{
|
||||
unsigned int index;
|
||||
NvU64 mask;
|
||||
|
||||
index = *pindex;
|
||||
mask = *pmask ^ (1ULL << index);
|
||||
|
||||
*pmask = mask;
|
||||
__BitScanReverse64(pindex, mask);
|
||||
}
|
||||
|
||||
#undef __BitScanForward
|
||||
#undef __BitScanReverse
|
||||
#undef __BitScanForward64
|
||||
#undef __BitScanReverse64
|
||||
|
||||
#endif // __NV_CPU_INTRINSICS_H_
|
||||
44
src/common/inc/nvCpuUuid.h
Normal file
44
src/common/inc/nvCpuUuid.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2015-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _NV_CPU_UUID_H_
|
||||
#define _NV_CPU_UUID_H_
|
||||
|
||||
#define NV_UUID_LEN 16
|
||||
|
||||
typedef struct nv_uuid
|
||||
{
|
||||
NvU8 uuid[NV_UUID_LEN];
|
||||
|
||||
} NvUuid;
|
||||
|
||||
#define NV_UUID_HI(pUuid) (*((NvU64*)((pUuid)->uuid + (NV_UUID_LEN >> 1))))
|
||||
#define NV_UUID_LO(pUuid) (*((NvU64*)((pUuid)->uuid + 0)))
|
||||
|
||||
typedef NvUuid NvSystemUuid;
|
||||
|
||||
typedef NvUuid NvProcessorUuid;
|
||||
|
||||
extern const NvProcessorUuid NV_PROCESSOR_UUID_CPU_DEFAULT;
|
||||
|
||||
#endif // _NV_CPU_UUID_H_
|
||||
134
src/common/inc/nvHdmiFrlCommon.h
Normal file
134
src/common/inc/nvHdmiFrlCommon.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/** @file nvHdmiFrlCommon.h
|
||||
* @brief This file defines data needed for and returned by HDMI 2.1 spec FRL calculations
|
||||
* It meant to be a spec layer within HDMI lib, without carrying any
|
||||
* driver/hw related information
|
||||
*/
|
||||
|
||||
#ifndef _NVHDMIFRLCOMMON_H_
|
||||
#define _NVHDMIFRLCOMMON_H_
|
||||
|
||||
#include "nvmisc.h"
|
||||
|
||||
//******************************************************************************
|
||||
// Constants/Structures
|
||||
//******************************************************************************
|
||||
#define MAX_RECONSTRUCTED_HACTIVE_PIXELS 2720
|
||||
|
||||
// HDMI_BPC: Bits per component enums.
|
||||
typedef enum tagHDMI_BPC
|
||||
{
|
||||
HDMI_BPC8 = 8,
|
||||
HDMI_BPC10 = 10,
|
||||
HDMI_BPC12 = 12,
|
||||
HDMI_BPC16 = 16
|
||||
} HDMI_BPC;
|
||||
|
||||
// HDMI_PIXEL_PACKING: Pixel packing type enums
|
||||
typedef enum tagHDMI_PIXEL_PACKING
|
||||
{
|
||||
HDMI_PIXEL_PACKING_RGB = 0,
|
||||
HDMI_PIXEL_PACKING_YCbCr444,
|
||||
HDMI_PIXEL_PACKING_YCbCr422,
|
||||
HDMI_PIXEL_PACKING_YCbCr420
|
||||
} HDMI_PIXEL_PACKING;
|
||||
|
||||
// HDMI_FRL_DATA_RATE: FRL mode enums
|
||||
typedef enum tagHDMI_FRL_DATA_RATE
|
||||
{
|
||||
HDMI_FRL_DATA_RATE_NONE,
|
||||
HDMI_FRL_DATA_RATE_3LANES_3GBPS,
|
||||
HDMI_FRL_DATA_RATE_3LANES_6GBPS,
|
||||
HDMI_FRL_DATA_RATE_4LANES_6GBPS,
|
||||
HDMI_FRL_DATA_RATE_4LANES_8GBPS,
|
||||
HDMI_FRL_DATA_RATE_4LANES_10GBPS,
|
||||
HDMI_FRL_DATA_RATE_4LANES_12GBPS,
|
||||
HDMI_FRL_DATA_RATE_UNSPECIFIED
|
||||
} HDMI_FRL_DATA_RATE;
|
||||
|
||||
typedef enum tagAUDIO_PKTTYPE
|
||||
{
|
||||
AUDIO_PKTTYPE_LPCM_SAMPLE = 0,
|
||||
AUDIO_PKTTYPE_ONE_BIT_LPCM_SAMPLE,
|
||||
AUDIO_PKTTYPE_DST_AUDIO,
|
||||
AUDIO_PKTTYPE_HBR_AUDIO,
|
||||
AUDIO_PKTTYPE_MULTI_STREAM_AUDIO,
|
||||
AUDIO_PKTTYPE_ONE_BIT_MULTI_STREAM_AUDIO,
|
||||
AUDIO_PKTTYPE_3D_AUDIO,
|
||||
AUDIO_PKTTYPE_ONE_BIT_3D_AUDIO,
|
||||
NO_AUDIO
|
||||
} AUDIO_PKTTYPE;
|
||||
|
||||
typedef struct tagFRL_CAPACITY_COMPUTATION_PARAMS
|
||||
{
|
||||
NvU32 numLanes;
|
||||
NvU32 frlBitRateGbps;
|
||||
NvU32 pclk10KHz;
|
||||
NvU32 hTotal;
|
||||
NvU32 hActive;
|
||||
NvU32 bpc;
|
||||
HDMI_PIXEL_PACKING pixelPacking;
|
||||
AUDIO_PKTTYPE audioType;
|
||||
NvU32 numAudioChannels;
|
||||
NvU32 audioFreqKHz;
|
||||
|
||||
struct
|
||||
{
|
||||
NvU32 bppTargetx16;
|
||||
NvU32 hSlices;
|
||||
NvU32 sliceWidth;
|
||||
NvU32 dscTotalChunkKBytes;
|
||||
} compressionInfo;
|
||||
|
||||
} FRL_CAPACITY_COMPUTATION_PARAMS;
|
||||
|
||||
typedef struct tagFRL_COMPUTATION_RESULT
|
||||
{
|
||||
HDMI_FRL_DATA_RATE frlRate;
|
||||
NvU32 bppTargetx16;
|
||||
|
||||
NvBool engageCompression;
|
||||
NvBool isAudioSupported;
|
||||
NvBool dataFlowDisparityReqMet;
|
||||
NvBool dataFlowMeteringReqMet;
|
||||
NvBool isVideoTransportSupported;
|
||||
NvU32 triBytesBorrowed; // uncompressed mode: num of active Tri-bytes to be transmitted at HBlank
|
||||
NvU32 hcActiveBytes; // compressed mode: num of FRL character bytes in active region
|
||||
NvU32 hcActiveTriBytes; // compressed mode: num of FRL tri-bytes in active region
|
||||
NvU32 hcBlankTriBytes; // compressed mode: num of FRL tri-bytes in blanking region
|
||||
NvU32 tBlankToTTotalX1k; // compressed mode: ratio of time spent on blanking to the total line time
|
||||
} FRL_COMPUTATION_RESULT;
|
||||
|
||||
typedef struct tagFRL_PRE_CALC_CONFIG
|
||||
{
|
||||
NvU32 vic;
|
||||
HDMI_PIXEL_PACKING packing;
|
||||
HDMI_BPC bpc;
|
||||
HDMI_FRL_DATA_RATE frlRate;
|
||||
NvU32 bppX16;
|
||||
NvBool bCompressedMode;
|
||||
} FRL_PRE_CALC_CONFIG;
|
||||
|
||||
#endif // _NVHDMIFRLCOMMON_H_
|
||||
572
src/common/inc/nvPNPVendorIds.h
Normal file
572
src/common/inc/nvPNPVendorIds.h
Normal file
@@ -0,0 +1,572 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2009 - 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/*
|
||||
* This header file contains the 3-character Plug and Play Vendor IDs and
|
||||
* their translation into Vendor names.
|
||||
*
|
||||
* If the includer defines NV_PNP_VENDOR_IDS_USE_TCHAR, then
|
||||
* PNPVendorID::vendorName will have type const TCHAR*; otherwise, it will have
|
||||
* type const char*.
|
||||
*
|
||||
* References:
|
||||
* https://uefi.org/pnp_id_list
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NV_PNP_VENDOR_IDS_H__
|
||||
#define __NV_PNP_VENDOR_IDS_H__
|
||||
|
||||
#if defined(NV_PNP_VENDOR_IDS_USE_TCHAR)
|
||||
#define _VENDOR_NAME_TYPE const TCHAR
|
||||
#define _VENDOR_NAME_ENTRY(x) _T(x)
|
||||
#else
|
||||
#define _VENDOR_NAME_TYPE const char
|
||||
#define _VENDOR_NAME_ENTRY(x) (x)
|
||||
#endif
|
||||
|
||||
typedef struct tagPNPVendorID
|
||||
{
|
||||
char vendorId[4]; // PNP Vendor ID (example: "SNY")
|
||||
_VENDOR_NAME_TYPE* vendorName; // Vendor name for display (example: "Sony")
|
||||
} PNPVendorId;
|
||||
|
||||
|
||||
/*
|
||||
* The PNPVendorIds[] table maps between the 3-character Plug and
|
||||
* Play Vendor Identifiers and user-friendly vendor names
|
||||
*/
|
||||
static const PNPVendorId PNPVendorIds[] =
|
||||
{
|
||||
{ "___", _VENDOR_NAME_ENTRY("Targa") },
|
||||
{ "@@@", _VENDOR_NAME_ENTRY("Sangyo") },
|
||||
|
||||
{ "AAA", _VENDOR_NAME_ENTRY("Avolites Ltd") },
|
||||
{ "AAC", _VENDOR_NAME_ENTRY("Acer") },
|
||||
{ "ABC", _VENDOR_NAME_ENTRY("AboCom System Inc") },
|
||||
{ "ABP", _VENDOR_NAME_ENTRY("Advanced System Products") },
|
||||
{ "ACE", _VENDOR_NAME_ENTRY("ACME") },
|
||||
{ "ACC", _VENDOR_NAME_ENTRY("ACCTON") },
|
||||
{ "ACI", _VENDOR_NAME_ENTRY("Ancor Communications Inc") },
|
||||
{ "ACK", _VENDOR_NAME_ENTRY("ACKSYS") },
|
||||
{ "ACN", _VENDOR_NAME_ENTRY("ACON") },
|
||||
{ "ACR", _VENDOR_NAME_ENTRY("Acer") },
|
||||
{ "ACS", _VENDOR_NAME_ENTRY("Altos/ACS") },
|
||||
{ "ACT", _VENDOR_NAME_ENTRY("Actebis/Targa") },
|
||||
{ "ADI", _VENDOR_NAME_ENTRY("ADI") },
|
||||
{ "ADP", _VENDOR_NAME_ENTRY("Adaptec") },
|
||||
{ "ADT", _VENDOR_NAME_ENTRY("ADTEK") },
|
||||
{ "ADV", _VENDOR_NAME_ENTRY("AMD") },
|
||||
{ "ADX", _VENDOR_NAME_ENTRY("ADAX") },
|
||||
{ "AEI", _VENDOR_NAME_ENTRY("AIR") },
|
||||
{ "AEM", _VENDOR_NAME_ENTRY("AEM") },
|
||||
{ "AEO", _VENDOR_NAME_ENTRY("UHC") },
|
||||
{ "AGI", _VENDOR_NAME_ENTRY("Artish Graphics") },
|
||||
{ "AKB", _VENDOR_NAME_ENTRY("Akebia") },
|
||||
{ "AIC", _VENDOR_NAME_ENTRY("Arnos Instruments") },
|
||||
{ "AIR", _VENDOR_NAME_ENTRY("Advanced Integrated Research") },
|
||||
{ "AKB", _VENDOR_NAME_ENTRY("Akebia") },
|
||||
{ "ALA", _VENDOR_NAME_ENTRY("Alacron") },
|
||||
{ "ALR", _VENDOR_NAME_ENTRY("Advanced Logic Research") },
|
||||
{ "AMC", _VENDOR_NAME_ENTRY("Attachmate") },
|
||||
{ "AMD", _VENDOR_NAME_ENTRY("Amdek") },
|
||||
{ "AMI", _VENDOR_NAME_ENTRY("American Megatrends") },
|
||||
{ "AMP", _VENDOR_NAME_ENTRY("Amptron") },
|
||||
{ "AMT", _VENDOR_NAME_ENTRY("Amtrans") },
|
||||
{ "ANC", _VENDOR_NAME_ENTRY("Ancot") },
|
||||
{ "ANI", _VENDOR_NAME_ENTRY("Anigma") },
|
||||
{ "AOC", _VENDOR_NAME_ENTRY("AOC") },
|
||||
{ "APD", _VENDOR_NAME_ENTRY("Applidata") },
|
||||
{ "API", _VENDOR_NAME_ENTRY("AcerView") },
|
||||
{ "APP", _VENDOR_NAME_ENTRY("Apple") },
|
||||
{ "APS", _VENDOR_NAME_ENTRY("Autologic") },
|
||||
{ "ARC", _VENDOR_NAME_ENTRY("Alta Research") },
|
||||
{ "ART", _VENDOR_NAME_ENTRY("ArtMedia") },
|
||||
{ "ASE", _VENDOR_NAME_ENTRY("ASEM") },
|
||||
{ "ASI", _VENDOR_NAME_ENTRY("Ahead Systems") },
|
||||
{ "AST", _VENDOR_NAME_ENTRY("AST Research") },
|
||||
{ "ASU", _VENDOR_NAME_ENTRY("ASUS") },
|
||||
{ "ATI", _VENDOR_NAME_ENTRY("Allied Telesis") },
|
||||
{ "ATO", _VENDOR_NAME_ENTRY("ASTRO DESIGN, INC.") },
|
||||
{ "ATT", _VENDOR_NAME_ENTRY("AT&T") },
|
||||
{ "ATX", _VENDOR_NAME_ENTRY("Athenix") },
|
||||
{ "AUO", _VENDOR_NAME_ENTRY("AU Optronics Corporation") },
|
||||
{ "AUS", _VENDOR_NAME_ENTRY("Asustek Computer Inc") },
|
||||
{ "AVI", _VENDOR_NAME_ENTRY("AIR") },
|
||||
{ "AVO", _VENDOR_NAME_ENTRY("Avocent Corporation") },
|
||||
{ "AZU", _VENDOR_NAME_ENTRY("Azura") },
|
||||
|
||||
{ "BAN", _VENDOR_NAME_ENTRY("Banyan") },
|
||||
{ "BCC", _VENDOR_NAME_ENTRY("Beaver Computer Corporation") },
|
||||
{ "BCD", _VENDOR_NAME_ENTRY("Dr. Seufert GmbH") },
|
||||
{ "BEO", _VENDOR_NAME_ENTRY("Bang & Olufsen") },
|
||||
{ "BGT", _VENDOR_NAME_ENTRY("Budzetron") },
|
||||
{ "BIG", _VENDOR_NAME_ENTRY("Bigscreen, Inc.") },
|
||||
{ "BMM", _VENDOR_NAME_ENTRY("MAG Technology") },
|
||||
{ "BNQ", _VENDOR_NAME_ENTRY("BenQ") },
|
||||
{ "BOE", _VENDOR_NAME_ENTRY("BOE Technology Group Co., Ltd") },
|
||||
{ "BRG", _VENDOR_NAME_ENTRY("Bridge") },
|
||||
{ "BTC", _VENDOR_NAME_ENTRY("Bit 3") },
|
||||
{ "BTE", _VENDOR_NAME_ENTRY("Brilliant Technology") },
|
||||
{ "BUS", _VENDOR_NAME_ENTRY("BusTek") },
|
||||
|
||||
{ "CAL", _VENDOR_NAME_ENTRY("Acon") },
|
||||
{ "CCI", _VENDOR_NAME_ENTRY("Cache") },
|
||||
{ "CCP", _VENDOR_NAME_ENTRY("Epson") },
|
||||
{ "CDP", _VENDOR_NAME_ENTRY("CalComp") },
|
||||
{ "CFG", _VENDOR_NAME_ENTRY("Atlantis") },
|
||||
{ "CHA", _VENDOR_NAME_ENTRY("Chase Research") },
|
||||
{ "CIP", _VENDOR_NAME_ENTRY("Ciprico") },
|
||||
{ "CLO", _VENDOR_NAME_ENTRY("Clone Computers/Analogy") },
|
||||
{ "CLT", _VENDOR_NAME_ENTRY("automated computer control systems")},
|
||||
{ "CMD", _VENDOR_NAME_ENTRY("CMD Technology") },
|
||||
{ "CMN", _VENDOR_NAME_ENTRY("Chimei innolux corp.") },
|
||||
{ "CMO", _VENDOR_NAME_ENTRY("Chi Mei Optoelectronics corp.") },
|
||||
{ "CNI", _VENDOR_NAME_ENTRY("Connect International") },
|
||||
{ "CNT", _VENDOR_NAME_ENTRY("CNet Technology") },
|
||||
{ "COM", _VENDOR_NAME_ENTRY("Comtrol") },
|
||||
{ "CPC", _VENDOR_NAME_ENTRY("Ciprico") },
|
||||
{ "CPD", _VENDOR_NAME_ENTRY("CompuAdd") },
|
||||
{ "CPG", _VENDOR_NAME_ENTRY("DFI") },
|
||||
{ "CPI", _VENDOR_NAME_ENTRY("Computer Peripherals") },
|
||||
{ "CPL", _VENDOR_NAME_ENTRY("Compal") },
|
||||
{ "CPQ", _VENDOR_NAME_ENTRY("Compaq") },
|
||||
{ "CPT", _VENDOR_NAME_ENTRY("cPATH") },
|
||||
{ "CPX", _VENDOR_NAME_ENTRY("Powermatic Data Systems") },
|
||||
{ "CRD", _VENDOR_NAME_ENTRY("Cardinal Technologies") },
|
||||
{ "CRN", _VENDOR_NAME_ENTRY("Cornerstone") },
|
||||
{ "CRS", _VENDOR_NAME_ENTRY("Cisco") },
|
||||
{ "CSE", _VENDOR_NAME_ENTRY("Compu Shack") },
|
||||
{ "CSI", _VENDOR_NAME_ENTRY("Cabletron") },
|
||||
{ "CSO", _VENDOR_NAME_ENTRY("California institute of Technology")},
|
||||
{ "CSS", _VENDOR_NAME_ENTRY("CSS Laboratories") },
|
||||
{ "CSW", _VENDOR_NAME_ENTRY("China Star Optoelectronics Technology Co., Ltd") },
|
||||
{ "CTN", _VENDOR_NAME_ENTRY("Computone") },
|
||||
{ "CTX", _VENDOR_NAME_ENTRY("Chuntex/CTX") },
|
||||
{ "CUB", _VENDOR_NAME_ENTRY("Cubix") },
|
||||
{ "CUI", _VENDOR_NAME_ENTRY("CUI") },
|
||||
{ "CYB", _VENDOR_NAME_ENTRY("CyberVision") },
|
||||
|
||||
{ "DBI", _VENDOR_NAME_ENTRY("DigiBoard") },
|
||||
{ "DBL", _VENDOR_NAME_ENTRY("Doble Engineering") },
|
||||
{ "DCC", _VENDOR_NAME_ENTRY("Dale Computer") },
|
||||
{ "DCE", _VENDOR_NAME_ENTRY("Mylex") },
|
||||
{ "DCM", _VENDOR_NAME_ENTRY("DCM Data Products") },
|
||||
{ "DEC", _VENDOR_NAME_ENTRY("DEC") },
|
||||
{ "DEI", _VENDOR_NAME_ENTRY("Deico Electronics") },
|
||||
{ "DEL", _VENDOR_NAME_ENTRY("Dell") },
|
||||
{ "DFI", _VENDOR_NAME_ENTRY("DFI") },
|
||||
{ "DGC", _VENDOR_NAME_ENTRY("Data General") },
|
||||
{ "DGS", _VENDOR_NAME_ENTRY("Diagsoft") },
|
||||
{ "DIA", _VENDOR_NAME_ENTRY("Diadem") },
|
||||
{ "DIO", _VENDOR_NAME_ENTRY("DIO") },
|
||||
{ "DIS", _VENDOR_NAME_ENTRY("Diseda") },
|
||||
{ "DIT", _VENDOR_NAME_ENTRY("Dragon Information Technology") },
|
||||
{ "DLK", _VENDOR_NAME_ENTRY("D-Link") },
|
||||
{ "DLO", _VENDOR_NAME_ENTRY("Dlodlo Technologies Co., Ltd") },
|
||||
{ "DMB", _VENDOR_NAME_ENTRY("Digicom Systems") },
|
||||
{ "DMS", _VENDOR_NAME_ENTRY("DOME imaging systems") },
|
||||
{ "DNV", _VENDOR_NAME_ENTRY("NexView") },
|
||||
{ "DOM", _VENDOR_NAME_ENTRY("Dome Imaging Systems") },
|
||||
{ "DON", _VENDOR_NAME_ENTRY("DENON, Ltd.") },
|
||||
{ "DPC", _VENDOR_NAME_ENTRY("Delta") },
|
||||
{ "DPI", _VENDOR_NAME_ENTRY("DocuPoint") },
|
||||
{ "DPL", _VENDOR_NAME_ENTRY("Digital Projection Limited") },
|
||||
{ "DPN", _VENDOR_NAME_ENTRY("Shanghai Lexiang Technology Limited") },
|
||||
{ "DPT", _VENDOR_NAME_ENTRY("DPT") },
|
||||
{ "DRT", _VENDOR_NAME_ENTRY("Digital Research") },
|
||||
{ "DSJ", _VENDOR_NAME_ENTRY("VR Technology Holdings Limited") },
|
||||
{ "DSM", _VENDOR_NAME_ENTRY("DSM Digial Services") },
|
||||
{ "DTC", _VENDOR_NAME_ENTRY("Data Technology") },
|
||||
{ "DTI", _VENDOR_NAME_ENTRY("Diversified Technology") },
|
||||
{ "DTK", _VENDOR_NAME_ENTRY("DTK Computer") },
|
||||
{ "DTX", _VENDOR_NAME_ENTRY("Data Translation") },
|
||||
{ "DVC", _VENDOR_NAME_ENTRY("DecaView") },
|
||||
{ "DWE", _VENDOR_NAME_ENTRY("Daewoo") },
|
||||
|
||||
{ "ECS", _VENDOR_NAME_ENTRY("EliteGroup/ECS") },
|
||||
{ "ENC", _VENDOR_NAME_ENTRY("Eizo") },
|
||||
{ "EGO", _VENDOR_NAME_ENTRY("Ergo Electronics") },
|
||||
{ "EKC", _VENDOR_NAME_ENTRY("Kodak") },
|
||||
{ "EHJ", _VENDOR_NAME_ENTRY("Epson") },
|
||||
{ "EIZ", _VENDOR_NAME_ENTRY("Eizo") },
|
||||
{ "ELI", _VENDOR_NAME_ENTRY("Edsun") },
|
||||
{ "ELS", _VENDOR_NAME_ENTRY("ELSA") },
|
||||
{ "ELX", _VENDOR_NAME_ENTRY("Elonex") },
|
||||
{ "EMC", _VENDOR_NAME_ENTRY("ProView/EMC") },
|
||||
{ "ENC", _VENDOR_NAME_ENTRY("Eizo") },
|
||||
{ "EPI", _VENDOR_NAME_ENTRY("Envision") },
|
||||
{ "EQX", _VENDOR_NAME_ENTRY("Equinox") },
|
||||
{ "ERG", _VENDOR_NAME_ENTRY("Ergo") },
|
||||
{ "ERP", _VENDOR_NAME_ENTRY("EURAPLAN") },
|
||||
{ "ESI", _VENDOR_NAME_ENTRY("Extended Systems") },
|
||||
{ "ETT", _VENDOR_NAME_ENTRY("E-Tech Research") },
|
||||
{ "EVX", _VENDOR_NAME_ENTRY("Everex") },
|
||||
{ "EXP", _VENDOR_NAME_ENTRY("Data Export") },
|
||||
|
||||
{ "FCB", _VENDOR_NAME_ENTRY("Furukawa Electric") },
|
||||
{ "FCM", _VENDOR_NAME_ENTRY("Funai") },
|
||||
{ "FCT", _VENDOR_NAME_ENTRY("Free Computer Technology") },
|
||||
{ "FDC", _VENDOR_NAME_ENTRY("Future Domain") },
|
||||
{ "FDX", _VENDOR_NAME_ENTRY("Findex, Inc. ") },
|
||||
{ "FGL", _VENDOR_NAME_ENTRY("Fujitsu") },
|
||||
{ "FIC", _VENDOR_NAME_ENTRY("First International") },
|
||||
{ "FOR", _VENDOR_NAME_ENTRY("Formac") },
|
||||
{ "FOV", _VENDOR_NAME_ENTRY("FOVE INC") },
|
||||
{ "FRC", _VENDOR_NAME_ENTRY("FORCE Computers") },
|
||||
{ "FRI", _VENDOR_NAME_ENTRY("Fibernet Research") },
|
||||
{ "FTN", _VENDOR_NAME_ENTRY("Fountain Technologies") },
|
||||
{ "FUJ", _VENDOR_NAME_ENTRY("Fujitsu") },
|
||||
|
||||
{ "GAG", _VENDOR_NAME_ENTRY("Gage Applied Sciences") },
|
||||
{ "GCI", _VENDOR_NAME_ENTRY("Gateway Communications") },
|
||||
{ "GEN", _VENDOR_NAME_ENTRY("Genesys") },
|
||||
{ "GMX", _VENDOR_NAME_ENTRY("GMX") },
|
||||
{ "GRA", _VENDOR_NAME_ENTRY("Graphica") },
|
||||
{ "GSM", _VENDOR_NAME_ENTRY("LG Electronics") },
|
||||
{ "GVC", _VENDOR_NAME_ENTRY("GVC") },
|
||||
{ "GWY", _VENDOR_NAME_ENTRY("Gateway") },
|
||||
|
||||
{ "HCL", _VENDOR_NAME_ENTRY("HCL") },
|
||||
{ "HCP", _VENDOR_NAME_ENTRY("Hitachi") },
|
||||
{ "HCW", _VENDOR_NAME_ENTRY("Hauppauge") },
|
||||
{ "HDL", _VENDOR_NAME_ENTRY("Headland") },
|
||||
{ "HEC", _VENDOR_NAME_ENTRY("Hisense") },
|
||||
{ "HEI", _VENDOR_NAME_ENTRY("Hyundai") },
|
||||
{ "HIT", _VENDOR_NAME_ENTRY("Hitachi/HINT") },
|
||||
{ "HKC", _VENDOR_NAME_ENTRY("HKC Overseas Ltd.") },
|
||||
{ "HMX", _VENDOR_NAME_ENTRY("HUMAX Co., Ltd.") },
|
||||
{ "HPN", _VENDOR_NAME_ENTRY("HP Inc.") },
|
||||
{ "HSD", _VENDOR_NAME_ENTRY("HannStar Display Corp") },
|
||||
{ "HSL", _VENDOR_NAME_ENTRY("Hansol") },
|
||||
{ "HTC", _VENDOR_NAME_ENTRY("Hitachi") },
|
||||
{ "HVR", _VENDOR_NAME_ENTRY("HTC Corporation") },
|
||||
{ "HWD", _VENDOR_NAME_ENTRY("HighWater Designs") },
|
||||
{ "HWP", _VENDOR_NAME_ENTRY("HP") },
|
||||
{ "HYL", _VENDOR_NAME_ENTRY("Hypereal") },
|
||||
{ "HYP", _VENDOR_NAME_ENTRY("Hyphen Limited") },
|
||||
{ "HWV", _VENDOR_NAME_ENTRY("Huawei Technologies Co., Ltd") },
|
||||
|
||||
{ "IBC", _VENDOR_NAME_ENTRY("IBS") },
|
||||
{ "IBM", _VENDOR_NAME_ENTRY("IBM") },
|
||||
{ "ICC", _VENDOR_NAME_ENTRY("BICC Data Networks") },
|
||||
{ "ICL", _VENDOR_NAME_ENTRY("Fujitsu/ICL") },
|
||||
{ "ICN", _VENDOR_NAME_ENTRY("Sanyo/Icon") },
|
||||
{ "ICU", _VENDOR_NAME_ENTRY("Intel") },
|
||||
{ "IDS", _VENDOR_NAME_ENTRY("Intellistor") },
|
||||
{ "IFT", _VENDOR_NAME_ENTRY("Informtech") },
|
||||
{ "IGM", _VENDOR_NAME_ENTRY("IGM Communications") },
|
||||
{ "III", _VENDOR_NAME_ENTRY("Intelligent Instrumentation") },
|
||||
{ "IIN", _VENDOR_NAME_ENTRY("Intel") },
|
||||
{ "IMA", _VENDOR_NAME_ENTRY("Imagraph") },
|
||||
{ "IMC", _VENDOR_NAME_ENTRY("IMC Networks") },
|
||||
{ "IMP", _VENDOR_NAME_ENTRY("Impression") },
|
||||
{ "IMX", _VENDOR_NAME_ENTRY("Arpara Technology Co., Ltd.") },
|
||||
{ "INF", _VENDOR_NAME_ENTRY("Inframetrics") },
|
||||
{ "INL", _VENDOR_NAME_ENTRY("InnoLux Display Corporation") },
|
||||
{ "INP", _VENDOR_NAME_ENTRY("Interphase") },
|
||||
{ "INS", _VENDOR_NAME_ENTRY("Ines") },
|
||||
{ "INT", _VENDOR_NAME_ENTRY("Intel") },
|
||||
{ "IOD", _VENDOR_NAME_ENTRY("IODATA") },
|
||||
{ "ISA", _VENDOR_NAME_ENTRY("ISA") },
|
||||
{ "ISI", _VENDOR_NAME_ENTRY("Interface Solutions") },
|
||||
{ "ISL", _VENDOR_NAME_ENTRY("Isolation Systems") },
|
||||
{ "ITA", _VENDOR_NAME_ENTRY("Itausa") },
|
||||
{ "ITC", _VENDOR_NAME_ENTRY("ITK") },
|
||||
{ "ITN", _VENDOR_NAME_ENTRY("NTI Group/ASUS") },
|
||||
{ "ITK", _VENDOR_NAME_ENTRY("NTI Group") },
|
||||
{ "IVK", _VENDOR_NAME_ENTRY("Iiyama") },
|
||||
{ "IVM", _VENDOR_NAME_ENTRY("Idek Iiyama") },
|
||||
{ "IVO", _VENDOR_NAME_ENTRY("InfoVision OptoElectronics Co., Ltd")},
|
||||
{ "IVR", _VENDOR_NAME_ENTRY("Inlife-Handnet Co., Ltd.") },
|
||||
{ "IWR", _VENDOR_NAME_ENTRY("Icuiti Corporation") },
|
||||
|
||||
{ "JDI", _VENDOR_NAME_ENTRY("Japan Display Inc") },
|
||||
{ "JEN", _VENDOR_NAME_ENTRY("Jean") },
|
||||
{ "JKC", _VENDOR_NAME_ENTRY("JVC Kenwood Corporation") },
|
||||
{ "JVC", _VENDOR_NAME_ENTRY("JVC") },
|
||||
|
||||
{ "KDS", _VENDOR_NAME_ENTRY("Korea Data Systems") },
|
||||
{ "KDK", _VENDOR_NAME_ENTRY("Kodiak") },
|
||||
{ "KES", _VENDOR_NAME_ENTRY("Kesa Crop") },
|
||||
{ "KFC", _VENDOR_NAME_ENTRY("KFC Computek") },
|
||||
{ "KPC", _VENDOR_NAME_ENTRY("King Phoenix") },
|
||||
{ "KSC", _VENDOR_NAME_ENTRY("Kinetic Systems") },
|
||||
{ "KTC", _VENDOR_NAME_ENTRY("Kingston Technology") },
|
||||
{ "KTG", _VENDOR_NAME_ENTRY("KayserThrede") },
|
||||
{ "KTR", _VENDOR_NAME_ENTRY("IMRI") },
|
||||
{ "KYC", _VENDOR_NAME_ENTRY("Kyocera") },
|
||||
|
||||
{ "LAG", _VENDOR_NAME_ENTRY("Laguna Systems") },
|
||||
{ "LCD", _VENDOR_NAME_ENTRY("Toshiba Matsushita Display Technology Co., Ltd")},
|
||||
{ "LCS", _VENDOR_NAME_ENTRY("Longshine Electronics") },
|
||||
{ "LEF", _VENDOR_NAME_ENTRY("Leaf Systems") },
|
||||
{ "LEN", _VENDOR_NAME_ENTRY("Lenovo Group Limited") },
|
||||
{ "LGD", _VENDOR_NAME_ENTRY("LG Display") },
|
||||
{ "LGE", _VENDOR_NAME_ENTRY("LG Electronics") },
|
||||
{ "LKM", _VENDOR_NAME_ENTRY("Likom/LKM") },
|
||||
{ "LNK", _VENDOR_NAME_ENTRY("Link Technologies") },
|
||||
{ "LTI", _VENDOR_NAME_ENTRY("Longshine") },
|
||||
{ "LTN", _VENDOR_NAME_ENTRY("Lite-On") },
|
||||
|
||||
{ "MAG", _VENDOR_NAME_ENTRY("MAG Technology") },
|
||||
{ "MAX", _VENDOR_NAME_ENTRY("Maxdata/Belinea") },
|
||||
{ "MAY", _VENDOR_NAME_ENTRY("Maynard Electronics") },
|
||||
{ "MBC", _VENDOR_NAME_ENTRY("MBC") },
|
||||
{ "MCC", _VENDOR_NAME_ENTRY("MCCI") },
|
||||
{ "MCD", _VENDOR_NAME_ENTRY("McDATA") },
|
||||
{ "MCI", _VENDOR_NAME_ENTRY("Micronics") },
|
||||
{ "MCR", _VENDOR_NAME_ENTRY("Marina Communications") },
|
||||
{ "MCS", _VENDOR_NAME_ENTRY("Micro Computer Systems") },
|
||||
{ "MCT", _VENDOR_NAME_ENTRY("Microtec") },
|
||||
{ "MDD", _VENDOR_NAME_ENTRY("Modis") },
|
||||
{ "MDG", _VENDOR_NAME_ENTRY("Madge Networks") },
|
||||
{ "MDS", _VENDOR_NAME_ENTRY("Micro Display Systems") },
|
||||
{ "MDT", _VENDOR_NAME_ENTRY("Magus Data") },
|
||||
{ "MED", _VENDOR_NAME_ENTRY("Medion") },
|
||||
{ "MEI", _VENDOR_NAME_ENTRY("Panasonic") },
|
||||
{ "MEL", _VENDOR_NAME_ENTRY("Mitsubishi") },
|
||||
{ "MET", _VENDOR_NAME_ENTRY("Metheus") },
|
||||
{ "MFG", _VENDOR_NAME_ENTRY("Microfield Graphics") },
|
||||
{ "MGC", _VENDOR_NAME_ENTRY("CompuAdd") },
|
||||
{ "MGT", _VENDOR_NAME_ENTRY("Megatech") },
|
||||
{ "MIC", _VENDOR_NAME_ENTRY("Micronics") },
|
||||
{ "MIR", _VENDOR_NAME_ENTRY("Miro") },
|
||||
{ "MJI", _VENDOR_NAME_ENTRY("MARANTZ JAPAN, INC.") },
|
||||
{ "MLX", _VENDOR_NAME_ENTRY("Mylex") },
|
||||
{ "MMX", _VENDOR_NAME_ENTRY("MAG Technology") },
|
||||
{ "MOR", _VENDOR_NAME_ENTRY("Morse Technology") },
|
||||
{ "MSI", _VENDOR_NAME_ENTRY("Microstep") },
|
||||
{ "MST", _VENDOR_NAME_ENTRY("MS Telematica") },
|
||||
{ "MSV", _VENDOR_NAME_ENTRY("Mosgi") },
|
||||
{ "MTC", _VENDOR_NAME_ENTRY("Mitac") },
|
||||
{ "MTI", _VENDOR_NAME_ENTRY("Morse Technology") },
|
||||
{ "MTQ", _VENDOR_NAME_ENTRY("Mountain Computer") },
|
||||
{ "MTS", _VENDOR_NAME_ENTRY("Multi-Tech Systems") },
|
||||
{ "MTX", _VENDOR_NAME_ENTRY("Matrox") },
|
||||
{ "MVD", _VENDOR_NAME_ENTRY("Microvitec PLC") },
|
||||
{ "MVN", _VENDOR_NAME_ENTRY("META COMPANY") },
|
||||
{ "MWY", _VENDOR_NAME_ENTRY("Microway") },
|
||||
{ "MYA", _VENDOR_NAME_ENTRY("Monydata") },
|
||||
{ "MYL", _VENDOR_NAME_ENTRY("Mylex") },
|
||||
{ "MYX", _VENDOR_NAME_ENTRY("Micronyx") },
|
||||
{ "MZI", _VENDOR_NAME_ENTRY("Mozo") },
|
||||
|
||||
{ "NAN", _VENDOR_NAME_ENTRY("Nanao") },
|
||||
{ "NCA", _VENDOR_NAME_ENTRY("Siemens Nixdorf") },
|
||||
{ "NCD", _VENDOR_NAME_ENTRY("NCD") },
|
||||
{ "NCS", _VENDOR_NAME_ENTRY("Northgate") },
|
||||
{ "NDC", _VENDOR_NAME_ENTRY("National DataComm") },
|
||||
{ "NDS", _VENDOR_NAME_ENTRY("Nokia") },
|
||||
{ "NEC", _VENDOR_NAME_ENTRY("NEC") },
|
||||
{ "NIC", _VENDOR_NAME_ENTRY("National Instruments") },
|
||||
{ "NIT", _VENDOR_NAME_ENTRY("Network Info Technology") },
|
||||
{ "NOK", _VENDOR_NAME_ENTRY("Nokia") },
|
||||
{ "NPI", _VENDOR_NAME_ENTRY("Network Peripherals") },
|
||||
{ "NSC", _VENDOR_NAME_ENTRY("National Semiconductor") },
|
||||
{ "NSS", _VENDOR_NAME_ENTRY("Newport Systems") },
|
||||
{ "NTI", _VENDOR_NAME_ENTRY("New Tech") },
|
||||
{ "NVD", _VENDOR_NAME_ENTRY("NVIDIA") },
|
||||
{ "NVL", _VENDOR_NAME_ENTRY("Novell") },
|
||||
{ "NXG", _VENDOR_NAME_ENTRY("Nexgen") },
|
||||
|
||||
{ "OAS", _VENDOR_NAME_ENTRY("OAsys") },
|
||||
{ "OCN", _VENDOR_NAME_ENTRY("Olfan") },
|
||||
{ "OEC", _VENDOR_NAME_ENTRY("Daytek") },
|
||||
{ "OLC", _VENDOR_NAME_ENTRY("Olicom") },
|
||||
{ "OLI", _VENDOR_NAME_ENTRY("Olivetti") },
|
||||
{ "OKI", _VENDOR_NAME_ENTRY("OKI Electric Industrial Company Ltd") },
|
||||
{ "ONK", _VENDOR_NAME_ENTRY("ONKYO Corporation") },
|
||||
{ "OPT", _VENDOR_NAME_ENTRY("OPTi") },
|
||||
{ "OQI", _VENDOR_NAME_ENTRY("Optiquest") },
|
||||
{ "OTI", _VENDOR_NAME_ENTRY("Orchid Technology") },
|
||||
{ "OVR", _VENDOR_NAME_ENTRY("Oculus VR Inc.") },
|
||||
{ "OZO", _VENDOR_NAME_ENTRY("Zoom Telephonics") },
|
||||
|
||||
{ "PAR", _VENDOR_NAME_ENTRY("Parallan Comp Inc") },
|
||||
{ "PBE", _VENDOR_NAME_ENTRY("Packard Bell") },
|
||||
{ "PBI", _VENDOR_NAME_ENTRY("Pitney Bowes") },
|
||||
{ "PBN", _VENDOR_NAME_ENTRY("Packard Bell") },
|
||||
{ "PCI", _VENDOR_NAME_ENTRY("Pioneer Computer") },
|
||||
{ "PCP", _VENDOR_NAME_ENTRY("Procomp") },
|
||||
{ "PDR", _VENDOR_NAME_ENTRY("Pure Data") },
|
||||
{ "PEA", _VENDOR_NAME_ENTRY("Peacock") },
|
||||
{ "PGS", _VENDOR_NAME_ENTRY("Princeton Graphics") },
|
||||
{ "PHI", _VENDOR_NAME_ENTRY("Phillips") },
|
||||
{ "PHL", _VENDOR_NAME_ENTRY("Philips") },
|
||||
{ "PIO", _VENDOR_NAME_ENTRY("Pioneer Electronic Corporation") },
|
||||
{ "PI0", _VENDOR_NAME_ENTRY("Pioneer") },
|
||||
{ "PIR", _VENDOR_NAME_ENTRY("Pico Technology Inc") },
|
||||
{ "PJD", _VENDOR_NAME_ENTRY("Projectiondesign AS") },
|
||||
{ "PLB", _VENDOR_NAME_ENTRY("PLB") },
|
||||
{ "PLX", _VENDOR_NAME_ENTRY("Ocean Office Automation") },
|
||||
{ "PMC", _VENDOR_NAME_ENTRY("PMC Consumer Electronics") },
|
||||
{ "PMV", _VENDOR_NAME_ENTRY("MAG Technology") },
|
||||
{ "PNR", _VENDOR_NAME_ENTRY("Planar Systems, Inc.") },
|
||||
{ "PRO", _VENDOR_NAME_ENTRY("Proteon") },
|
||||
{ "PSI", _VENDOR_NAME_ENTRY("PSI Perceptive Solutions") },
|
||||
{ "PTS", _VENDOR_NAME_ENTRY("ProView/EMC/PTS") },
|
||||
{ "PVR", _VENDOR_NAME_ENTRY("Pimax Tech Co., Ltd") },
|
||||
|
||||
{ "QDI", _VENDOR_NAME_ENTRY("Quantum Data Incorporated") },
|
||||
{ "QDM", _VENDOR_NAME_ENTRY("Quadram") },
|
||||
{ "QTD", _VENDOR_NAME_ENTRY("Quantum 3D Inc") },
|
||||
{ "QTM", _VENDOR_NAME_ENTRY("Quantum") },
|
||||
|
||||
{ "RAC", _VENDOR_NAME_ENTRY("Racore Computer Products") },
|
||||
{ "RCE", _VENDOR_NAME_ENTRY("RCE") },
|
||||
{ "RCI", _VENDOR_NAME_ENTRY("RC International") },
|
||||
{ "REL", _VENDOR_NAME_ENTRY("Relisys") },
|
||||
{ "REM", _VENDOR_NAME_ENTRY("REM") },
|
||||
{ "RII", _VENDOR_NAME_ENTRY("Racal Interlan") },
|
||||
{ "RMP", _VENDOR_NAME_ENTRY("Research Machines") },
|
||||
{ "ROK", _VENDOR_NAME_ENTRY("Rockwell") },
|
||||
{ "RTI", _VENDOR_NAME_ENTRY("Rancho Technology") },
|
||||
{ "RUN", _VENDOR_NAME_ENTRY("RUNCO International") },
|
||||
|
||||
{ "SAM", _VENDOR_NAME_ENTRY("Samsung") },
|
||||
{ "SAN", _VENDOR_NAME_ENTRY("Sanyo Electric Co.,Ltd.") },
|
||||
{ "SCC", _VENDOR_NAME_ENTRY("SORD") },
|
||||
{ "SCD", _VENDOR_NAME_ENTRY("Sanyo") },
|
||||
{ "SDC", _VENDOR_NAME_ENTRY("Samsung Display Corp.") },
|
||||
{ "SDI", _VENDOR_NAME_ENTRY("Samtron/Sigma Designs") },
|
||||
{ "SDT", _VENDOR_NAME_ENTRY("Siemens AG") },
|
||||
{ "SEA", _VENDOR_NAME_ENTRY("Segate") },
|
||||
{ "SEC", _VENDOR_NAME_ENTRY("Seiko/Epson") },
|
||||
{ "SEN", _VENDOR_NAME_ENTRY("Sencore") },
|
||||
{ "SFL", _VENDOR_NAME_ENTRY("Shiftall Inc") },
|
||||
{ "SGT", _VENDOR_NAME_ENTRY("Stargate Technology/AT&T") },
|
||||
{ "SGX", _VENDOR_NAME_ENTRY("SGI") },
|
||||
{ "SHP", _VENDOR_NAME_ENTRY("Sharp") },
|
||||
{ "SIB", _VENDOR_NAME_ENTRY("Sanyo") },
|
||||
{ "SIE", _VENDOR_NAME_ENTRY("Siemens Nixdorf") },
|
||||
{ "SII", _VENDOR_NAME_ENTRY("Silicon Image, Inc.") },
|
||||
{ "SIS", _VENDOR_NAME_ENTRY("SiS/Modula Tech") },
|
||||
{ "SIT", _VENDOR_NAME_ENTRY("Sitintel") },
|
||||
{ "SIX", _VENDOR_NAME_ENTRY("Zuniq Data") },
|
||||
{ "SKD", _VENDOR_NAME_ENTRY("Schneider & Koch") },
|
||||
{ "SKW", _VENDOR_NAME_ENTRY("Skyworth") },
|
||||
{ "SKY", _VENDOR_NAME_ENTRY("SKYDATA S.P.A.") },
|
||||
{ "SLB", _VENDOR_NAME_ENTRY("Shlumberger Ltd") },
|
||||
{ "SLT", _VENDOR_NAME_ENTRY("Salt Internatioinal Corp.") },
|
||||
{ "SLX", _VENDOR_NAME_ENTRY("Specialix") },
|
||||
{ "SMC", _VENDOR_NAME_ENTRY("Standard Microsystems") },
|
||||
{ "SMI", _VENDOR_NAME_ENTRY("Smile") },
|
||||
{ "SML", _VENDOR_NAME_ENTRY("Smile") },
|
||||
{ "SMN", _VENDOR_NAME_ENTRY("Somnium Space Ltd") },
|
||||
{ "SMS", _VENDOR_NAME_ENTRY("Silicon Multimedia Systems") },
|
||||
{ "SNI", _VENDOR_NAME_ENTRY("Siemens Nixdorf") },
|
||||
{ "SNY", _VENDOR_NAME_ENTRY("Sony") },
|
||||
{ "SOB", _VENDOR_NAME_ENTRY("Sanyo") },
|
||||
{ "SPE", _VENDOR_NAME_ENTRY("SPEA") },
|
||||
{ "SPT", _VENDOR_NAME_ENTRY("Sceptre") },
|
||||
{ "SRC", _VENDOR_NAME_ENTRY("Shamrock/SunRiver") },
|
||||
{ "SSS", _VENDOR_NAME_ENTRY("S3") },
|
||||
{ "STA", _VENDOR_NAME_ENTRY("Stesa") },
|
||||
{ "STB", _VENDOR_NAME_ENTRY("STB Systems") },
|
||||
{ "STC", _VENDOR_NAME_ENTRY("Sampo/STAC") },
|
||||
{ "STP", _VENDOR_NAME_ENTRY("Sceptre") },
|
||||
{ "STR", _VENDOR_NAME_ENTRY("Starlight Networks") },
|
||||
{ "SUK", _VENDOR_NAME_ENTRY("Schneider & Koch") },
|
||||
{ "SUP", _VENDOR_NAME_ENTRY("Supra/Diamond Media") },
|
||||
{ "SUR", _VENDOR_NAME_ENTRY("Surenam") },
|
||||
{ "SVR", _VENDOR_NAME_ENTRY("Sensics Inc.") },
|
||||
{ "SYL", _VENDOR_NAME_ENTRY("Sylvania") },
|
||||
{ "SYN", _VENDOR_NAME_ENTRY("Synaptics Inc") },
|
||||
|
||||
{ "TAI", _VENDOR_NAME_ENTRY("Toshiba") },
|
||||
{ "TAT", _VENDOR_NAME_ENTRY("Tatung") },
|
||||
{ "TAX", _VENDOR_NAME_ENTRY("Taxan") },
|
||||
{ "TCC", _VENDOR_NAME_ENTRY("Tandon") },
|
||||
{ "TCI", _VENDOR_NAME_ENTRY("Tulip") },
|
||||
{ "TCL", _VENDOR_NAME_ENTRY("Tech Concepts") },
|
||||
{ "TCM", _VENDOR_NAME_ENTRY("Techmedia/3Com") },
|
||||
{ "TCO", _VENDOR_NAME_ENTRY("Thomas Conrad") },
|
||||
{ "TCR", _VENDOR_NAME_ENTRY("Thomson Consumer Electronics") },
|
||||
{ "TCS", _VENDOR_NAME_ENTRY("Tatung") },
|
||||
{ "TDS", _VENDOR_NAME_ENTRY("Tri Data Systems") },
|
||||
{ "TDT", _VENDOR_NAME_ENTRY("TDT") },
|
||||
{ "TDY", _VENDOR_NAME_ENTRY("Tandy") },
|
||||
{ "TEA", _VENDOR_NAME_ENTRY("Teac") },
|
||||
{ "TEC", _VENDOR_NAME_ENTRY("Tecmar") },
|
||||
{ "TEI", _VENDOR_NAME_ENTRY("TECO") },
|
||||
{ "TGI", _VENDOR_NAME_ENTRY("TriGem") },
|
||||
{ "TGS", _VENDOR_NAME_ENTRY("Torus") },
|
||||
{ "TMA", _VENDOR_NAME_ENTRY("Tianma Microelectronics") },
|
||||
{ "TOS", _VENDOR_NAME_ENTRY("Toshiba") },
|
||||
{ "TRI", _VENDOR_NAME_ENTRY("Tricord") },
|
||||
{ "TRM", _VENDOR_NAME_ENTRY("Tekram") },
|
||||
{ "TRL", _VENDOR_NAME_ENTRY("Royal") },
|
||||
{ "TRS", _VENDOR_NAME_ENTRY("Torus") },
|
||||
{ "TRU", _VENDOR_NAME_ENTRY("Aashima/Truevision") },
|
||||
{ "TSB", _VENDOR_NAME_ENTRY("Toshiba") },
|
||||
{ "TSC", _VENDOR_NAME_ENTRY("Sanyo") },
|
||||
{ "TSI", _VENDOR_NAME_ENTRY("TeleVideo") },
|
||||
{ "TST", _VENDOR_NAME_ENTRY("Transtream Inc") },
|
||||
{ "TTC", _VENDOR_NAME_ENTRY("Telecommunications Techniques") },
|
||||
{ "TTK", _VENDOR_NAME_ENTRY("Totoku") },
|
||||
{ "TTX", _VENDOR_NAME_ENTRY("TTX") },
|
||||
{ "TVI", _VENDOR_NAME_ENTRY("TeleVideo/Truevision") },
|
||||
{ "TVM", _VENDOR_NAME_ENTRY("TVM") },
|
||||
{ "TWA", _VENDOR_NAME_ENTRY("Tidewater") },
|
||||
{ "TWE", _VENDOR_NAME_ENTRY("Kontron") },
|
||||
{ "TXN", _VENDOR_NAME_ENTRY("Texas Instruments") },
|
||||
{ "TYN", _VENDOR_NAME_ENTRY("Tyan Computer") },
|
||||
|
||||
{ "UBI", _VENDOR_NAME_ENTRY("Ungermann Bass") },
|
||||
{ "UFO", _VENDOR_NAME_ENTRY("UFO Systems") },
|
||||
{ "UNA", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "UNI", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "UNM", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "UNO", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "UNS", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "UNT", _VENDOR_NAME_ENTRY("Unisys") },
|
||||
{ "USC", _VENDOR_NAME_ENTRY("UltraStor") },
|
||||
{ "USR", _VENDOR_NAME_ENTRY("US Robotics") },
|
||||
{ "UTB", _VENDOR_NAME_ENTRY("Utobia") },
|
||||
|
||||
{ "VES", _VENDOR_NAME_ENTRY("Vestel") },
|
||||
{ "VIK", _VENDOR_NAME_ENTRY("Viking") },
|
||||
{ "VLV", _VENDOR_NAME_ENTRY("Valve Corporation") },
|
||||
{ "VMI", _VENDOR_NAME_ENTRY("Vermont MicroSystems") },
|
||||
{ "VOB", _VENDOR_NAME_ENTRY("Vobis") },
|
||||
{ "VRG", _VENDOR_NAME_ENTRY("VRgineers, Inc. ") },
|
||||
{ "VRT", _VENDOR_NAME_ENTRY("Varjo Technologies") },
|
||||
{ "VSC", _VENDOR_NAME_ENTRY("ViewSonic") },
|
||||
|
||||
{ "WAC", _VENDOR_NAME_ENTRY("Wacom Tech") },
|
||||
{ "WDC", _VENDOR_NAME_ENTRY("Western Digital") },
|
||||
{ "WDE", _VENDOR_NAME_ENTRY("Westinghouse Digital Electronics") },
|
||||
{ "WIL", _VENDOR_NAME_ENTRY("WIPRO") },
|
||||
{ "WTC", _VENDOR_NAME_ENTRY("Wen Technology") },
|
||||
{ "WYS", _VENDOR_NAME_ENTRY("Wyse Technology") },
|
||||
|
||||
{ "YMH", _VENDOR_NAME_ENTRY("Yamaha Corporation") },
|
||||
{ "YHQ", _VENDOR_NAME_ENTRY("Yokogawa") },
|
||||
|
||||
{ "ZCM", _VENDOR_NAME_ENTRY("Zenith") },
|
||||
{ "ZDS", _VENDOR_NAME_ENTRY("Zenith") },
|
||||
{ "ZYT", _VENDOR_NAME_ENTRY("Zytex") },
|
||||
};
|
||||
|
||||
#endif /* __NV_PNP_VENDOR_IDS_H__ */
|
||||
|
||||
217
src/common/inc/nvSemaphoreCommon.h
Normal file
217
src/common/inc/nvSemaphoreCommon.h
Normal file
@@ -0,0 +1,217 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __NV_SEMAPHORE_H__
|
||||
#define __NV_SEMAPHORE_H__
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "nvCpuIntrinsics.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef volatile struct {
|
||||
NvU32 payload;
|
||||
NvU32 reportValue;
|
||||
NvU64 timer;
|
||||
} NvReportSemaphore32;
|
||||
|
||||
typedef volatile struct {
|
||||
NvU64 reportValue;
|
||||
NvU64 timer;
|
||||
} NvReportSemaphore64;
|
||||
|
||||
typedef volatile union {
|
||||
NvReportSemaphore32 sema32;
|
||||
NvReportSemaphore64 sema64;
|
||||
} NvReportSemaphore;
|
||||
|
||||
/*
|
||||
* These structures can't change size. They map to the GPU and other driver
|
||||
* components expect the same size.
|
||||
*/
|
||||
ct_assert(sizeof(NvReportSemaphore32) == 16);
|
||||
ct_assert(sizeof(NvReportSemaphore64) == 16);
|
||||
ct_assert(sizeof(NvReportSemaphore) == 16);
|
||||
|
||||
/*
|
||||
* Pre-Volta GPUs can only read/write a 32-bit semaphore. Rather than try to
|
||||
* use multiple semaphore writes to emulate a full 64-bit write, which is prone
|
||||
* to race conditions when the value wraps, derive the full 64-bit value by
|
||||
* comparing the current GPU-accessible value with the the last value written by
|
||||
* the CPU or submitted to be written by the GPU, which is stashed in the
|
||||
* timestamp field of the semaphore by the CPU in both these cases.
|
||||
*/
|
||||
static inline void NvTimeSemFermiSetMaxSubmittedVal(
|
||||
volatile NvU64 *maxSubmittedPtr,
|
||||
const NvU64 value)
|
||||
{
|
||||
NvU64 oldValue =
|
||||
(NvU64)__NVatomicCompareExchange64((volatile NvS64 *)maxSubmittedPtr,
|
||||
0, 0);
|
||||
|
||||
// Atomically set report->timer to max(value, report->time).
|
||||
while (oldValue < value) {
|
||||
const NvU64 prevValue =
|
||||
(NvU64)__NVatomicCompareExchange64((volatile NvS64 *)maxSubmittedPtr,
|
||||
(NvS64)value,
|
||||
(NvS64)oldValue);
|
||||
if (prevValue == oldValue) {
|
||||
// The specified value was set. Done.
|
||||
nvAssert(*maxSubmittedPtr >= value);
|
||||
break;
|
||||
}
|
||||
|
||||
oldValue = prevValue;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void NvTimeSemFermiSetMaxSubmitted(
|
||||
NvReportSemaphore32 *report,
|
||||
const NvU64 value)
|
||||
{
|
||||
NvTimeSemFermiSetMaxSubmittedVal(&report->timer, value);
|
||||
}
|
||||
|
||||
static inline NvU64 NvTimeSemFermiGetPayloadVal(
|
||||
volatile void *payloadPtr,
|
||||
volatile void *maxSubmittedPtr)
|
||||
{
|
||||
// The ordering of the two operations below is critical. Other threads
|
||||
// may be submitting GPU work that modifies the semaphore value, or
|
||||
// modifying it from the CPU themselves. Both of those operations first
|
||||
// set the 64-bit max submitted/timer value, then modify or submit work
|
||||
// to modify the 32-bit payload value. Consider this hypothetical timeline
|
||||
// if the order of operations below is reversed:
|
||||
//
|
||||
// thread1:
|
||||
// -SetMaxSubmitted(0x1);
|
||||
// -report->payload = 0x1;
|
||||
//
|
||||
// thread2:
|
||||
// -Reads 0x1 from report->timer
|
||||
//
|
||||
// thread1:
|
||||
// -SetMaxSubmitted(0x7fffffff);
|
||||
// -report->payload = 0x7fffffff;
|
||||
// -SetMaxSubmitted(0x100000000);
|
||||
// -report->payload = 0x00000000;
|
||||
//
|
||||
// thread2:
|
||||
// -Reads 0x0 from report->payload
|
||||
//
|
||||
// The logic below would see 0 (payload) is less than 1 (max submitted) and
|
||||
// determine a wrap is outstanding, subtract one from the high 32-bits of
|
||||
// the max submitted value (0x00000000 - 0x1), overflow, and return the
|
||||
// current 64-bit value as 0xffffffff00000000 when the correct value is
|
||||
// 0x100000000. To avoid this, we must read the payload prior to reading
|
||||
// the max submitted value from the timer field. The logic can correctly
|
||||
// adjust the max submitted value back down if a wrap occurs between these
|
||||
// two operations, but has no way to bump the max submitted value up if a
|
||||
// wrap occurs with the opposite ordering.
|
||||
NvU64 current = *(volatile NvU32*)payloadPtr;
|
||||
// Use an atomic exchange to ensure the 64-bit read is atomic even on 32-bit
|
||||
// CPUs.
|
||||
NvU64 submitted = (NvU64)
|
||||
__NVatomicCompareExchange64((volatile NvS64 *)maxSubmittedPtr, 0ll, 0ll);
|
||||
|
||||
nvAssert(!(current & 0xFFFFFFFF00000000ull));
|
||||
|
||||
// The value is monotonically increasing, and differ by no more than
|
||||
// 2^31 - 1. Hence, if the low word of the submitted value is less
|
||||
// than the low word of the current value, exactly one 32-bit wrap
|
||||
// occurred between the current value and the most recently
|
||||
// submitted value. Walk back the high word to match the value
|
||||
// associated with the current GPU-visible value.
|
||||
if ((submitted & 0xFFFFFFFFull) < current) {
|
||||
submitted -= 0x100000000ull;
|
||||
}
|
||||
|
||||
current |= (submitted & 0xFFFFFFFF00000000ull);
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
static inline NvU64 NvTimeSemFermiGetPayload(
|
||||
NvReportSemaphore32 *report)
|
||||
{
|
||||
return NvTimeSemFermiGetPayloadVal(&report->payload, &report->timer);
|
||||
}
|
||||
|
||||
static inline void NvTimeSemFermiSetPayload(
|
||||
NvReportSemaphore32 *report,
|
||||
const NvU64 payload)
|
||||
{
|
||||
// First save the actual value to the reserved/timer bits
|
||||
NvTimeSemFermiSetMaxSubmittedVal(&report->timer, payload);
|
||||
|
||||
// Then write the low bits to the GPU-accessible semaphore value.
|
||||
report->payload = (NvU32)(payload & 0xFFFFFFFFULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Volta and up.
|
||||
*/
|
||||
|
||||
static inline NvU64 NvTimeSemVoltaGetPayloadVal(
|
||||
volatile void *payloadPtr)
|
||||
{
|
||||
nvAssert(payloadPtr);
|
||||
return (NvU64)
|
||||
__NVatomicCompareExchange64((volatile NvS64 *)payloadPtr,
|
||||
0, 0);
|
||||
}
|
||||
|
||||
static inline NvU64 NvTimeSemVoltaGetPayload(
|
||||
NvReportSemaphore64 *report)
|
||||
{
|
||||
return NvTimeSemVoltaGetPayloadVal(&report->reportValue);
|
||||
}
|
||||
|
||||
static inline void NvTimeSemVoltaSetPayload(
|
||||
NvReportSemaphore64 *report,
|
||||
const NvU64 payload)
|
||||
{
|
||||
NvU64 oldPayload = 0;
|
||||
|
||||
while (NV_TRUE) {
|
||||
NvU64 prevPayload = (NvU64)
|
||||
__NVatomicCompareExchange64((volatile NvS64 *)&report->reportValue,
|
||||
(NvS64)payload, (NvS64)oldPayload);
|
||||
|
||||
if (prevPayload == oldPayload) {
|
||||
break;
|
||||
}
|
||||
|
||||
nvAssert(prevPayload < payload);
|
||||
|
||||
oldPayload = prevPayload;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* __NV_SEMAPHORE_H__ */
|
||||
390
src/common/inc/nvSha1.h
Normal file
390
src/common/inc/nvSha1.h
Normal file
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2007-2012 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Utility header file to generate a one-way hash from an arbitrary
|
||||
* byte array, using the Secure Hashing Algorithm 1 (SHA-1) as defined
|
||||
* in FIPS PUB 180-1 published April 17, 1995:
|
||||
*
|
||||
* https://www.itl.nist.gov/fipspubs/fip180-1.htm
|
||||
*
|
||||
* Some common test cases (see Appendices A and B of the above document):
|
||||
*
|
||||
* SHA1("abc") =
|
||||
* A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
|
||||
*
|
||||
* SHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
|
||||
* 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
|
||||
*/
|
||||
|
||||
#ifndef __NV_SHA1_H__
|
||||
#define __NV_SHA1_H__
|
||||
|
||||
#include "nvtypes.h"
|
||||
|
||||
/*!
|
||||
* @brief Structure used by the SHA-1 functions to maintain the state of the
|
||||
* calculations.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
NvU32 state[5];
|
||||
NvU32 count;
|
||||
NvU8 buffer[128];
|
||||
} Sha1Context;
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Pointer to a memory accessor function for use by the SHA-1 hash
|
||||
* function.
|
||||
*
|
||||
* Due to memory constraints in some environments where this code is executed
|
||||
* (e.g., the PMU/DPU), the data that needs to be processed by the SHA-1 hash
|
||||
* function may not be readily available. This function is responsible for
|
||||
* copying the data into a buffer to be used by the SHA-1 function.
|
||||
*
|
||||
* Besides, SHA1 library can be used by many different clients, so we need to
|
||||
* provide the memory accessor functions which can work in client's environment.
|
||||
*
|
||||
* @param[out] pBuff The buffer to copy the new data to.
|
||||
* @param[in] index The desired offset to begin copying from.
|
||||
* @param[in] size The requested number of bytes to be copied.
|
||||
* @param[in] info Pointer to the data passed into GenerateSha1 as pData.
|
||||
*
|
||||
* @return The actual number of bytes copied into the buffer.
|
||||
*/
|
||||
|
||||
typedef NvU32 Sha1CopyFunc(NvU8 *pBuff, NvU32 index, NvU32 size, void *pInfo);
|
||||
|
||||
|
||||
/*
|
||||
* The following values are defined by the SHA-1 algorithm for initial values.
|
||||
*/
|
||||
#define SHA1_INIT_H0 0x67452301 //!< Initial H0 value
|
||||
#define SHA1_INIT_H1 0xEFCDAB89 //!< Initial H1 value
|
||||
#define SHA1_INIT_H2 0x98BADCFE //!< Initial H2 value
|
||||
#define SHA1_INIT_H3 0x10325476 //!< Initial H3 value
|
||||
#define SHA1_INIT_H4 0xC3D2E1F0 //!< Initial H4 value
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Reverses the byte order of a word; that is, switching the endianness
|
||||
* of the word.
|
||||
*
|
||||
* @param[in] a A 32-bit word
|
||||
*
|
||||
* @returns The 32-bit word with its byte order reversed.
|
||||
*/
|
||||
|
||||
#define REVERSE_BYTE_ORDER(a) \
|
||||
(((a) >> 24) | ((a) << 24) | (((a) >> 8) & 0xFF00) | (((a) << 8) & 0xFF0000))
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Computation step as defined by SHA-1.
|
||||
*
|
||||
* Unlike the 64 byte buffer version outlined in the SHA-1 algorithm, this
|
||||
* function uses a 128 byte buffer to minimize the calculation needed to
|
||||
* index the data.
|
||||
*
|
||||
* @param[in,out] pState
|
||||
* Pointer to State word array.
|
||||
*
|
||||
* @param[in] pBuffer
|
||||
* Data to operate on. 128 bytes in length. No length checking is done,
|
||||
* and is assumed to have been done by the calling function.
|
||||
*/
|
||||
|
||||
static void
|
||||
_sha1Transform
|
||||
(
|
||||
NvU32 *pState,
|
||||
NvU8 *pBuffer
|
||||
)
|
||||
{
|
||||
NvU32 a = pState[0];
|
||||
NvU32 b = pState[1];
|
||||
NvU32 c = pState[2];
|
||||
NvU32 d = pState[3];
|
||||
NvU32 e = pState[4];
|
||||
NvU32 *pBuf = (NvU32 *)pBuffer;
|
||||
NvU32 *p;
|
||||
NvU32 i;
|
||||
NvU32 j;
|
||||
NvU32 k;
|
||||
|
||||
for (i = 0; i < 80; i++)
|
||||
{
|
||||
p = &pBuf[i & 0xf];
|
||||
j = p[0];
|
||||
if (i < 16)
|
||||
{
|
||||
j = REVERSE_BYTE_ORDER(j);
|
||||
}
|
||||
else
|
||||
{
|
||||
j ^= p[2] ^ p[8] ^ p[13];
|
||||
j = (j << 1) + (j >> 31);
|
||||
}
|
||||
p[0] = p[16] = j;
|
||||
if (i < 40)
|
||||
{
|
||||
if (i < 20)
|
||||
{
|
||||
k = 0x5a827999 + ((b & (c ^ d)) ^ d);
|
||||
}
|
||||
else
|
||||
{
|
||||
k = 0x6ed9eba1 + (b ^ c ^ d);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i < 60)
|
||||
{
|
||||
k = 0x8f1bbcdc + (((b | c) & d) | (b & c));
|
||||
}
|
||||
else
|
||||
{
|
||||
k = 0xca62c1d6 + (b ^ c ^ d);
|
||||
}
|
||||
}
|
||||
j += (a << 5) + (a >> 27) + e + k;
|
||||
e = d;
|
||||
d = c;
|
||||
c = (b << 30) + (b >> 2);
|
||||
b = a;
|
||||
a = j;
|
||||
}
|
||||
pState[0] += a;
|
||||
pState[1] += b;
|
||||
pState[2] += c;
|
||||
pState[3] += d;
|
||||
pState[4] += e;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Initializes the SHA-1 context.
|
||||
*
|
||||
* @param[out] pContext
|
||||
* Pointer to the context to initialize.
|
||||
*/
|
||||
|
||||
static void
|
||||
_sha1Initialize
|
||||
(
|
||||
Sha1Context *pContext
|
||||
)
|
||||
{
|
||||
pContext->count = 0;
|
||||
pContext->state[0] = SHA1_INIT_H0;
|
||||
pContext->state[1] = SHA1_INIT_H1;
|
||||
pContext->state[2] = SHA1_INIT_H2;
|
||||
pContext->state[3] = SHA1_INIT_H3;
|
||||
pContext->state[4] = SHA1_INIT_H4;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Divides the input buffer into multiple 64-byte buffers and computes
|
||||
* the message digest for each.
|
||||
*
|
||||
* @param[in] pContext
|
||||
* Pointer to a Sha1Context.
|
||||
*
|
||||
* @param[in] pData
|
||||
* Pointer to the data array to compute the message digest.
|
||||
*
|
||||
* @param[in] len
|
||||
* Size of the data.
|
||||
*
|
||||
* @param[in] copyFunc
|
||||
* Copy routine to use.
|
||||
*/
|
||||
|
||||
static void
|
||||
_sha1Update
|
||||
(
|
||||
Sha1Context *pContext,
|
||||
void *pData,
|
||||
NvU32 len,
|
||||
Sha1CopyFunc copyFunc
|
||||
)
|
||||
{
|
||||
NvU32 buffer_offset = (pContext->count & 63);
|
||||
NvU32 copy_size;
|
||||
NvU32 idx = 0;
|
||||
|
||||
pContext->count += len;
|
||||
while ((buffer_offset + len) > 63)
|
||||
{
|
||||
copy_size = 64 - buffer_offset;
|
||||
copyFunc(&pContext->buffer[buffer_offset], idx, copy_size, pData);
|
||||
_sha1Transform(pContext->state, pContext->buffer);
|
||||
buffer_offset = 0;
|
||||
idx += copy_size;
|
||||
len -= copy_size;
|
||||
}
|
||||
if (len > 0)
|
||||
{
|
||||
copyFunc(&pContext->buffer[buffer_offset], idx, len, pData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* @brief fill memory with zero; not all environments in which this
|
||||
* code runs have memset(3).
|
||||
*
|
||||
* @param[out] pData
|
||||
* The memory to be filled with zero
|
||||
*
|
||||
* @param[in] nBytes
|
||||
* The number of bytes of memory to fill with zero
|
||||
*/
|
||||
|
||||
static NV_INLINE void
|
||||
_sha1MemZero
|
||||
(
|
||||
NvU8 *pData,
|
||||
NvU32 nBytes
|
||||
)
|
||||
{
|
||||
NvU32 i;
|
||||
|
||||
for (i = 0; i < nBytes; i++) {
|
||||
pData[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Pads the message as specified by the SHA-1 algorithm and computes
|
||||
* the message digest on the final message chunk(s).
|
||||
*
|
||||
* @param[out] pDigest
|
||||
* The SHA-1 hash values.
|
||||
*
|
||||
* @param[in] pContext
|
||||
* Pointer to a Sha1Context.
|
||||
*/
|
||||
|
||||
static void
|
||||
_sha1Final
|
||||
(
|
||||
NvU8 *pDigest,
|
||||
Sha1Context *pContext
|
||||
)
|
||||
{
|
||||
NvU32 i;
|
||||
NvU32 bufferOffset = (pContext->count & 63);
|
||||
NvU8 *pBuffer = (NvU8*)&pContext->buffer[bufferOffset];
|
||||
NvU32 *pCount;
|
||||
NvU32 *pDig32;
|
||||
|
||||
// append padding pattern to the end of input
|
||||
*pBuffer++ = 0x80;
|
||||
if (bufferOffset < 56)
|
||||
{
|
||||
_sha1MemZero(pBuffer, 59 - bufferOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
// need an extra sha1_transform
|
||||
if (bufferOffset < 63)
|
||||
{
|
||||
_sha1MemZero(pBuffer, 63 - bufferOffset);
|
||||
}
|
||||
_sha1Transform(pContext->state, pContext->buffer);
|
||||
_sha1MemZero(pContext->buffer, 60);
|
||||
}
|
||||
|
||||
// set final count (this is the number of *bits* not *bytes*)
|
||||
pCount = (NvU32*)&pContext->buffer[15 << 2];
|
||||
*pCount = REVERSE_BYTE_ORDER(pContext->count << 3);
|
||||
|
||||
_sha1Transform(pContext->state, pContext->buffer);
|
||||
|
||||
// output hash with each dword in big endian
|
||||
if (pDigest)
|
||||
{
|
||||
pDig32 = (NvU32*) pDigest;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
pDig32[i] = REVERSE_BYTE_ORDER(pContext->state[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Generates the SHA-1 hash value on the data provided.
|
||||
*
|
||||
* The function does not manipulate the source data directly, as it may not
|
||||
* have direct access to it. Therefore, it relies upon the copy function to
|
||||
* copy segments of the data into a local buffer before any manipulation takes
|
||||
* place.
|
||||
*
|
||||
* @param[out] pHash
|
||||
* Pointer to store the hash array. The buffer must be 20 bytes in
|
||||
* length, and the result is stored in big endian format.
|
||||
*
|
||||
* @param[in] pData
|
||||
* The source data array to transform. The actual values and make-up
|
||||
* of this parameter are dependent on the copy function.
|
||||
*
|
||||
* @param[in] nBytes
|
||||
* The size, in bytes, of the source data.
|
||||
*
|
||||
* @param[in] copyFunc
|
||||
* The function responsible for copying data from the source
|
||||
* for use by the sha1 function. It is possible for the data
|
||||
* to exist outside the current execution environment (e.g.,
|
||||
* the PMU, and the data to hash are in system memory), so
|
||||
* the function will never directly manipulate the source
|
||||
* data.
|
||||
*/
|
||||
|
||||
#define NV_SHA1_BLOCK_LENGTH 64
|
||||
#define NV_SHA1_DIGEST_LENGTH 20
|
||||
|
||||
static void
|
||||
sha1Generate
|
||||
(
|
||||
NvU8 pHash[NV_SHA1_DIGEST_LENGTH],
|
||||
void *pData,
|
||||
NvU32 nBytes,
|
||||
Sha1CopyFunc copyFunc
|
||||
)
|
||||
{
|
||||
Sha1Context context;
|
||||
|
||||
_sha1Initialize(&context);
|
||||
_sha1Update(&context, pData, nBytes, copyFunc);
|
||||
_sha1Final(pHash, &context);
|
||||
}
|
||||
|
||||
|
||||
#endif /* __NV_SHA1_H__ */
|
||||
16
src/common/inc/nvUnixVersion.h
Normal file
16
src/common/inc/nvUnixVersion.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __NV_UNIX_VERSION_H__
|
||||
#define __NV_UNIX_VERSION_H__
|
||||
|
||||
#if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS) || defined(NV_VMWARE) || defined(NV_QNX) || defined(NV_INTEGRITY) || \
|
||||
(defined(RMCFG_FEATURE_PLATFORM_GSP) && RMCFG_FEATURE_PLATFORM_GSP == 1) || \
|
||||
defined(NV_DCECORE)
|
||||
|
||||
#define NV_VERSION_STRING "580.00"
|
||||
|
||||
#else
|
||||
|
||||
#error "nvUnixVersion.h should only be included in UNIX builds"
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __NV_UNIX_VERSION_H__ */
|
||||
18
src/common/inc/nvVer.h
Normal file
18
src/common/inc/nvVer.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// nvVer.h - Versions of NV drivers
|
||||
|
||||
#define NV_COMPANY_NAME_STRING_SHORT "NVIDIA"
|
||||
#define NV_COMPANY_NAME_STRING_FULL "NVIDIA Corporation"
|
||||
#define NV_COMPANY_NAME_STRING NV_COMPANY_NAME_STRING_FULL
|
||||
#define NV_COPYRIGHT_YEAR "2025"
|
||||
#define NV_COPYRIGHT "(C) " NV_COPYRIGHT_YEAR " NVIDIA Corporation. All rights reserved." // Please do not use the non-ascii copyright symbol for (C).
|
||||
|
||||
#if defined(NV_LINUX) || defined(NV_BSD) || defined(NV_SUNOS) || defined(NV_VMWARE) || defined(NV_QNX) || defined(NV_INTEGRITY) || \
|
||||
(defined(RMCFG_FEATURE_PLATFORM_GSP) && RMCFG_FEATURE_PLATFORM_GSP == 1) || \
|
||||
defined(NV_DCECORE)
|
||||
|
||||
// All Version numbering for Unix builds has moved. (Source should be re-directed to directly include that header.)
|
||||
#include "nvUnixVersion.h"
|
||||
|
||||
#else
|
||||
|
||||
#endif
|
||||
558
src/common/inc/nv_list.h
Normal file
558
src/common/inc/nv_list.h
Normal file
@@ -0,0 +1,558 @@
|
||||
/*
|
||||
* Copyright © 2010 Intel Corporation
|
||||
* Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
|
||||
* Copyright © 2012 NVIDIA Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was copied from the X.Org X server source at commit
|
||||
* 5884e7dedecdd82ddbb037360cf9c85143e094b5 and modified to match NVIDIA's X
|
||||
* driver code style.
|
||||
*/
|
||||
|
||||
#ifndef _NV_LIST_H_
|
||||
#define _NV_LIST_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
#include "nvmisc.h"
|
||||
|
||||
#define HAVE_TYPEOF 1
|
||||
|
||||
/**
|
||||
* @file Classic doubly-link circular list implementation.
|
||||
* For real usage examples of the linked list, see the file test/list.c
|
||||
*
|
||||
* Example:
|
||||
* We need to keep a list of struct foo in the parent struct bar, i.e. what
|
||||
* we want is something like this.
|
||||
*
|
||||
* struct bar {
|
||||
* ...
|
||||
* struct foo *list_of_foos; -----> struct foo {}, struct foo {}, struct foo{}
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* We need one list head in bar and a list element in all list_of_foos (both are of
|
||||
* data type 'NVListRec').
|
||||
*
|
||||
* struct bar {
|
||||
* ...
|
||||
* NVListRec list_of_foos;
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* struct foo {
|
||||
* ...
|
||||
* NVListRec entry;
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* Now we initialize the list head:
|
||||
*
|
||||
* struct bar bar;
|
||||
* ...
|
||||
* nvListInit(&bar.list_of_foos);
|
||||
*
|
||||
* Then we create the first element and add it to this list:
|
||||
*
|
||||
* struct foo *foo = malloc(...);
|
||||
* ....
|
||||
* nvListAdd(&foo->entry, &bar.list_of_foos);
|
||||
*
|
||||
* Repeat the above for each element you want to add to the list. Deleting
|
||||
* works with the element itself.
|
||||
* nvListDel(&foo->entry);
|
||||
* free(foo);
|
||||
*
|
||||
* Note: calling nvListDel(&bar.list_of_foos) will set bar.list_of_foos to an empty
|
||||
* list again.
|
||||
*
|
||||
* Looping through the list requires a 'struct foo' as iterator and the
|
||||
* name of the field the subnodes use.
|
||||
*
|
||||
* struct foo *iterator;
|
||||
* nvListForEachEntry(iterator, &bar.list_of_foos, entry) {
|
||||
* if (iterator->something == ...)
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* Note: You must not call nvListDel() on the iterator if you continue the
|
||||
* loop. You need to run the safe for-each loop instead:
|
||||
*
|
||||
* struct foo *iterator, *next;
|
||||
* nvListForEachEntry_safe(iterator, next, &bar.list_of_foos, entry) {
|
||||
* if (...)
|
||||
* nvListDel(&iterator->entry);
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* The linkage struct for list nodes. This struct must be part of your
|
||||
* to-be-linked struct. NVListRec is required for both the head of the
|
||||
* list and for each list node.
|
||||
*
|
||||
* Position and name of the NVListRec field is irrelevant.
|
||||
* There are no requirements that elements of a list are of the same type.
|
||||
* There are no requirements for a list head, any NVListRec can be a list
|
||||
* head.
|
||||
*/
|
||||
typedef struct NVList {
|
||||
struct NVList *next, *prev;
|
||||
} NVListRec, *NVListPtr;
|
||||
|
||||
/**
|
||||
* Initialize the list as an empty list.
|
||||
*
|
||||
* Example:
|
||||
* nvListInit(&bar->list_of_foos);
|
||||
*
|
||||
* @param The list to initialized.
|
||||
*/
|
||||
static NV_INLINE void
|
||||
nvListInit(NVListPtr list)
|
||||
{
|
||||
list->next = list->prev = list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the list as an empty list.
|
||||
*
|
||||
* This is functionally the same as nvListInit, but can be used for
|
||||
* initialization of global variables.
|
||||
*
|
||||
* Example:
|
||||
* static NVListRec list_of_foos = NV_LIST_INIT(&list_of_foos);
|
||||
*
|
||||
* @param The list to initialized.
|
||||
*/
|
||||
#define NV_LIST_INIT(head) { .prev = (head), .next = (head) }
|
||||
|
||||
static NV_INLINE void
|
||||
__nvListAdd(NVListPtr entry, NVListPtr prev, NVListPtr next)
|
||||
{
|
||||
next->prev = entry;
|
||||
entry->next = next;
|
||||
entry->prev = prev;
|
||||
prev->next = entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a new element after the given list head. The new element does not
|
||||
* need to be initialised as empty list.
|
||||
* The list changes from:
|
||||
* head -> some element -> ...
|
||||
* to
|
||||
* head -> new element -> older element -> ...
|
||||
*
|
||||
* Example:
|
||||
* struct foo *newfoo = malloc(...);
|
||||
* nvListAdd(&newfoo->entry, &bar->list_of_foos);
|
||||
*
|
||||
* @param entry The new element to prepend to the list.
|
||||
* @param head The existing list.
|
||||
*/
|
||||
static NV_INLINE void
|
||||
nvListAdd(NVListPtr entry, NVListPtr head)
|
||||
{
|
||||
__nvListAdd(entry, head, head->next);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a new element to the end of the list given with this list head.
|
||||
*
|
||||
* The list changes from:
|
||||
* head -> some element -> ... -> lastelement
|
||||
* to
|
||||
* head -> some element -> ... -> lastelement -> new element
|
||||
*
|
||||
* Example:
|
||||
* struct foo *newfoo = malloc(...);
|
||||
* nvListAppend(&newfoo->entry, &bar->list_of_foos);
|
||||
*
|
||||
* @param entry The new element to prepend to the list.
|
||||
* @param head The existing list.
|
||||
*/
|
||||
static NV_INLINE void
|
||||
nvListAppend(NVListPtr entry, NVListPtr head)
|
||||
{
|
||||
__nvListAdd(entry, head->prev, head);
|
||||
}
|
||||
|
||||
static NV_INLINE void
|
||||
__nvListDel(NVListPtr prev, NVListPtr next)
|
||||
{
|
||||
next->prev = prev;
|
||||
prev->next = next;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the element from the list it is in. Using this function will reset
|
||||
* the pointers to/from this element so it is removed from the list. It does
|
||||
* NOT free the element itself or manipulate it otherwise.
|
||||
*
|
||||
* Using nvListDel on a pure list head (like in the example at the top of
|
||||
* this file) will NOT remove the first element from
|
||||
* the list but rather reset the list as empty list.
|
||||
*
|
||||
* Example:
|
||||
* nvListDel(&foo->entry);
|
||||
*
|
||||
* @param entry The element to remove.
|
||||
*/
|
||||
static NV_INLINE void
|
||||
nvListDel(NVListPtr entry)
|
||||
{
|
||||
__nvListDel(entry->prev, entry->next);
|
||||
nvListInit(entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the list is empty.
|
||||
*
|
||||
* Example:
|
||||
* nvListIsEmpty(&bar->list_of_foos);
|
||||
*
|
||||
* @return True if the list contains one or more elements or False otherwise.
|
||||
*/
|
||||
static NV_INLINE NvBool
|
||||
nvListIsEmpty(const NVListRec *head)
|
||||
{
|
||||
return head->next == head;
|
||||
}
|
||||
|
||||
static NV_INLINE int
|
||||
nvListCount(const NVListRec *head)
|
||||
{
|
||||
NVListPtr next;
|
||||
int count = 0;
|
||||
|
||||
for (next = head->next; next != head; next = next->next) {
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if entry is present in the list.
|
||||
*
|
||||
* Example:
|
||||
* nvListPresent(&foo->entry, &bar->list_of_foos);
|
||||
*
|
||||
* @return 1 if the list contains the specified entry; otherwise, return 0.
|
||||
*/
|
||||
static NV_INLINE NvBool
|
||||
nvListPresent(const NVListRec *entry, const NVListRec *head)
|
||||
{
|
||||
const NVListRec *next;
|
||||
|
||||
for (next = head->next; next != head; next = next->next) {
|
||||
if (next == entry) {
|
||||
return NV_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return NV_FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a pointer to the container of this list element.
|
||||
*
|
||||
* Example:
|
||||
* struct foo* f;
|
||||
* f = nv_container_of(&foo->entry, struct foo, entry);
|
||||
* assert(f == foo);
|
||||
*
|
||||
* @param ptr Pointer to the NVListRec.
|
||||
* @param type Data type of the list element.
|
||||
* @param member Member name of the NVListRec field in the list element.
|
||||
* @return A pointer to the data struct containing the list head.
|
||||
*/
|
||||
#ifndef nv_container_of
|
||||
#define nv_container_of(ptr, type, member) \
|
||||
(type *)((char *)(ptr) - NV_OFFSETOF(type, member))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Alias of nv_container_of
|
||||
*/
|
||||
#define nvListEntry(ptr, type, member) \
|
||||
nv_container_of(ptr, type, member)
|
||||
|
||||
/**
|
||||
* Retrieve the first list entry for the given list pointer.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *first;
|
||||
* first = nvListFirstEntry(&bar->list_of_foos, struct foo, list_of_foos);
|
||||
*
|
||||
* @param ptr The list head
|
||||
* @param type Data type of the list element to retrieve
|
||||
* @param member Member name of the NVListRec field in the list element.
|
||||
* @return A pointer to the first list element.
|
||||
*/
|
||||
#define nvListFirstEntry(ptr, type, member) \
|
||||
nvListEntry((ptr)->next, type, member)
|
||||
|
||||
/**
|
||||
* Retrieve the last list entry for the given listpointer.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *first;
|
||||
* first = nvListLastEntry(&bar->list_of_foos, struct foo, list_of_foos);
|
||||
*
|
||||
* @param ptr The list head
|
||||
* @param type Data type of the list element to retrieve
|
||||
* @param member Member name of the NVListRec field in the list element.
|
||||
* @return A pointer to the last list element.
|
||||
*/
|
||||
#define nvListLastEntry(ptr, type, member) \
|
||||
nvListEntry((ptr)->prev, type, member)
|
||||
|
||||
#ifdef HAVE_TYPEOF
|
||||
#define __nv_container_of(ptr, sample, member) \
|
||||
nv_container_of(ptr, __typeof__(*sample), member)
|
||||
#else
|
||||
/* This implementation of __nv_container_of has undefined behavior according
|
||||
* to the C standard, but it works in many cases. If your compiler doesn't
|
||||
* support __typeof__() and fails with this implementation, please try a newer
|
||||
* compiler.
|
||||
*/
|
||||
#define __nv_container_of(ptr, sample, member) \
|
||||
(void *)((char *)(ptr) \
|
||||
- ((char *)&(sample)->member - (char *)(sample)))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Loop through the list given by head and set pos to struct in the list.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *iterator;
|
||||
* nvListForEachEntry(iterator, &bar->list_of_foos, entry) {
|
||||
* [modify iterator]
|
||||
* }
|
||||
*
|
||||
* This macro is not safe for node deletion. Use nvListForEachEntry_safe
|
||||
* instead.
|
||||
*
|
||||
* @param pos Iterator variable of the type of the list elements.
|
||||
* @param head List head
|
||||
* @param member Member name of the NVListRec in the list elements.
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_TYPEOF
|
||||
#define __NV_LIST_SET(x, y) x = y
|
||||
#else
|
||||
static NV_INLINE void __nvListSet(void **x, void *y)
|
||||
{
|
||||
*x = y;
|
||||
}
|
||||
|
||||
#define __NV_LIST_SET(x, y) __nvListSet((void **) &x, (void *) (y))
|
||||
#endif
|
||||
|
||||
#define nvListForEachEntry(pos, head, member) \
|
||||
for (__NV_LIST_SET(pos, __nv_container_of((head)->next, pos, member)); \
|
||||
&pos->member != (head); \
|
||||
__NV_LIST_SET(pos, __nv_container_of(pos->member.next, pos, member)))
|
||||
|
||||
/**
|
||||
* Loop through the list, keeping a backup pointer to the element. This
|
||||
* macro allows for the deletion of a list element while looping through the
|
||||
* list.
|
||||
*
|
||||
* See nvListForEachEntry for more details.
|
||||
*/
|
||||
#define nvListForEachEntry_safe(pos, tmp, head, member) \
|
||||
for (__NV_LIST_SET(pos, __nv_container_of((head)->next, pos, member)), \
|
||||
__NV_LIST_SET(tmp, __nv_container_of(pos->member.next, pos, member)); \
|
||||
&pos->member != (head); \
|
||||
__NV_LIST_SET(pos, tmp), \
|
||||
__NV_LIST_SET(tmp, __nv_container_of(pos->member.next, tmp, member)))
|
||||
|
||||
/* NULL-Terminated List Interface
|
||||
*
|
||||
* The interface below does _not_ use the NVListRec as described above.
|
||||
* It is mainly for legacy structures that cannot easily be switched to
|
||||
* NVListRec.
|
||||
*
|
||||
* This interface is for structs like
|
||||
* struct foo {
|
||||
* [...]
|
||||
* struct foo *next;
|
||||
* [...]
|
||||
* };
|
||||
*
|
||||
* The position and field name of "next" are arbitrary.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Init the element as null-terminated list.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *list = malloc();
|
||||
* nvNTListInit(list, next);
|
||||
*
|
||||
* @param list The list element that will be the start of the list
|
||||
* @param member Member name of the field pointing to next struct
|
||||
*/
|
||||
#define nvNTListInit(_list, _member) \
|
||||
(_list)->_member = NULL
|
||||
|
||||
/**
|
||||
* Returns the next element in the list or NULL on termination.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *element = list;
|
||||
* while ((element = nvNTListNext(element, next)) { }
|
||||
*
|
||||
* This macro is not safe for node deletion. Use nvListForEachEntry_safe
|
||||
* instead.
|
||||
*
|
||||
* @param list The list or current element.
|
||||
* @param member Member name of the field pointing to next struct.
|
||||
*/
|
||||
#define nvNTListNext(_list, _member) \
|
||||
(_list)->_member
|
||||
|
||||
/**
|
||||
* Iterate through each element in the list.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *iterator;
|
||||
* nvNTListForEachEntry(iterator, list, next) {
|
||||
* [modify iterator]
|
||||
* }
|
||||
*
|
||||
* @param entry Assigned to the current list element
|
||||
* @param list The list to iterate through.
|
||||
* @param member Member name of the field pointing to next struct.
|
||||
*/
|
||||
#define nvNTListForEachEntry(_entry, _list, _member) \
|
||||
for (_entry = _list; _entry; _entry = (_entry)->_member)
|
||||
|
||||
/**
|
||||
* Iterate through each element in the list, keeping a backup pointer to the
|
||||
* element. This macro allows for the deletion of a list element while
|
||||
* looping through the list.
|
||||
*
|
||||
* See nvNTListForEachEntry for more details.
|
||||
*
|
||||
* @param entry Assigned to the current list element
|
||||
* @param tmp The pointer to the next element
|
||||
* @param list The list to iterate through.
|
||||
* @param member Member name of the field pointing to next struct.
|
||||
*/
|
||||
#define nvNTListForEachEntrySafe(_entry, _tmp, _list, _member) \
|
||||
for (_entry = _list, _tmp = (_entry) ? (_entry)->_member : NULL;\
|
||||
_entry; \
|
||||
_entry = _tmp, _tmp = (_tmp) ? (_tmp)->_member: NULL)
|
||||
|
||||
/**
|
||||
* Append the element to the end of the list. This macro may be used to
|
||||
* merge two lists.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *elem = malloc(...);
|
||||
* nvNTListInit(elem, next)
|
||||
* nvNTListAppend(elem, list, struct foo, next);
|
||||
*
|
||||
* Resulting list order:
|
||||
* list_item_0 -> list_item_1 -> ... -> elem_item_0 -> elem_item_1 ...
|
||||
*
|
||||
* @param entry An entry (or list) to append to the list
|
||||
* @param list The list to append to. This list must be a valid list, not
|
||||
* NULL.
|
||||
* @param type The list type
|
||||
* @param member Member name of the field pointing to next struct
|
||||
*/
|
||||
#define nvNTListAppend(_entry, _list, _type, _member) \
|
||||
do { \
|
||||
_type *__iterator = _list; \
|
||||
while (__iterator->_member) { __iterator = __iterator->_member;}\
|
||||
__iterator->_member = _entry; \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Insert the element at the next position in the list. This macro may be
|
||||
* used to insert a list into a list.
|
||||
*
|
||||
* struct foo *elem = malloc(...);
|
||||
* nvNTListInit(elem, next)
|
||||
* nvNTListInsert(elem, list, struct foo, next);
|
||||
*
|
||||
* Resulting list order:
|
||||
* list_item_0 -> elem_item_0 -> elem_item_1 ... -> list_item_1 -> ...
|
||||
*
|
||||
* @param entry An entry (or list) to append to the list
|
||||
* @param list The list to insert to. This list must be a valid list, not
|
||||
* NULL.
|
||||
* @param type The list type
|
||||
* @param member Member name of the field pointing to next struct
|
||||
*/
|
||||
#define nvNTListInsert(_entry, _list, _type, _member) \
|
||||
do { \
|
||||
nvNTListAppend((_list)->_member, _entry, _type, _member); \
|
||||
(_list)->_member = _entry; \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Delete the entry from the list by iterating through the list and
|
||||
* removing any reference from the list to the entry.
|
||||
*
|
||||
* Example:
|
||||
* struct foo *elem = <assign to right element>
|
||||
* nvNTListDel(elem, list, struct foo, next);
|
||||
*
|
||||
* @param entry The entry to delete from the list. entry is always
|
||||
* re-initialized as a null-terminated list.
|
||||
* @param list The list containing the entry, set to the new list without
|
||||
* the removed entry.
|
||||
* @param type The list type
|
||||
* @param member Member name of the field pointing to the next entry
|
||||
*/
|
||||
#define nvNTListDel(_entry, _list, _type, _member) \
|
||||
do { \
|
||||
_type *__e = _entry; \
|
||||
if (__e == NULL || _list == NULL) break; \
|
||||
if ((_list) == __e) { \
|
||||
_list = __e->_member; \
|
||||
} else { \
|
||||
_type *__prev = _list; \
|
||||
while (__prev->_member && __prev->_member != __e) \
|
||||
__prev = nvNTListNext(__prev, _member); \
|
||||
if (__prev->_member) \
|
||||
__prev->_member = __e->_member; \
|
||||
} \
|
||||
nvNTListInit(__e, _member); \
|
||||
} while(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif /* _NV_LIST_H_ */
|
||||
46
src/common/inc/nv_mig_types.h
Normal file
46
src/common/inc/nv_mig_types.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __NV_MIG_TYPES_H__
|
||||
#define __NV_MIG_TYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nvtypes.h"
|
||||
|
||||
typedef NvU32 MIGDeviceId;
|
||||
|
||||
#define NO_MIG_DEVICE 0L
|
||||
|
||||
/* Convert a MIGDeviceId into a 0-based per-GPU subdevice index. */
|
||||
#define MIG_DEVICE_ID_SUBDEV_MASK 0xf0000000
|
||||
#define MIG_DEVICE_ID_SUBDEV_SHIFT 28
|
||||
|
||||
#define MIG_DEVICE_ID_TO_SUBDEV(migDeviceId) (((migDeviceId) & MIG_DEVICE_ID_SUBDEV_MASK) >> MIG_DEVICE_ID_SUBDEV_SHIFT)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NV_MIG_TYPES_H__ */
|
||||
100
src/common/inc/nv_smg.h
Normal file
100
src/common/inc/nv_smg.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __NV_SMG_H__
|
||||
#define __NV_SMG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "nvlimits.h"
|
||||
#include "nvgputypes.h"
|
||||
#include "nvctassert.h"
|
||||
#include "nvrmcontext.h"
|
||||
#include "nv_mig_types.h"
|
||||
|
||||
/*
|
||||
* In the context of SMG a MIG device description is the global identity or
|
||||
* fingerprint for one MIG device partition that the system has available.
|
||||
* These are queried through RM and thus they will be the same in
|
||||
* kernelspace and userspace, and remain immutable and cached for the
|
||||
* lifetime of the process or kernel module.
|
||||
*
|
||||
* For now, the graphics driver does NOT support SMG if the MIG partitions
|
||||
* change on the fly. RM supports reconfiguring partitions that are not in
|
||||
* use but, for now, the kernel and userspace graphics drivers expect the
|
||||
* topology of all physical and MIG devices to remain unchanged throughout
|
||||
* so that they can agree on the same set of known MIG devices. This is not
|
||||
* an unreasonable requirement.
|
||||
*
|
||||
* Each MIG device description is referred to by a semi-opaque MIGDeviceId.
|
||||
* The device id is actually the 0-based index to the table of MIG device
|
||||
* descriptions but with bits flipped so that null value is an invalid
|
||||
* device. This makes boolean interpretation work more naturally and makes
|
||||
* structs from calloc() initialize to an invalid device by default.
|
||||
*/
|
||||
typedef struct nvMIGDeviceDescriptionRec {
|
||||
/* The globally unique MIG device ID */
|
||||
MIGDeviceId migDeviceId;
|
||||
|
||||
/* RM sub/device instance of the physical device hosting the MIG device */
|
||||
NvU32 deviceInstance;
|
||||
NvU32 subDeviceInstance;
|
||||
|
||||
/* These three uniquely identify a particular MIG device */
|
||||
NvU32 gpuId;
|
||||
NvU32 gpuInstanceId;
|
||||
NvU32 computeInstanceId;
|
||||
|
||||
/* Whether this device is accessible to the calling process */
|
||||
NvBool smgAccessOk;
|
||||
/* MIG exec partition UUID string */
|
||||
char migUuid[NV_MIG_DEVICE_UUID_STR_LENGTH];
|
||||
NvU8 migUuidBin[NV_GPU_UUID_LEN];
|
||||
} nvMIGDeviceDescription;
|
||||
|
||||
NvBool nvSMGSubscribeSubDevToPartition(nvRMContextPtr rmctx,
|
||||
NvU32 subdevHandle,
|
||||
MIGDeviceId migDevice,
|
||||
NvU32 gpuInstSubscriptionHdl,
|
||||
NvU32 computeInstSubscriptionHdl);
|
||||
|
||||
NvU32 nvSMGGetDeviceByUUID(nvRMContextPtr rmctx,
|
||||
const char *migUuid,
|
||||
const nvMIGDeviceDescription **uniDev);
|
||||
NvU32 nvSMGGetDeviceById(nvRMContextPtr rmctx,
|
||||
MIGDeviceId migDev,
|
||||
const nvMIGDeviceDescription **uniDev);
|
||||
NvU32 nvSMGGetDeviceList(nvRMContextPtr rmctx,
|
||||
nvMIGDeviceDescription **devices,
|
||||
NvU32 *deviceCount);
|
||||
NvU32 nvSMGGetDefaultDeviceForDeviceInstance(nvRMContextPtr rmctx,
|
||||
NvU32 deviceInstance,
|
||||
const nvMIGDeviceDescription **uniDev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NV_SMG_H__ */
|
||||
219
src/common/inc/nv_speculation_barrier.h
Normal file
219
src/common/inc/nv_speculation_barrier.h
Normal file
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2018 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NVIDIA GPZ vulnerability mitigation definitions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* There are two copies of this file for legacy reasons:
|
||||
*
|
||||
* P4: <$NV_SOURCE/>drivers/common/inc/nv_speculation_barrier.h
|
||||
* Git: <tegra/core/>include/nv_speculation_barrier.h
|
||||
*
|
||||
* Both files need to be kept in sync if any changes are required.
|
||||
*/
|
||||
|
||||
#ifndef _NV_SPECULATION_BARRIER_H_
|
||||
#define _NV_SPECULATION_BARRIER_H_
|
||||
|
||||
#define NV_SPECULATION_BARRIER_VERSION 2
|
||||
|
||||
/*
|
||||
* GNU-C/MSC/clang - x86/x86_64 : x86_64, __i386, __i386__
|
||||
* GNU-C - THUMB mode : __GNUC__, __thumb__
|
||||
* GNU-C - ARM modes : __GNUC__, __arm__, __aarch64__
|
||||
* armclang - THUMB mode : __ARMCC_VERSION, __thumb__
|
||||
* armclang - ARM modes : __ARMCC_VERSION, __arm__, __aarch64__
|
||||
* GHS - THUMB mode : __ghs__, __THUMB__
|
||||
* GHS - ARM modes : __ghs__, __ARM__, __ARM64__
|
||||
*/
|
||||
|
||||
#if defined(_M_IX86) || defined(__i386__) || defined(__i386) \
|
||||
|| defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
|
||||
/* All x86 */
|
||||
#define NV_SPECULATION_BARRIER_x86
|
||||
|
||||
#elif defined(macintosh) || defined(__APPLE__) \
|
||||
|| defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__) \
|
||||
|| defined(__POWERPC__) || defined(__ppc) || defined(__ppc__) \
|
||||
|| defined(__ppc64__) || defined(__PPC__) \
|
||||
|| defined(__PPC64__) || defined(_ARCH_PPC) || defined(_ARCH_PPC64)
|
||||
/* All PowerPC */
|
||||
#define NV_SPECULATION_BARRIER_PPC
|
||||
|
||||
#elif (defined(__GNUC__) && defined(__thumb__)) \
|
||||
|| (defined(__ARMCC_VERSION) && defined(__thumb__)) \
|
||||
|| (defined(__ghs__) && defined(__THUMB__))
|
||||
/* ARM-thumb mode(<=ARMv7)/T32 (ARMv8) */
|
||||
#define NV_SPECULATION_BARRIER_ARM_COMMON
|
||||
#define NV_SPEC_BARRIER_CSDB ".inst.w 0xf3af8014\n"
|
||||
|
||||
#elif (defined(__GNUC__) && defined(__arm__)) \
|
||||
|| (defined(__ARMCC_VERSION) && defined(__arm__)) \
|
||||
|| (defined(__ghs__) && defined(__ARM__))
|
||||
/* aarch32(ARMv8) / arm(<=ARMv7) mode */
|
||||
#define NV_SPECULATION_BARRIER_ARM_COMMON
|
||||
#define NV_SPEC_BARRIER_CSDB ".inst 0xe320f014\n"
|
||||
|
||||
#elif (defined(__GNUC__) && defined(__aarch64__)) \
|
||||
|| (defined(__ARMCC_VERSION) && defined(__aarch64__)) \
|
||||
|| (defined(__ghs__) && defined(__ARM64__))
|
||||
/* aarch64(ARMv8) mode */
|
||||
#define NV_SPECULATION_BARRIER_ARM_COMMON
|
||||
#define NV_SPEC_BARRIER_CSDB "HINT #20\n"
|
||||
#elif defined(NVCPU_IS_RISCV64)
|
||||
# define nv_speculation_barrier()
|
||||
#else
|
||||
#error "Unknown compiler/chip family"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* nv_speculation_barrier -- General-purpose speculation barrier
|
||||
*
|
||||
* This approach provides full protection against variant-1 vulnerability.
|
||||
* However, the recommended approach is detailed below (See:
|
||||
* nv_array_index_no_speculate)
|
||||
*
|
||||
* Semantics:
|
||||
* Any memory read that is sequenced after a nv_speculation_barrier(),
|
||||
* and contained directly within the scope of nv_speculation_barrier() or
|
||||
* directly within a nested scope, will not speculatively execute until all
|
||||
* conditions for entering that scope have been architecturally resolved.
|
||||
*
|
||||
* Example:
|
||||
* if (untrusted_index_from_user < bound) {
|
||||
* ...
|
||||
* nv_speculation_barrier();
|
||||
* ...
|
||||
* x = array1[untrusted_index_from_user];
|
||||
* bit = x & 1;
|
||||
* y = array2[0x100 * bit];
|
||||
* }
|
||||
*/
|
||||
|
||||
#if defined(NV_SPECULATION_BARRIER_x86)
|
||||
// Delete after all references are changed to nv_speculation_barrier
|
||||
#define speculation_barrier() nv_speculation_barrier()
|
||||
|
||||
static inline void nv_speculation_barrier(void)
|
||||
{
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
__asm__ __volatile__ ("lfence" : : : "memory");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#elif defined(NV_SPECULATION_BARRIER_PPC)
|
||||
|
||||
static inline void nv_speculation_barrier(void)
|
||||
{
|
||||
asm volatile("ori 31,31,0");
|
||||
}
|
||||
|
||||
#elif defined(NV_SPECULATION_BARRIER_ARM_COMMON)
|
||||
|
||||
/* Note: Cortex-A9 GNU-assembler seems to complain about DSB SY */
|
||||
#define nv_speculation_barrier() \
|
||||
asm volatile \
|
||||
( \
|
||||
"DSB sy\n" \
|
||||
"ISB\n" \
|
||||
: : : "memory" \
|
||||
)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* nv_array_index_no_speculate -- Recommended variant-1 mitigation approach
|
||||
*
|
||||
* The array-index-no-speculate approach "de-speculates" an array index that
|
||||
* has already been bounds-checked.
|
||||
*
|
||||
* This approach is preferred over nv_speculation_barrier due to the following
|
||||
* reasons:
|
||||
* - It is just as effective as the general-purpose speculation barrier.
|
||||
* - It clearly identifies what array index is being de-speculated and is thus
|
||||
* self-commenting, whereas the general-purpose speculation barrier requires
|
||||
* an explanation of what array index is being de-speculated.
|
||||
* - It performs substantially better than the general-purpose speculation
|
||||
* barrier on ARM Cortex-A cores (the difference is expected to be tens of
|
||||
* cycles per invocation). Within tight loops, this difference may become
|
||||
* noticeable.
|
||||
*
|
||||
* Semantics:
|
||||
* Provided count is non-zero and the caller has already validated or otherwise
|
||||
* established that index < count, any speculative use of the return value will
|
||||
* use a speculative value that is less than count.
|
||||
*
|
||||
* Example:
|
||||
* if (untrusted_index_from_user < bound) {
|
||||
* untrusted_index_from_user = nv_array_index_no_speculate(
|
||||
* untrusted_index_from_user, bound);
|
||||
* ...
|
||||
* x = array1[untrusted_index_from_user];
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* The use of nv_array_index_no_speculate() in the above example ensures that
|
||||
* subsequent uses of untrusted_index_from_user will not execute speculatively
|
||||
* (they will wait for the bounds check to complete).
|
||||
*/
|
||||
|
||||
static inline unsigned long nv_array_index_no_speculate(unsigned long index,
|
||||
unsigned long count)
|
||||
{
|
||||
#if defined(NV_SPECULATION_BARRIER_x86) && (defined(__GNUC__) || defined(__clang__))
|
||||
unsigned long mask;
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"CMP %2, %1 \n"
|
||||
"SBB %0, %0 \n"
|
||||
: "=r"(mask) : "r"(index), "r"(count) : "cc"
|
||||
);
|
||||
|
||||
return (index & mask);
|
||||
|
||||
#elif defined(NV_SPECULATION_BARRIER_ARM_COMMON)
|
||||
unsigned long mask;
|
||||
|
||||
asm volatile
|
||||
(
|
||||
"CMP %[ind], %[cnt] \n"
|
||||
"SBC %[res], %[cnt], %[cnt] \n"
|
||||
NV_SPEC_BARRIER_CSDB
|
||||
: [res] "=r" (mask) : [ind] "r" (index), [cnt] "r" (count): "cc"
|
||||
);
|
||||
|
||||
return (index & mask);
|
||||
|
||||
/* Fallback to generic speculation barrier for unsupported platforms */
|
||||
#else
|
||||
nv_speculation_barrier();
|
||||
|
||||
return index;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //_NV_SPECULATION_BARRIER_H_
|
||||
189
src/common/inc/nvctassert.h
Normal file
189
src/common/inc/nvctassert.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1997-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __NV_CTASSERT_H
|
||||
#define __NV_CTASSERT_H
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Compile Time assert
|
||||
* -------------------
|
||||
* Use ct_assert(b) instead of assert(b) whenever the condition 'b' is constant,
|
||||
* i.e. when 'b' can be determined at compile time.
|
||||
*
|
||||
* e.g.: check array size:
|
||||
* ct_assert(__GL_ARRAYSIZE(arrayName) == constArraySize);
|
||||
* e.g.: check struct size alignment:
|
||||
* ct_assert(sizeof(struct xy) % 64 == 0);
|
||||
*
|
||||
* When available, standard C or C++ language constructs are used:
|
||||
* - ISO C++11 defines the static_assert keyword
|
||||
* - ISO C11 defines the _Static_assert keyword
|
||||
*
|
||||
* Note that recent versions of Clang support _Static_assert in all compiler modes
|
||||
* - not just C11 mode - so we test for that in addition to checking explicitly for
|
||||
* C11 and C++11 support.
|
||||
*
|
||||
* Those new language standards aren't available on all supported platforms; an
|
||||
* alternate method which involves array declarations is employed in that case,
|
||||
* described below.
|
||||
*
|
||||
* In C, there is a restriction where ct_assert() can be placed:
|
||||
* It can be placed wherever a variable declaration can be placed, i.e.:
|
||||
* - either anywhere at file scope
|
||||
* - or inside a function at the beginning of any {} block; it may be mixed
|
||||
* with variable declarations.
|
||||
* e.g.:
|
||||
* void function()
|
||||
* {
|
||||
* ct_assert(...); <-- ok \
|
||||
* int a; |
|
||||
* ct_assert(...); <-- ok | declaration section
|
||||
* int b; |
|
||||
* ct_assert(...); <-- ok /
|
||||
*
|
||||
* a = 0; -- first statement
|
||||
*
|
||||
* int c; <-- error
|
||||
* ct_assert(...); <-- error
|
||||
*
|
||||
* {ct_assert(...);} <-- ok (uses its own block for ct_assert())
|
||||
* }
|
||||
*
|
||||
* In CPP, there is no such restriction, i.e. it can be placed at file scope
|
||||
* or anywhere inside a function or namespace or class (i.e., wherever
|
||||
* a variable declaration may be placed).
|
||||
*
|
||||
* For C code, the mechanism of this ct_assert() is to declare a prototype
|
||||
* of a function (e.g. compile_time_assertion_failed_in_line_555, if current
|
||||
* line number is 555), which gets an array as argument:
|
||||
* (1) the size of this array is +1, if b != 0 (ok)
|
||||
* (2) the size of this array is -1, if b == 0 (error)
|
||||
*
|
||||
* In case (2) the compiler throws an error.
|
||||
* e.g. msvc compiler:
|
||||
* error C2118: negative subscript or subscript is too large
|
||||
* e.g. gcc 2.95.3:
|
||||
* size of array '_compile_time_assertion_failed_in_line_555' is negative
|
||||
*
|
||||
* In case the condition 'b' is not constant, the msvc compiler throws
|
||||
* an error:
|
||||
* error C2057: expected constant expression
|
||||
* In this case the run time assert() must be used.
|
||||
*
|
||||
* For C++ code, we use a different technique because the function prototype
|
||||
* declaration can have function linkage conflicts. If a single compilation
|
||||
* unit has ct_assert() statements on the same line number in two different
|
||||
* files, we would have:
|
||||
*
|
||||
* compile_time_assertion_failed_in_line_777(...); from xxx.cpp
|
||||
* compile_time_assertion_failed_in_line_777(...); from xxx.h
|
||||
*
|
||||
* That is valid C++. But if either declaration were in an extern "C" block,
|
||||
* the same function would be declared with two different linkage types and an
|
||||
* error would ensue.
|
||||
*
|
||||
* Instead, ct_assert() for C++ simply declares an array typedef. As in the C
|
||||
* version, we will get a compilation error if a typedef with a negative size
|
||||
* is specified. Line numbers are not needed because C++ allows redundant
|
||||
* typedefs as long as they are all defined the same way. But we tack them on
|
||||
* anyway in case the typedef name is reported in compiler errors. C does not
|
||||
* permit redundant typedefs, so this version should not be used in true C
|
||||
* code. It can be used in extern "C" blocks of C++ code, however. As with
|
||||
* the C version, MSVC will throw a "negative subscript" or "expected constant
|
||||
* expression" error if the expression asserted is false or non-constant.
|
||||
*
|
||||
* Notes:
|
||||
* - This ct_assert() does *not* generate any code or variable.
|
||||
* Therefore there is no need to define it away for RELEASE builds.
|
||||
* - The integration of the current source file number (__LINE__) ...
|
||||
* ... would be required in C++ to allow multiple use inside the same
|
||||
* class/namespace (if we used the C-style expansion), because the id
|
||||
* must be unique.
|
||||
* ... is nice to have in C or C++ if the compiler's error message contains
|
||||
* the id (this is not the case for msvc)
|
||||
* - Using three nested macros instead of only one is necessary to get the id
|
||||
* compile_time_assertion_failed_in_line_555
|
||||
* instead of
|
||||
* compile_time_assertion_failed_in_line___LINE__
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
# ifndef __has_extension
|
||||
# define __has_extension __has_feature // Compatibility with Clang pre-3.0 compilers.
|
||||
# endif
|
||||
# define CLANG_C_STATIC_ASSERT __has_extension(c_static_assert)
|
||||
#else
|
||||
# define CLANG_C_STATIC_ASSERT 0
|
||||
#endif
|
||||
|
||||
// Adding this macro to fix MISRA 2012 rule 20.12
|
||||
#define NV_CTASSERT_STRINGIFY_MACRO(b) #b
|
||||
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
|
||||
// ISO C++11 defines the static_assert keyword
|
||||
# define ct_assert(b) static_assert((b), "Compile time assertion failed: " NV_CTASSERT_STRINGIFY_MACRO(b))
|
||||
# define ct_assert_i(b,line) static_assert((b), "Compile time assertion failed: " NV_CTASSERT_STRINGIFY_MACRO(b)NV_CTASSERT_STRINGIFY_MACRO(line))
|
||||
#elif !defined(NVOC) && ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || CLANG_C_STATIC_ASSERT)
|
||||
// ISO C11 defines the _Static_assert keyword
|
||||
# define ct_assert(b) _Static_assert((b), "Compile time assertion failed: " NV_CTASSERT_STRINGIFY_MACRO(b))
|
||||
# define ct_assert_i(b,line) _Static_assert((b), "Compile time assertion failed: " NV_CTASSERT_STRINGIFY_MACRO(b)NV_CTASSERT_STRINGIFY_MACRO(line))
|
||||
#else
|
||||
// For compilers which don't support ISO C11 or C++11, we fall back to an
|
||||
// array (type) declaration
|
||||
# define ct_assert(b) ct_assert_i(b,__LINE__)
|
||||
# define ct_assert_i(b,line) ct_assert_ii(b,line)
|
||||
# ifdef __cplusplus
|
||||
# define ct_assert_ii(b,line) typedef char compile_time_assertion_failed_in_line_##line[(b)?1:-1]
|
||||
# else
|
||||
/*
|
||||
* The use of a function prototype "void compile_time_assertion_failed_in_line_##line(..)
|
||||
* above violates MISRA-C 2012 Rule 8.6 since the rule disallows a function
|
||||
* declaration without a definition. To fix the MISRA rule, the cplusplus style
|
||||
* 'typdef char compile_time_assertion_failed_in_line_##line'
|
||||
* is acceptable, but doesn't work for typical C code since there can be duplicate
|
||||
* line numbers leading to duplicate typedefs which C doesn't allow.
|
||||
*
|
||||
* The following macro uses the predefined macro __COUNTER__ to create unique
|
||||
* typedefs that fixes the MISRA violations. However, not all C compilers support
|
||||
* that macro and even for compilers that support it, the underlying code makes
|
||||
* use of variably modified identifiers in ct_assert that makes the use of this
|
||||
* unviable.
|
||||
*
|
||||
* For now restrict the use of MACRO only on
|
||||
* i) GCC 4.3.0 and above that supports __COUNTER__ macro
|
||||
* ii) Specifically the Falcon port of the compiler since the use of variably
|
||||
* modified identifiers have been removed on those projects
|
||||
*
|
||||
* TBD: Enable the macro on MSVC and CLANG pending
|
||||
*/
|
||||
# if defined(__GNUC__) && ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40300) && defined(GCC_FALCON)
|
||||
# define ct_assert_ii(b,line) ct_assert_iii(b,line,__COUNTER__)
|
||||
# define ct_assert_iii(b,line,cntr) ct_assert_cntr(b,line,cntr)
|
||||
# define ct_assert_cntr(b,line,cntr) typedef char cnt##cntr##_compile_time_assertion_failed_in_line_##line[(b)?1:-1] __attribute__((unused))
|
||||
# else
|
||||
# define ct_assert_ii(b,line) void compile_time_assertion_failed_in_line_##line(int _compile_time_assertion_failed_in_line_##line[(b) ? 1 : -1])
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // __NV_CTASSERT_H
|
||||
564
src/common/inc/nvlog_defs.h
Normal file
564
src/common/inc/nvlog_defs.h
Normal file
@@ -0,0 +1,564 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2012-2024 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _NVLOG_DEFS_H_
|
||||
#define _NVLOG_DEFS_H_
|
||||
|
||||
#include "nvtypes.h"
|
||||
/******************* Common Debug & Trace Defines ***************************\
|
||||
* *
|
||||
* Module: NVLOG_DEFS.H *
|
||||
* *
|
||||
\****************************************************************************/
|
||||
|
||||
#define NVLOG_MAX_DBG_MODULES 256
|
||||
|
||||
/********************************/
|
||||
/********* Structures *********/
|
||||
/********************************/
|
||||
|
||||
// Forward declaration, so it can be used in the function type definition.
|
||||
|
||||
/**
|
||||
* @brief Struct representing a buffer in NvLog
|
||||
*
|
||||
* All logging (Print, Regtrace, etc) use these buffers.
|
||||
*/
|
||||
typedef struct _NVLOG_BUFFER NVLOG_BUFFER;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Type of the 'push' function for NvLog buffers
|
||||
*
|
||||
* Function called whenever pushing something to an NvLog buffer
|
||||
*/
|
||||
typedef NvBool (*NVLOG_BUFFER_PUSHFUNC) (NVLOG_BUFFER *, NvU8 *, NvU32);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Fields specific to ring buffers
|
||||
*/
|
||||
typedef struct _NVLOG_RING_BUFFER_EXTRA_FIELDS
|
||||
{
|
||||
/** How many times the ring buffer has overflown */
|
||||
NvU32 overflow;
|
||||
} NVLOG_RING_BUFFER_EXTRA_FIELDS;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Struct representing a buffer in NvLog
|
||||
*
|
||||
* All logging (Print, Regtrace, etc) use these buffers.
|
||||
*/
|
||||
struct _NVLOG_BUFFER
|
||||
{
|
||||
/** Function to call when writing to this buffer */
|
||||
union
|
||||
{
|
||||
NVLOG_BUFFER_PUSHFUNC fn;
|
||||
|
||||
// Pad this union to prevent struct size from varying between 32/64 bit platforms
|
||||
NvP64 padding;
|
||||
} push;
|
||||
|
||||
/** Size of the buffer data section */
|
||||
NvU32 size;
|
||||
/** Buffer tag, for easier identification in a dump */
|
||||
NvU32 tag;
|
||||
/** Flags of the buffer, following NVLOG_BUFFER_FLAGS_* DRF's */
|
||||
NvU32 flags;
|
||||
/** Position of the next available byte in the buffer */
|
||||
NvU32 pos;
|
||||
/** Number of threads currently writing to this buffer */
|
||||
volatile NvS32 threadCount;
|
||||
/** Specific buffer types will define their fields here */
|
||||
union
|
||||
{
|
||||
NVLOG_RING_BUFFER_EXTRA_FIELDS ring;
|
||||
} extra;
|
||||
/** Buffer data. */
|
||||
NvU8 data[1];
|
||||
};
|
||||
|
||||
#define NVLOG_MAX_BUFFERS_v11 16
|
||||
#define NVLOG_MAX_BUFFERS_v12 256
|
||||
#define NVLOG_MAX_BUFFERS_v13 3840
|
||||
|
||||
#define NVLOG_MAX_BUFFERS NVLOG_MAX_BUFFERS_v13
|
||||
#define NVLOG_LOGGER_VERSION 13 // v1.3
|
||||
|
||||
// Due to this file's peculiar location, NvPort may or may not be includable
|
||||
typedef struct PORT_SPINLOCK PORT_SPINLOCK;
|
||||
typedef struct PORT_MUTEX PORT_MUTEX;
|
||||
typedef struct PORT_RWLOCK PORT_RWLOCK;
|
||||
|
||||
#if PORT_IS_KERNEL_BUILD
|
||||
#include "nvport/nvport.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Information about the entire NvLog system
|
||||
*/
|
||||
typedef struct _NVLOG_LOGGER
|
||||
{
|
||||
/** NvLog logger version */
|
||||
NvU32 version;
|
||||
/** Logging buffers */
|
||||
NVLOG_BUFFER * pBuffers[NVLOG_MAX_BUFFERS];
|
||||
/** Index of the first unallocated buffer */
|
||||
NvU32 nextFree;
|
||||
/** Total number of free buffer slots */
|
||||
NvU32 totalFree;
|
||||
/** Lock for some buffer oprations */
|
||||
PORT_SPINLOCK* mainLock;
|
||||
/** Lock for creating/deleting pBuffers and accessing them from RmCtrls */
|
||||
PORT_MUTEX* buffersLock;
|
||||
/** Lock for registering/deregistering flush callbacks */
|
||||
PORT_RWLOCK *flushCbsLock;
|
||||
} NVLOG_LOGGER;
|
||||
extern NVLOG_LOGGER NvLogLogger;
|
||||
|
||||
/**
|
||||
* NvLog uses two locks:
|
||||
* - NVLOG_LOGGER::mainLock is used to protect some accesses to pBuffers, or
|
||||
* an individual pBuffers entry depending on locking flags.
|
||||
* - NVLOG_LOGGER::buffersLock is used to protect creating/deleting pBuffers and accessing them
|
||||
* from certain RmCtrl handlers.
|
||||
*
|
||||
* Historically in most contexts obtaining RMAPI lock would suffice, and mainLock would optionally
|
||||
* be used for certain buffers. Ioctl NV_ESC_RM_LOCKLESS_DIAGNOSTIC cannot touch RMAPI lock and needs
|
||||
* to access NvLog. The latter operation might race if called at an inopportune time: e.g. if the
|
||||
* ioctl is called during RM init when KGSP creates/deletes GSP NvLog buffers. Using buffersLock is
|
||||
* thus necessary to resolve the potential race.
|
||||
*
|
||||
* This leads to an unfortunate sequence where mainLock and buffersLock are nested. The latter lock
|
||||
* cannot be removed as it is used in IRQ paths.
|
||||
*
|
||||
* This should be refactored to use a single RWLock that does conditional acquire in possible IRQ
|
||||
* paths.
|
||||
*/
|
||||
|
||||
//
|
||||
// Buffer flags
|
||||
//
|
||||
|
||||
// Logging to this buffer is disabled
|
||||
#define NVLOG_BUFFER_FLAGS_DISABLED 0:0
|
||||
#define NVLOG_BUFFER_FLAGS_DISABLED_NO 0
|
||||
#define NVLOG_BUFFER_FLAGS_DISABLED_YES 1
|
||||
|
||||
#define NVLOG_BUFFER_FLAGS_TYPE 2:1
|
||||
#define NVLOG_BUFFER_FLAGS_TYPE_RING 0
|
||||
#define NVLOG_BUFFER_FLAGS_TYPE_NOWRAP 1
|
||||
#define NVLOG_BUFFER_FLAGS_TYPE_SYSTEMLOG 2
|
||||
|
||||
// Expand buffer when full
|
||||
#define NVLOG_BUFFER_FLAGS_EXPANDABLE 3:3
|
||||
#define NVLOG_BUFFER_FLAGS_EXPANDABLE_NO 0
|
||||
#define NVLOG_BUFFER_FLAGS_EXPANDABLE_YES 1
|
||||
|
||||
// Allocate buffer in non paged memory
|
||||
#define NVLOG_BUFFER_FLAGS_NONPAGED 4:4
|
||||
#define NVLOG_BUFFER_FLAGS_NONPAGED_NO 0
|
||||
#define NVLOG_BUFFER_FLAGS_NONPAGED_YES 1
|
||||
|
||||
//
|
||||
// Type of buffer locking to use
|
||||
// NONE - No locking performed, for buffers that are inherently single threaded
|
||||
// STATE - Lock only during state change, do memory copying unlocked
|
||||
// Don't use with tiny buffers that overflow every write or two.
|
||||
// FULL - Keep everything locked for the full duration of the write
|
||||
//
|
||||
#define NVLOG_BUFFER_FLAGS_LOCKING 6:5
|
||||
#define NVLOG_BUFFER_FLAGS_LOCKING_NONE 0
|
||||
#define NVLOG_BUFFER_FLAGS_LOCKING_STATE 1
|
||||
#define NVLOG_BUFFER_FLAGS_LOCKING_FULL 2
|
||||
|
||||
// Store this buffer in OCA minidumps
|
||||
#define NVLOG_BUFFER_FLAGS_OCA 7:7
|
||||
#define NVLOG_BUFFER_FLAGS_OCA_NO 0
|
||||
#define NVLOG_BUFFER_FLAGS_OCA_YES 1
|
||||
|
||||
// Buffer format (not included in registry key)
|
||||
#define NVLOG_BUFFER_FLAGS_FORMAT 10:8
|
||||
#define NVLOG_BUFFER_FLAGS_FORMAT_PRINTF 0
|
||||
#define NVLOG_BUFFER_FLAGS_FORMAT_LIBOS_LOG 1
|
||||
#define NVLOG_BUFFER_FLAGS_FORMAT_MEMTRACK 2
|
||||
|
||||
// Never deallocate this buffer until RM is unloaded
|
||||
#define NVLOG_BUFFER_FLAGS_PRESERVE 11:11
|
||||
#define NVLOG_BUFFER_FLAGS_PRESERVE_NO 0
|
||||
#define NVLOG_BUFFER_FLAGS_PRESERVE_YES 1
|
||||
|
||||
// Buffer GPU index
|
||||
#define NVLOG_BUFFER_FLAGS_GPU_INSTANCE 31:24
|
||||
|
||||
typedef NvU32 NVLOG_BUFFER_HANDLE;
|
||||
|
||||
//
|
||||
// Utility macros
|
||||
//
|
||||
#define NVLOG_IS_RING_BUFFER(pBuffer) \
|
||||
FLD_TEST_DRF(LOG_BUFFER, _FLAGS, _TYPE, _RING, pBuffer->flags)
|
||||
#define NVLOG_IS_NOWRAP_BUFFER(pBuffer) \
|
||||
FLD_TEST_DRF(LOG_BUFFER, _FLAGS, _TYPE, _NOWRAP, pBuffer->flags)
|
||||
|
||||
#define NVLOG_PRINT_BUFFER_SIZE(pBuffer) ((pBuffer)->size)
|
||||
#define NVLOG_BUFFER_SIZE(pBuffer) \
|
||||
(NV_OFFSETOF(NVLOG_BUFFER, data) + NVLOG_PRINT_BUFFER_SIZE(pBuffer))
|
||||
|
||||
/********************************/
|
||||
/********* Filtering **********/
|
||||
/********************************/
|
||||
// TODO - Remove all this once tools are updated
|
||||
|
||||
#define NVLOG_FILTER_INVALID (~0)
|
||||
|
||||
#define NVLOG_FILTER_VALUE_SIMPLE_NO 0x0
|
||||
#define NVLOG_FILTER_VALUE_SIMPLE_YES 0x1
|
||||
#define NVLOG_FILTER_VALUE_EXPLICIT_NO 0x2
|
||||
#define NVLOG_FILTER_VALUE_EXPLICIT_YES 0x3
|
||||
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_REGTRACE 1:0
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_INFO 3:2
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_NOTICE 5:4
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_WARNINGS 7:6
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_ERRORS 9:8
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_HW_ERROR 11:10
|
||||
#define NVLOG_FILTER_PRINT_LEVEL_FATAL 13:12
|
||||
|
||||
#define NVLOG_FILTER_PRINT_BUFFER 18:14
|
||||
#define NVLOG_FILTER_REGTRACE_BUFFER 22:19
|
||||
|
||||
#define NVLOG_FILTER_REGTRACE_LOG_READ 25:23
|
||||
#define NVLOG_FILTER_REGTRACE_LOG_WRITE 27:26
|
||||
#define NVLOG_FILTER_REGTRACE_BREAK_READ 29:28
|
||||
#define NVLOG_FILTER_REGTRACE_BREAK_WRITE 31:30
|
||||
|
||||
#define NVLOG_FILTER_VALUE_IS_NO(val) ((val & 0x1) == 0)
|
||||
#define NVLOG_FILTER_VALUE_IS_YES(val) (val & 0x1)
|
||||
#define NVLOG_FILTER_PRINT_GET_VALUE(level, num) ((num >> (level*2)) & 0x3)
|
||||
|
||||
/**
|
||||
* @brief Type representing a value of a given 16bit range.
|
||||
*/
|
||||
typedef struct _NVLOG_RANGE_16
|
||||
{
|
||||
NvU16 low;
|
||||
NvU16 high;
|
||||
NvU32 value;
|
||||
} NVLOG_RANGE_16;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Type representing a value of a given 32bit range.
|
||||
*/
|
||||
typedef struct _NVLOG_RANGE_32
|
||||
{
|
||||
NvU32 low;
|
||||
NvU32 high;
|
||||
NvU32 value;
|
||||
} NVLOG_RANGE_32;
|
||||
|
||||
//
|
||||
// Maximum number of files that have a filter assigned to them.
|
||||
//
|
||||
#define NVLOG_MAX_FILES 1
|
||||
//
|
||||
// Maximum number of line rules (both single line and range) allowed per file
|
||||
//
|
||||
#define NVLOG_FILELINE_FILTER_MAX_RANGES 1
|
||||
|
||||
/**
|
||||
* @brief Internal type for NVLOG_FILELINE_FILTER.
|
||||
*
|
||||
* Contains filtering info for a single file.
|
||||
*/
|
||||
typedef struct _NVLOG_FILELINE_FILTER_FILEHASH
|
||||
{
|
||||
/** ID of the file (24bit MD5) */
|
||||
NvU32 fileId;
|
||||
/** Number of elements in the array 'ranges' */
|
||||
NvU32 numElems;
|
||||
/** Value to use if the given value isn't found in the range array */
|
||||
NvU32 defaultValue;
|
||||
/** Array of ranges representing lines in the file */
|
||||
NVLOG_RANGE_16 ranges[NVLOG_FILELINE_FILTER_MAX_RANGES];
|
||||
} NVLOG_FILELINE_FILTER_FILEHASH;
|
||||
|
||||
/**
|
||||
* @brief Filter that contains rules that depend on the file and line number.
|
||||
*/
|
||||
typedef struct _NVLOG_FILELINE_FILTER
|
||||
{
|
||||
/** Number of elements in the fileHash array */
|
||||
NvU32 numFiles;
|
||||
/** Value to use if a given file isn't found */
|
||||
NvU32 defaultValue;
|
||||
/** Array of file entries, ordered as a hash table */
|
||||
NVLOG_FILELINE_FILTER_FILEHASH fileHash[NVLOG_MAX_FILES];
|
||||
} NVLOG_FILELINE_FILTER;
|
||||
|
||||
/********************************/
|
||||
/********* Print Logger *********/
|
||||
/********************************/
|
||||
|
||||
#define NVLOG_PRINT_LOGGER_VERSION 11 // v1.1
|
||||
// Max buffers cannot be over 32.
|
||||
#define NVLOG_PRINT_MAX_BUFFERS 8
|
||||
|
||||
#define NVLOG_PRINT_BUFFER_PRIMARY 1
|
||||
#define NVLOG_PRINT_BUFFER_SECONDARY 2
|
||||
#define NVLOG_PRINT_BUFFER_SYSTEMLOG 3
|
||||
|
||||
#define NVLOG_PRINT_DESC1_FILEID 23:0
|
||||
#define NVLOG_PRINT_DESC1_GPUID 28:24 // 2^5 = 32 possible
|
||||
#define NVLOG_PRINT_DESC1_MAGIC 31:29
|
||||
#define NVLOG_PRINT_DESC1_MAGIC_VALUE 5
|
||||
|
||||
#define NVLOG_PRINT_DESC2_LINEID 15:0
|
||||
#define NVLOG_PRINT_DESC2_GROUPID 17:16
|
||||
#define NVLOG_PRINT_DESC2_GROUPID_RM 0
|
||||
#define NVLOG_PRINT_DESC2_GROUPID_PMU 1
|
||||
#define NVLOG_PRINT_DESC2_OPT_DATA_COUNT 24:18 // number of dwords
|
||||
#define NVLOG_PRINT_DESC2_OPT_DATA_COUNT_MAX 0x7F
|
||||
#define NVLOG_PRINT_DESC2_RESERVED 28:25
|
||||
#define NVLOG_PRINT_DESC2_MAGIC 31:29
|
||||
#define NVLOG_PRINT_DESC2_MAGIC_VALUE 6
|
||||
|
||||
#define NVLOG_UNKNOWN_GPU_INSTANCE 0x1f
|
||||
|
||||
#define NVLOG_PRINT_MODULE_FILTER_VALUE 1:0
|
||||
#define NVLOG_PRINT_MODULE_FILTER_BUFFER 6:2
|
||||
#define NVLOG_PRINT_MODULE_FILTER_ENABLED 7:7
|
||||
|
||||
//
|
||||
// Regkey fields - These are copied directly from nvRmReg.h
|
||||
// A copy is necessary as these might be needed on systems that don't
|
||||
// have nvRmReg.h, such as DVS builds for NvWatch
|
||||
//
|
||||
#ifndef NV_REG_STR_RM_NVLOG
|
||||
#define NV_REG_STR_RM_NVLOG "RMNvLog"
|
||||
#define NV_REG_STR_RM_NVLOG_BUFFER_FLAGS 7:0
|
||||
#define NV_REG_STR_RM_NVLOG_BUFFER_SIZE 23:8
|
||||
#define NV_REG_STR_RM_NVLOG_BUFFER_SIZE_DEFAULT ((NVOS_IS_WINDOWS||NVOS_IS_MACINTOSH)?8:250)
|
||||
#define NV_REG_STR_RM_NVLOG_BUFFER_SIZE_DISABLE 0
|
||||
#define NV_REG_STR_RM_NVLOG_RUNTIME_LEVEL 28:25
|
||||
#define NV_REG_STR_RM_NVLOG_TIMESTAMP 30:29
|
||||
#define NV_REG_STR_RM_NVLOG_TIMESTAMP_NONE 0
|
||||
#define NV_REG_STR_RM_NVLOG_TIMESTAMP_32 1
|
||||
#define NV_REG_STR_RM_NVLOG_TIMESTAMP_64 2
|
||||
#define NV_REG_STR_RM_NVLOG_TIMESTAMP_32_DIFF 3
|
||||
#define NV_REG_STR_RM_NVLOG_INITED 31:31
|
||||
#define NV_REG_STR_RM_NVLOG_INITED_NO 0
|
||||
#define NV_REG_STR_RM_NVLOG_INITED_YES 1
|
||||
#endif // NV_REG_STR_RM_NVLOG
|
||||
|
||||
|
||||
//
|
||||
// Arg types:
|
||||
// 0: Special meaning. End of argument list.
|
||||
// 1: d, u, x, X, i, o - Integer type
|
||||
// 2: lld, llu, llx, llX, lli, llo - Long long integer type
|
||||
// 3: s - string type (size is 0)
|
||||
// 4: p - pointer type
|
||||
// 5: c - char type
|
||||
// 6: f, g, e, F, G, E - floating point type
|
||||
// 7-14: Unused at the moment, default value is 0
|
||||
// 15: Special meaning. Error value - unsupported type.
|
||||
//
|
||||
#define NVLOG_PRINT_MAX_ARG_TYPES 0x10
|
||||
#define NVLOG_PRINT_ARG_TYPE_ARGLIST_END 0x0
|
||||
#define NVLOG_PRINT_ARG_TYPE_INT 0x1
|
||||
#define NVLOG_PRINT_ARG_TYPE_LONGLONG 0x2
|
||||
#define NVLOG_PRINT_ARG_TYPE_STRING 0x3
|
||||
#define NVLOG_PRINT_ARG_TYPE_POINTER 0x4
|
||||
#define NVLOG_PRINT_ARG_TYPE_CHAR 0x5
|
||||
#define NVLOG_PRINT_ARG_TYPE_FLOAT 0x6
|
||||
#define NVLOG_PRINT_ARG_TYPE_ERROR 0xf
|
||||
|
||||
|
||||
/**
|
||||
* @brief Signature of the database required to decode the print logs
|
||||
*
|
||||
* The sig1-sig3 values are generated randomly at compile time.
|
||||
*/
|
||||
typedef struct _NVLOG_DB_SIGNATURE
|
||||
{
|
||||
NvU32 timestamp;
|
||||
NvU32 sig1;
|
||||
NvU32 sig2;
|
||||
NvU32 sig3;
|
||||
} NVLOG_DB_SIGNATURE;
|
||||
|
||||
/**
|
||||
* @brief Filter that contains all rules used to filter DBG_PRINTF calls
|
||||
*/
|
||||
typedef struct _NVLOG_PRINT_FILTER
|
||||
{
|
||||
/** Same file:line filter is shared with the Regtrace system */
|
||||
NVLOG_FILELINE_FILTER *pFileLineFilter;
|
||||
/** Filter based on debug levels. Uses NVLOG_FILTER_PRINT_LEVEL_* DRF's */
|
||||
NvU32 runtimePrintLevelFilter;
|
||||
/** Filter based on debug modules. Uses NVLOG_PRINT_MODULE_FILTER_* DRF's */
|
||||
NvU8 runtimePrintModuleFilter[NVLOG_MAX_DBG_MODULES];
|
||||
} NVLOG_PRINT_FILTER;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enum representing all possible argument types to DBG_PRINTF
|
||||
*/
|
||||
typedef enum _NVLOG_ARGTYPE
|
||||
{
|
||||
NVLOG_ARGTYPE_NONE,
|
||||
NVLOG_ARGTYPE_INT,
|
||||
NVLOG_ARGTYPE_LONG_LONG_INT,
|
||||
NVLOG_ARGTYPE_STRING,
|
||||
NVLOG_ARGTYPE_POINTER,
|
||||
NVLOG_ARGTYPE_FLOAT,
|
||||
NVLOG_ARGTYPE__COUNT
|
||||
} NVLOG_ARGTYPE;
|
||||
|
||||
// Default flags for NvLog registry, used for single-buffer option or the read fails
|
||||
#ifndef NVLOG_DEFAULT_FLAGS
|
||||
#define NVLOG_DEFAULT_FLAGS \
|
||||
( \
|
||||
DRF_NUM(_REG_STR_RM, _NVLOG, _BUFFER_FLAGS, \
|
||||
( \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _DISABLED, _NO) | \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _TYPE, _RING) | \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _EXPANDABLE, _NO) | \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _NONPAGED, _YES) | \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _LOCKING, _STATE) | \
|
||||
DRF_DEF(LOG, _BUFFER_FLAGS, _OCA, _YES) \
|
||||
)) | \
|
||||
DRF_DEF(_REG_STR_RM, _NVLOG, _BUFFER_SIZE, _DEFAULT) | \
|
||||
DRF_NUM(_REG_STR_RM, _NVLOG, _RUNTIME_LEVEL, 0) | \
|
||||
DRF_DEF(_REG_STR_RM, _NVLOG, _TIMESTAMP, _64) | \
|
||||
DRF_DEF(_REG_STR_RM, _NVLOG, _INITED, _YES) \
|
||||
)
|
||||
#endif // NVLOG_DEFAULT_FLAGS
|
||||
|
||||
/**
|
||||
* @brief General info about the NvLog Print system
|
||||
*/
|
||||
typedef struct _NVLOG_PRINT_LOGGER
|
||||
{
|
||||
/** NvLog print logger version */
|
||||
NvU32 version;
|
||||
/** Runtime argument sizes (16 different arglist values) */
|
||||
NvU8 runtimeSizes[NVLOG_PRINT_MAX_ARG_TYPES];
|
||||
/** Database signature for decoding */
|
||||
NVLOG_DB_SIGNATURE signature;
|
||||
/** Filter buffer for print statements */
|
||||
NVLOG_PRINT_FILTER filter;
|
||||
/** Flags for all NvLog print buffers */
|
||||
NvU32 flags;
|
||||
/** Buffer indices for all nvlog buffers. buffers[1] is default. */
|
||||
NvU32 buffers[NVLOG_PRINT_MAX_BUFFERS];
|
||||
/** Initialized flag, set to true after nvlogPrintInit has executed */
|
||||
NvBool initialized;
|
||||
/** Paused flag, set to true after nvlogPrintInit has executed */
|
||||
NvBool paused;
|
||||
} NVLOG_PRINT_LOGGER;
|
||||
extern NVLOG_PRINT_LOGGER NvLogPrintLogger;
|
||||
|
||||
#define NVLOG_PRINT_BUFFER_TAG(_i) NvU32_BUILD('t','r','p','0' + (_i))
|
||||
|
||||
/********************************/
|
||||
/********** Regtrace **********/
|
||||
/********************************/
|
||||
|
||||
#define NVLOG_REGTRACE_LOGGER_VERSION 10 // v1.0
|
||||
#define NVLOG_REGTRACE_MAX_BUFFERS 4
|
||||
|
||||
#define NVLOG_REGTRACE_READ 0
|
||||
#define NVLOG_REGTRACE_WRITE 1
|
||||
|
||||
#define NVLOG_REGTRACE_DESC1_FILEID NVLOG_PRINT_DESC1_FILEID
|
||||
#define NVLOG_REGTRACE_DESC1_GPUID NVLOG_PRINT_DESC1_GPUID
|
||||
#define NVLOG_REGTRACE_DESC1_MAGIC NVLOG_PRINT_DESC1_MAGIC
|
||||
#define NVLOG_REGTRACE_DESC1_MAGIC_VALUE (NVLOG_PRINT_DESC1_MAGIC_VALUE-1)
|
||||
|
||||
#define NVLOG_REGTRACE_DESC2_LINEID 15:0
|
||||
#define NVLOG_REGTRACE_DESC2_READWRITE 16:16
|
||||
#define NVLOG_REGTRACE_DESC2_READWRITE_READ NVLOG_REGTRACE_READ
|
||||
#define NVLOG_REGTRACE_DESC2_READWRITE_WRITE NVLOG_REGTRACE_WRITE
|
||||
#define NVLOG_REGTRACE_DESC2_REGSIZE 18:17
|
||||
#define NVLOG_REGTRACE_DESC2_REGSIZE_8 0
|
||||
#define NVLOG_REGTRACE_DESC2_REGSIZE_16 1
|
||||
#define NVLOG_REGTRACE_DESC2_REGSIZE_32 2
|
||||
#define NVLOG_REGTRACE_DESC2_REGSIZE_64 3
|
||||
#define NVLOG_REGTRACE_DESC2_THREADID 28:19
|
||||
#define NVLOG_REGTRACE_DESC2_MAGIC 31:29
|
||||
#define NVLOG_REGTRACE_DESC2_MAGIC_VALUE 3
|
||||
|
||||
/**
|
||||
* @brief Single entry in an NvLog Regtrace buffer.
|
||||
*/
|
||||
typedef struct _NVLOG_REGTRACE_RECORD
|
||||
{
|
||||
/** Uses NVLOG_REGTRACE_DESC1_* DRF's */
|
||||
NvU32 desc1;
|
||||
/** Uses NVLOG_REGTRACE_DESC1_* DRF's */
|
||||
NvU32 desc2;
|
||||
/** Address of the register being accessed */
|
||||
NvU32 address;
|
||||
/** Value that was read/written */
|
||||
NvU32 value;
|
||||
} NVLOG_REGTRACE_RECORD;
|
||||
|
||||
|
||||
|
||||
#define NVLOG_REGTRACE_FILTER_MAX_RANGES 256
|
||||
|
||||
// Regtrace shares the file:line filter with print
|
||||
|
||||
|
||||
/**
|
||||
* @brief Filter that contains all rules used to filter register access logging
|
||||
*/
|
||||
typedef struct _NVLOG_REGTRACE_FILTER
|
||||
{
|
||||
/** Number of elements in the 'ranges' array */
|
||||
NvU32 numRanges;
|
||||
/** File:line based filter. Shared with NvLog print system */
|
||||
NVLOG_FILELINE_FILTER *pFileLineFilter;
|
||||
/** Range array for filtering based on register addresses */
|
||||
NVLOG_RANGE_32 ranges[NVLOG_REGTRACE_FILTER_MAX_RANGES];
|
||||
} NVLOG_REGTRACE_FILTER;
|
||||
|
||||
/**
|
||||
* @brief General info about the NvLog Regtrace system
|
||||
*/
|
||||
typedef struct _NVLOG_REGTRACE_LOGGER
|
||||
{
|
||||
/** NvLog regtrace logger version */
|
||||
NvU32 version;
|
||||
/** Filter buffer for regtrace statements */
|
||||
NVLOG_REGTRACE_FILTER filter;
|
||||
/** Buffer indices for all NvLog buffers. First element is default buffer */
|
||||
NvU32 buffers[NVLOG_REGTRACE_MAX_BUFFERS];
|
||||
} NVLOG_REGTRACE_LOGGER;
|
||||
|
||||
#endif // _NVLOG_DEFS_H_
|
||||
39
src/common/inc/nvlog_inc.h
Normal file
39
src/common/inc/nvlog_inc.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2012-2016 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
//
|
||||
// This file must not have include guards, it is supposed to be included
|
||||
// multiple times - Once in a precompiled header, once through noprecomp.h
|
||||
//
|
||||
|
||||
// WAR for a GCC precompiled headers problem
|
||||
#if !defined(NV_RM_PRECOMPILED_HEADER)
|
||||
#include "nvlog_inc2.h"
|
||||
|
||||
//
|
||||
// If noprecomp is not included, this will not expand and will result in an
|
||||
// undefined identifier. Hopefully, the meaningful name will hint at the
|
||||
// underlying problem.
|
||||
//
|
||||
#define ___please_include_noprecomp_h___
|
||||
|
||||
#endif
|
||||
46
src/common/inc/nvlog_inc2.h
Normal file
46
src/common/inc/nvlog_inc2.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2013,2016-2017,2020-2020 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _NVLOG_INC2_H_
|
||||
#define _NVLOG_INC2_H_
|
||||
//
|
||||
// Include the auto-generated g_$(filename)-nvlog.h header. The file contains
|
||||
// information about the trace statements that was pulled out by the NvLog preprocessor.
|
||||
// NVLOG_INCLUDE is defined by make at compile time, for every source file.
|
||||
//
|
||||
// The four lines of macros is some trickiness needed to make it work.
|
||||
//
|
||||
#if (defined(NVLOG_ENABLED) || defined(NV_MODS)) && defined(NVLOG_INCLUDE) && !defined(NVLOG_PARSING)
|
||||
#if NVLOG_ENABLED || defined(NV_MODS)
|
||||
|
||||
#ifndef NVLOG_FILEID // Acts as an include guard
|
||||
#define NVLOG_INCLUDE3(a) #a
|
||||
#define NVLOG_INCLUDE2(a) NVLOG_INCLUDE3 a
|
||||
#define NVLOG_INCLUDE1 NVLOG_INCLUDE2((NVLOG_INCLUDE))
|
||||
#include NVLOG_INCLUDE1
|
||||
#endif // NVLOG_FILEID
|
||||
|
||||
#endif // NVLOG_ENABLED
|
||||
#endif // defined(NVLOG_ENABLED) && defined(NVLOG_INCLUDE)
|
||||
|
||||
|
||||
#endif // _NVLOG_INC2_H_
|
||||
122
src/common/inc/nvop.h
Normal file
122
src/common/inc/nvop.h
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef NVOP_H
|
||||
#define NVOP_H
|
||||
|
||||
#define NVOP_REVISION_ID 0x00000100
|
||||
|
||||
// subfunction 0 is common use: NV_ACPI_ALL_FUNC_SUPPORT
|
||||
// #define NVOP_FUNC_SUPPORT 0x00000000 // Bit list of supported functions*
|
||||
#define NVOP_FUNC_DISPLAYSTATUS 0x00000005 // Query the Display Hot-Key**
|
||||
#define NVOP_FUNC_MDTL 0x00000006 // Query Display Toggle List**
|
||||
#define NVOP_FUNC_HCSMBADDR 0x00000007 // Get the SBIOS SMBus address for hybrid uController
|
||||
#define NVOP_FUNC_GETOBJBYTYPE 0x00000010 // Get the Firmware Object*
|
||||
#define NVOP_FUNC_GETALLOBJS 0x00000011 // Get the directory and all Objects *
|
||||
#define NVOP_FUNC_OPTIMUSCAPS 0x0000001A // Optimus Capabilities***
|
||||
#define NVOP_FUNC_OPTIMUSFLAG 0x0000001B // Update GPU MultiFunction State to sbios
|
||||
// * Required if any other functions are used.
|
||||
// ** Required for Optimus-specific display hotkey functionality
|
||||
// *** Required for Optimus-specific dGPU subsystem power control
|
||||
|
||||
// Function 1A: OPTIMUSCAPS
|
||||
// Args
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_FLAGS 0:0
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_FLAGS_ABSENT 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_FLAGS_PRESENT 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_TARGET 1:1
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_TARGET_SBIOS 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_TARGET_DRIVER 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_WR_EN 2:2
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_WR_EN_FALSE 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_WR_EN_TRUE 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_POWER_CONTROL 25:24
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_POWER_CONTROL_DONOT_POWER_DOWN_DGPU 0x00000002
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_POWER_CONTROL_POWER_DOWN_DGPU 0x00000003
|
||||
|
||||
// Returns
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_STATE 0:0
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_STATE_DISABLED 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_STATE_ENABLED 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_POWER 4:3
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_POWER_OFF 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_POWER_RESERVED1 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_POWER_RESERVED2 0x00000002
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_POWER_STABILIZED 0x00000003
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_HOTPLUG_CAPABILITIES 6:6
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_HOTPLUG_CAPABILITIES_COCONNECTED 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_MUXED_DDC 7:7
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_MUXED_DDC_FALSE 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_DGPU_MUXED_DDC_TRUE 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_ACTUAL 8:8
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_ACTUAL_SBIOS 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_CFG_SPACE_OWNER_ACTUAL_DRIVER 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_CAPABILITIES 26:24
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_CAPABILITIES_ABSENT 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_CAPABILITIES_DYNAMIC_POWER_CONTROL 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_HDAUDIO_CAPABILITIES 28:27
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_HDAUDIO_CAPABILITIES_ABSENT 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_HDAUDIO_CAPABILITIES_DISABLED 0x00000001
|
||||
#define NVOP_FUNC_OPTIMUSCAPS_OPTIMUS_HDAUDIO_CAPABILITIES_PRESENT 0x00000002
|
||||
|
||||
// Function 1B: OPTIMUSFLAG
|
||||
// Args
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_CONTROL 0:0
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_CONTROL_DISABLE 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_CONTROL_ENABLE 0x00000001
|
||||
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_STATECHANGE_REQUEST 1:1
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_STATECHANGE_REQUEST_IGNORE 0x00000000
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_AUDIOCODEC_STATECHANGE_REQUEST_EXECUTE 0x00000001
|
||||
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_APPLICATIONS_COUNT 9:2
|
||||
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_APPLICATIONS_COUNT_CHANGE_REQUEST 10:10
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_APPLICATIONS_COUNT_CHANGE_REQUEST_IGNORE 0x000000000
|
||||
#define NVOP_FUNC_OPTIMUSFLAG_APPLICATIONS_COUNT_CHANGE_REQUEST_EXECUTE 0x000000001
|
||||
|
||||
|
||||
// Function 1B: OPTIMUSFLAG
|
||||
// return
|
||||
#define NVOP_RET_OPTIMUSFLAG_AUDIOCODEC_STATE 0:0
|
||||
#define NVOP_RET_OPTIMUSFLAG_AUDIOCODEC_STATE_DISABLE 0x00000000
|
||||
#define NVOP_RET_OPTIMUSFLAG_AUDIOCODEC_STATE_ENABLE 0x00000001
|
||||
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICY 3:2
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICY_GPU_POWEROFF 0x00000000
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICY_GPU_POWERON 0x00000001
|
||||
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICYCHANGE_REQUEST 4:4
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICYCHANGE_REQUEST_IGNORE 0x00000000
|
||||
#define NVOP_RET_OPTIMUSFLAG_POLICYCHANGE_REQUEST_EXECUTE 0x00000001
|
||||
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_POLICY 6:5
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_POLICY_OPTIMUS 0x00000000
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_POLICY_IGPU 0x00000001
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_POLICY_DGPU 0x00000002
|
||||
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_REQUEST 7:7
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_REQUEST_IGNORE 0x00000000
|
||||
#define NVOP_RET_OPTIMUSFLAG_FORCE_GPU_REQUEST_EXECUTE 0x00000001
|
||||
#endif // NVOP_H
|
||||
|
||||
73
src/common/inc/nvrmcontext.h
Normal file
73
src/common/inc/nvrmcontext.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef __NVRMCONTEXT_H__
|
||||
#define __NVRMCONTEXT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "rs_access.h"
|
||||
|
||||
/*
|
||||
* An RM wrapping structure to make RMAPI accessible from the RM abstraction
|
||||
* in one location/context to other locations/contexts in a unified way.
|
||||
*
|
||||
* An nvRMContext can be created on the fly or stored preinitialized in
|
||||
* objects. It has no mutable state, it's just a collection of static
|
||||
* parameters to make access to RM possible.
|
||||
*
|
||||
* This is a C interface for maximal compatibility, and it is intended to be
|
||||
* used both in kernel and userspace.
|
||||
*
|
||||
*/
|
||||
typedef struct nvRMContextRec nvRMContext, *nvRMContextPtr;
|
||||
|
||||
struct nvRMContextRec {
|
||||
/*
|
||||
* The RM client of the calling context. In normal circumstances, the
|
||||
* callee should pass this as the hClient argument.
|
||||
*/
|
||||
NvU32 clientHandle;
|
||||
|
||||
/* User data field for the caller: to be freely used. */
|
||||
void *owner;
|
||||
|
||||
/*
|
||||
* RMAPI function wrappers: it's enough to only fill in those functions
|
||||
* that the caller will know that will be needed in each case. For now,
|
||||
* we list function pointers needed by nv_smg.c -- feel free to add more
|
||||
* RMAPI functions when necessary.
|
||||
*/
|
||||
NvU32 (*allocRoot) (nvRMContextPtr rmctx, NvU32 *phClient);
|
||||
NvU32 (*alloc) (nvRMContextPtr rmctx, NvU32 hClient, NvU32 hParent, NvU32 hObject, NvU32 hClass, void *pAllocParms);
|
||||
NvU32 (*free) (nvRMContextPtr rmctx, NvU32 hClient, NvU32 hParent, NvU32 hObject);
|
||||
NvU32 (*control) (nvRMContextPtr rmctx, NvU32 hClient, NvU32 hObject, NvU32 cmd, void *pParams, NvU32 paramsSize);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // __NVRMCONTEXT_H__
|
||||
71
src/common/inc/pex.h
Normal file
71
src/common/inc/pex.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2012-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef PEX_H
|
||||
#define PEX_H
|
||||
|
||||
#define PEX_REVISION_ID 0x00000002
|
||||
|
||||
// subfunction 0 is common use: NV_ACPI_ALL_FUNC_SUPPORT
|
||||
// #define PEX_FUNC_GETSUPPORTFUNCTION 0x00000000 // Get supported function
|
||||
#define PEX_FUNC_GETSLOTINFO 0x00000001 // Get PCI Express Slot Information
|
||||
#define PEX_FUNC_GETSLOTNUMBER 0x00000002 // Get PCI Express Slot Number
|
||||
#define PEX_FUNC_GETVENDORTOKENID 0x00000003 // Get PCI Express Vendor Specific Token ID strings
|
||||
#define PEX_FUNC_GETPCIBUSCAPS 0x00000004 // Get PCI Express Root Bus Capabilities
|
||||
#define PEX_FUNC_IGNOREPCIBOOTCONFIG 0x00000005 // Indication to OS that PCI Boot config can be ignored
|
||||
#define PEX_FUNC_GETLTRLATENCY 0x00000006 // Get PCI Express Latency Tolerance Reporting Info
|
||||
#define PEX_FUNC_NAMEPCIDEVICE 0x00000007 // Get name of PCI or PCIE device
|
||||
#define PEX_FUNC_SETLTRLATENCY 0x00000008 // Set PCI Express Latency Tolerance Reporting Values
|
||||
#define PEX_FUNC_AUXPOWERLIMIT 0x0000000A // Set Aux power limit
|
||||
#define PEX_FUNC_PEXRST_DELAY 0x0000000B // Set Pex reset delay
|
||||
|
||||
|
||||
/*
|
||||
* 0h: Denied.
|
||||
* Indicates that the platform cannot support the power requested.
|
||||
* 1h: Granted.
|
||||
* Indicates that the device is permitted to draw the requested auxiliary power.
|
||||
* 2h: Granted.
|
||||
* Indicates that the platform will not remove main power from the slot
|
||||
* while the system is in S0.
|
||||
*/
|
||||
#define NV_AUX_POWER_REQUEST_STATUS 1:0
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_DENIED 0x00
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_GRANTED_WITHOUT_12V_POWER 0x01
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_GRANTED_WITH_12V_POWER 0x02
|
||||
|
||||
/*
|
||||
* Retry, with interval.
|
||||
* Bit 4, is a status bit. If set, it indicates that the platform cannot support
|
||||
* the power requested at this time, but it may be able to do so in the future.
|
||||
* Bits 3:0 contains the waiting time, in seconds, after which request can be made again.
|
||||
*/
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER 4:0
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_STATUS 4:4
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_STATUS_FALSE 0x0
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_STATUS_TRUE 0x1
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_INTERVAL 3:0
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_INTERVAL_MIN 0x1
|
||||
#define NV_AUX_POWER_REQUEST_STATUS_RETRY_LATER_INTERVAL_MAX 0xF
|
||||
|
||||
#endif // PEX_H
|
||||
43
src/common/inc/rmosxfac.h
Normal file
43
src/common/inc/rmosxfac.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 1993-2003 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#ifndef _RMOSXFAC_H_
|
||||
#define _RMOSXFAC_H_
|
||||
|
||||
/**************** Resource Manager Defines and Structures ******************\
|
||||
* *
|
||||
* Module: RMOSXFAC.H *
|
||||
* Declarations for common OS interface functions. *
|
||||
* *
|
||||
\***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern NvS32 RmInitRm(void);
|
||||
extern NvS32 RmDestroyRm(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _RMOSXFAC_H_
|
||||
44
src/common/inc/swref/common_def_nvlink.h
Normal file
44
src/common/inc/swref/common_def_nvlink.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef COMMON_DEF_NVLINK_H
|
||||
#define COMMON_DEF_NVLINK_H
|
||||
|
||||
//
|
||||
// Arch CONNECTION defines, replaces forceconfig. See Bugs 1665737,
|
||||
// 1665734 and 1734252.
|
||||
// This per link connection state is passed up from chiplib
|
||||
// and can be controlled on the command line.
|
||||
// The max number of connections is speced in __SIZE_1.
|
||||
//
|
||||
#define NV_NVLINK_ARCH_CONNECTION 31:0
|
||||
#define NV_NVLINK_ARCH_CONNECTION__SIZE_1 32
|
||||
#define NV_NVLINK_ARCH_CONNECTION_DISABLED 0x00000000
|
||||
#define NV_NVLINK_ARCH_CONNECTION_PEER_MASK 7:0
|
||||
#define NV_NVLINK_ARCH_CONNECTION_ENABLED 8:8
|
||||
#define NV_NVLINK_ARCH_CONNECTION_PHYSICAL_LINK 21:16
|
||||
#define NV_NVLINK_ARCH_CONNECTION_RESERVED 29:20
|
||||
#define NV_NVLINK_ARCH_CONNECTION_PEERS_COMPUTE_ONLY 30:30
|
||||
#define NV_NVLINK_ARCH_CONNECTION_CPU 31:31
|
||||
|
||||
#endif // COMMON_DEF_NVLINK_H
|
||||
58
src/common/inc/swref/published/disp/v02_04/dev_disp.h
Normal file
58
src/common/inc/swref/published/disp/v02_04/dev_disp.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __v02_04_dev_disp_h__
|
||||
#define __v02_04_dev_disp_h__
|
||||
|
||||
#define NV_PDISP_DSI_RM_INTR_DISPATCH 0x00610088 /* R--4R */
|
||||
#define NV_PDISP_DSI_RM_INTR_DISPATCH_HEAD(i) (24+(i)):(24+(i)) /* R--VF */
|
||||
#define NV_PDISP_DSI_RM_INTR_DISPATCH_HEAD__SIZE_1 4 /* */
|
||||
#define NV_PDISP_DSI_RM_INTR_DISPATCH_HEAD_NOT_PENDING 0x00000000 /* */
|
||||
#define NV_PDISP_DSI_RM_INTR_DISPATCH_HEAD_PENDING 0x00000001 /* */
|
||||
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD(i) (0x006100BC+(i)*2048) /* RW-4A */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD__SIZE_1 4 /* */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_VBLANK 0:0 /* RWIVF */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_VBLANK_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_VBLANK_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_VBLANK_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_VBLANK_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_PMU_RG_LINE 29:29 /* RWIVF */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_PMU_RG_LINE_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_PMU_RG_LINE_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_PMU_RG_LINE_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_PMU_RG_LINE_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_RM_RG_LINE 31:31 /* RWIVF */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_RM_RG_LINE_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_RM_RG_LINE_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_RM_RG_LINE_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_DSI_RM_INTR_HEAD_RM_RG_LINE_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_PIPE_IN_LOADV_COUNTER(i) (0x00616118+(i)*2048) /* RW-4A */
|
||||
#define NV_PDISP_PIPE_IN_LOADV_COUNTER__SIZE_1 4 /* */
|
||||
#define NV_PDISP_PIPE_IN_LOADV_COUNTER_VALUE 31:0 /* RWIUF */
|
||||
#define NV_PDISP_PIPE_IN_LOADV_COUNTER_VALUE_INIT 0x00000000 /* RWI-V */
|
||||
#define NV_PDISP_PIPE_IN_LOADV_COUNTER_VALUE_ZERO 0x00000000 /* RW--V */
|
||||
#endif // __v02_04_dev_disp_h__
|
||||
281
src/common/inc/swref/published/disp/v03_00/dev_disp.h
Normal file
281
src/common/inc/swref/published/disp/v03_00/dev_disp.h
Normal file
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2003-2021 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __v03_00_dev_disp_h__
|
||||
#define __v03_00_dev_disp_h__
|
||||
#define NV_PDISP_CHN_NUM_CORE 0 /* */
|
||||
#define NV_PDISP_CHN_NUM_WIN(i) (1+(i)) /* */
|
||||
#define NV_PDISP_CHN_NUM_WIN__SIZE_1 32 /* */
|
||||
#define NV_PDISP_CHN_NUM_WINIM(i) (33+(i)) /* */
|
||||
#define NV_PDISP_CHN_NUM_WINIM__SIZE_1 32 /* */
|
||||
#define NV_PDISP_CHN_NUM_CURS(i) (73+(i)) /* */
|
||||
#define NV_PDISP_CHN_NUM_CURS__SIZE_1 8 /* */
|
||||
#define NV_PDISP_FE_HW_SYS_CAP_HEAD_EXISTS(i) (0+(i)):(0+(i)) /* R--VF */
|
||||
#define NV_PDISP_FE_HW_SYS_CAP_HEAD_EXISTS__SIZE_1 8 /* */
|
||||
#define NV_PDISP_FE_HW_SYS_CAP_HEAD_EXISTS_YES 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_SW 0x00640FFF:0x00640000 /* RW--D */
|
||||
#define NV_PDISP_SF_USER_0 0x006F03FF:0x006F0000 /* RW--D */
|
||||
#define NV_UDISP_HASH_BASE 0x00000000 /* */
|
||||
#define NV_UDISP_HASH_LIMIT 0x00001FFF /* */
|
||||
#define NV_UDISP_OBJ_MEM_BASE 0x00002000 /* */
|
||||
#define NV_UDISP_OBJ_MEM_LIMIT 0x0000FFFF /* */
|
||||
#define NV_UDISP_HASH_TBL_CLIENT_ID (1*32+13):(1*32+0) /* RWXVF */
|
||||
#define NV_UDISP_HASH_TBL_INSTANCE (1*32+24):(1*32+14) /* RWXUF */
|
||||
#define NV_UDISP_HASH_TBL_CHN (1*32+31):(1*32+25) /* RWXUF */
|
||||
#define NV_DMA_TARGET_NODE (0*32+1):(0*32+0) /* RWXVF */
|
||||
#define NV_DMA_TARGET_NODE_PHYSICAL_NVM 0x00000001 /* RW--V */
|
||||
#define NV_DMA_TARGET_NODE_PHYSICAL_PCI 0x00000002 /* RW--V */
|
||||
#define NV_DMA_TARGET_NODE_PHYSICAL_PCI_COHERENT 0x00000003 /* RW--V */
|
||||
#define NV_DMA_ACCESS (0*32+2):(0*32+2) /* RWXVF */
|
||||
#define NV_DMA_ACCESS_READ_ONLY 0x00000000 /* RW--V */
|
||||
#define NV_DMA_ACCESS_READ_AND_WRITE 0x00000001 /* RW--V */
|
||||
#define NV_DMA_KIND (0*32+20):(0*32+20) /* RWXVF */
|
||||
#define NV_DMA_KIND_PITCH 0x00000000 /* RW--V */
|
||||
#define NV_DMA_KIND_BLOCKLINEAR 0x00000001 /* RW--V */
|
||||
#define NV_DMA_ADDRESS_BASE_LO (1*32+31):(1*32+0) /* RWXUF */
|
||||
#define NV_DMA_ADDRESS_BASE_HI (2*32+6):(2*32+0) /* RWXUF */
|
||||
#define NV_DMA_ADDRESS_LIMIT_LO (3*32+31):(3*32+0) /* RWXUF */
|
||||
#define NV_DMA_ADDRESS_LIMIT_HI (4*32+6):(4*32+0) /* RWXUF */
|
||||
#define NV_DMA_SIZE 20 /* */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR_CORE 0x00680000 /* */
|
||||
#define NV_UDISP_FE_CHN_ARMED_BASEADR_CORE (0x00680000+32768) /* */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR_WIN(i) ((0x00690000+(i)*4096)) /* */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR_WINIM(i) ((0x00690000+((i+32)*4096))) /* */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR_CURS(i) (0x006D8000+(i)*4096) /* RW-4A */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR(i) ((i)>0?(((0x00690000+(i-1)*4096))):0x00680000) /* */
|
||||
#define NV_UDISP_FE_CHN_ASSY_BASEADR__SIZE_1 81 /* */
|
||||
#define NV_PDISP_RG_DPCA(i) (0x00616330+(i)*2048) /* R--4A */
|
||||
#define NV_PDISP_RG_DPCA__SIZE_1 8 /* */
|
||||
#define NV_PDISP_RG_DPCA_LINE_CNT 15:0 /* R--UF */
|
||||
#define NV_PDISP_RG_DPCA_FRM_CNT 31:16 /* R--UF */
|
||||
#define NV_PDISP_FE_FLIPLOCK 0x0061206C /* RW-4R */
|
||||
#define NV_PDISP_FE_FLIPLOCK_LSR_MIN_TIME 23:0 /* RWIVF */
|
||||
|
||||
#define NV_PDISP_FE_PBBASE_WIN__SIZE_1 32 /* */
|
||||
#define NV_PDISP_FE_PBBASE_WINIM__SIZE_1 32 /* */
|
||||
|
||||
#define NV_PDISP_FE_CHNCTL_CORE 0x006104E0 /* RW-4R */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_ALLOCATION 0:0 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_ALLOCATION_ALLOCATE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_PUTPTR_WRITE 4:4 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_PUTPTR_WRITE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_PUTPTR_WRITE_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_SKIP_NOTIF 9:9 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_SKIP_NOTIF_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_SKIP_NOTIF_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_IGNORE_INTERLOCK 11:11 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_IGNORE_INTERLOCK_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_IGNORE_INTERLOCK_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_INTR_DURING_SHTDWN 15:15 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_INTR_DURING_SHTDWN_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_INTR_DURING_SHTDWN_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_TRASH_MODE 14:13 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_TRASH_MODE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_TRASH_MODE_TRASH_ONLY 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CORE_TRASH_MODE_TRASH_AND_ABORT 0x00000002 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS(i) (0x00610604+(i)*4) /* RW-4A */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS__SIZE_1 8 /* */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_ALLOCATION 0:0 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_ALLOCATION_ALLOCATE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_IGNORE_INTERLOCK 11:11 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_IGNORE_INTERLOCK_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_IGNORE_INTERLOCK_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_LOCK_PIO_FIFO 4:4 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_LOCK_PIO_FIFO_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_LOCK_PIO_FIFO_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_TRASH_MODE 14:13 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_TRASH_MODE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_TRASH_MODE_TRASH_ONLY 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_CURS_TRASH_MODE_TRASH_AND_ABORT 0x00000002 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN(i) (0x006104E4+(i)*4) /* RW-4A */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_ALLOCATION 0:0 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_ALLOCATION_ALLOCATE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_CONNECTION 1:1 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_CONNECTION_CONNECT 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_CONNECTION_DISCONNECT 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_PUTPTR_WRITE 4:4 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_PUTPTR_WRITE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_PUTPTR_WRITE_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SYNCPOINT 6:6 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SYNCPOINT_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SYNCPOINT_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_TIMESTAMP 7:7 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_TIMESTAMP_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_TIMESTAMP_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_PI 8:8 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_PI_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_PI_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_NOTIF 9:9 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_NOTIF_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_NOTIF_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SEMA 10:10 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SEMA_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_SKIP_SEMA_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_INTERLOCK 11:11 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_INTERLOCK_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_IGNORE_INTERLOCK_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_TRASH_MODE 14:13 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_TRASH_MODE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_TRASH_MODE_TRASH_ONLY 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WIN_TRASH_MODE_TRASH_AND_ABORT 0x00000002 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM(i) (0x00610564+(i)*4) /* RW-4A */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_ALLOCATION 0:0 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_ALLOCATION_ALLOCATE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_PUTPTR_WRITE 4:4 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_PUTPTR_WRITE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_PUTPTR_WRITE_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_IGNORE_INTERLOCK 11:11 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_IGNORE_INTERLOCK_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_IGNORE_INTERLOCK_ENABLE 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_TRASH_MODE 14:13 /* RWIVF */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_TRASH_MODE_DISABLE 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_TRASH_MODE_TRASH_ONLY 0x00000001 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNCTL_WINIM_TRASH_MODE_TRASH_AND_ABORT 0x00000002 /* RW--V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE 0x00610630 /* R--4R */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE 20:16 /* R-IVF */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_DEALLOC 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_DEALLOC_LIMBO 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_VBIOS_INIT1 0x00000002 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_VBIOS_INIT2 0x00000003 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_VBIOS_OPERATION 0x00000004 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_EFI_INIT1 0x00000005 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_EFI_INIT2 0x00000006 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_EFI_OPERATION 0x00000007 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_UNCONNECTED 0x00000008 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_INIT1 0x00000009 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_INIT2 0x0000000A /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_IDLE 0x0000000B /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_BUSY 0x0000000C /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_SHUTDOWN1 0x0000000D /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CORE_STATE_SHUTDOWN2 0x0000000E /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS(i) (0x00610784+(i)*4) /* R--4A */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS__SIZE_1 8 /* */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS_STATE 18:16 /* R-IVF */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS_STATE_DEALLOC 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS_STATE_IDLE 0x00000004 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_CURS_STATE_BUSY 0x00000005 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN(i) (0x00610664+(i)*4) /* R--4A */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN__SIZE_1 32 /* */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE 19:16 /* R-IVF */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_DEALLOC 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_INIT1 0x00000002 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_INIT2 0x00000003 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_IDLE 0x00000004 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_BUSY 0x00000005 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_SHUTDOWN1 0x00000006 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_SHUTDOWN2 0x00000007 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATE_UNCONNECTED 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATUS_METHOD_EXEC 31:31 /* R-IVF */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WIN_STATUS_METHOD_EXEC_IDLE 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM(i) (0x006106E4+(i)*4) /* R--4A */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM__SIZE_1 32 /* */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE 19:16 /* R-IVF */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_DEALLOC 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_UNCONNECTED 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_INIT1 0x00000002 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_INIT2 0x00000003 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_IDLE 0x00000004 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_BUSY 0x00000005 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_SHUTDOWN1 0x00000006 /* R---V */
|
||||
#define NV_PDISP_FE_CHNSTATUS_WINIM_STATE_SHUTDOWN2 0x00000007 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_DISPATCH 0x00611EC0 /* R--4R */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_DISPATCH_HEAD_TIMING(i) (0+(i)):(0+(i)) /* */
|
||||
#define NV_PDISP_FE_RM_INTR_DISPATCH_HEAD_TIMING__SIZE_1 8 /* */
|
||||
#define NV_PDISP_FE_RM_INTR_DISPATCH_HEAD_TIMING_NOT_PENDING 0x00000000 /* */
|
||||
#define NV_PDISP_FE_RM_INTR_DISPATCH_HEAD_TIMING_PENDING 0x00000001 /* */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING(i) (0x00611C00+(i)*4) /* R--4A */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING__SIZE_1 8 /* */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_LAST_DATA 1:1 /* R-IVF */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_LAST_DATA_NOT_PENDING 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_LAST_DATA_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_A 5:5 /* R-IVF */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_A_NOT_PENDING 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_A_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_B 6:6 /* R-IVF */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_B_NOT_PENDING 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING_RG_LINE_B_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING(i) (0x00611800+(i)*4) /* RW-4A */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING__SIZE_1 8 /* */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_LAST_DATA 1:1 /* RWIVF */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_LAST_DATA_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_LAST_DATA_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_LAST_DATA_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_LAST_DATA_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_A 5:5 /* RWIVF */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_A_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_A_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_A_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_A_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_B 6:6 /* RWIVF */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_B_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_B_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_B_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_LINE_B_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_VBLANK 2:2 /* RWIVF */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_VBLANK_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_VBLANK_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_VBLANK_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_VBLANK_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP 0x00611C30 /* R--4R */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_AWAKEN 8:8 /* R-IVF */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_AWAKEN_NOT_PENDING 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_AWAKEN_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN 0x00611858 /* RW-4R */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH(i) (0+(i)):(0+(i)) /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH__SIZE_1 32 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH_INIT 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH_NOT_PENDING 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH_PENDING 0x00000001 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_WIN_CH_RESET 0x00000001 /* */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER 0x0061185C /* RW-4R */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER_CORE 0:0 /* RWIVF */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER_CORE_INIT 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER_CORE_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER_CORE_PENDING 0x00000001 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_STAT_AWAKEN_OTHER_CORE_RESET 0x00000001 /* -W--V */
|
||||
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER(i) (0x0061611C+(i)*2048) /* RW-4A */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER__SIZE_1 8 /* */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER_VALUE 31:0 /* RWIUF */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER_VALUE_INIT 0x00000000 /* RWI-V */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER_VALUE_ZERO 0x00000000 /* RW--V */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER_VALUE_HW 0x00000000 /* R---V */
|
||||
#define NV_PDISP_POSTCOMP_HEAD_LOADV_COUNTER_VALUE_SW 0x00000000 /* -W--V */
|
||||
|
||||
#endif // __v03_00_dev_disp_h__
|
||||
59
src/common/inc/swref/published/disp/v04_01/dev_disp.h
Normal file
59
src/common/inc/swref/published/disp/v04_01/dev_disp.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __v04_01_dev_disp_h__
|
||||
#define __v04_01_dev_disp_h__
|
||||
#define NV_PDISP 0x006F1FFF:0x00610000 /* RW--D */
|
||||
|
||||
#define NV_PDISP_FE_EVT_DISPATCH 0x00611A00 /* R--4R */
|
||||
#define NV_PDISP_FE_EVT_DISPATCH_SEM_WIN 26:26 /* R--VF */
|
||||
#define NV_PDISP_FE_EVT_DISPATCH_SEM_WIN_NOT_PENDING 0x00000000 /* R---V */
|
||||
#define NV_PDISP_FE_EVT_DISPATCH_SEM_WIN_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN 0x00611868 /* RW-4R */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH(i) (0+(i)):(0+(i)) /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH__SIZE_1 32 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH_INIT 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH_NOT_PENDING 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH_PENDING 0x00000001 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_SEM_WIN_CH_RESET 0x00000001 /* */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP 0x00611C30 /* R--4R */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_WIN_SEM 9:9 /* R-IVF */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_WIN_SEM_NOT_PENDING 0x00000000 /* R-I-V */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_WIN_SEM_PENDING 0x00000001 /* R---V */
|
||||
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING(i) (0x00611C00+(i)*4) /* R--4A */
|
||||
#define NV_PDISP_FE_RM_INTR_STAT_HEAD_TIMING__SIZE_1 8 /* */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING(i) (0x00611800+(i)*4) /* RW-4A */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING__SIZE_1 8 /* */
|
||||
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM(i) (16+(i)):(16+(i)) /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM__SIZE_1 6 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM_INIT 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM_NOT_PENDING 0x00000000 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM_PENDING 0x00000001 /* */
|
||||
#define NV_PDISP_FE_EVT_STAT_HEAD_TIMING_RG_SEM_RESET 0x00000001 /* */
|
||||
|
||||
#endif // __v04_01_dev_disp_h__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user