diff --git a/CHANGELOG.md b/CHANGELOG.md index 5323ec6db..8f8947468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## Release 515 Entries +### [515.65.01] 2022-08-02 + +#### Fixed + +- Collection of minor fixes to issues, [#6](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/61) by @Joshua-Ashton +- Remove unnecessary use of acpi_bus_get_device(). + +### [515.57] 2022-06-28 + #### Fixed - Backtick is deprecated, [#273](https://github.com/NVIDIA/open-gpu-kernel-modules/pull/273) by @arch-user-france1 diff --git a/README.md b/README.md index c37a7ba8c..af2d7e25f 100644 --- a/README.md +++ b/README.md @@ -704,6 +704,8 @@ Subsystem Device ID. | NVIDIA RTX A5500 | 2233 10DE 165A | | NVIDIA RTX A5500 | 2233 17AA 165A | | NVIDIA A40 | 2235 10DE 145A | +| NVIDIA A10 | 2236 10DE 1482 | +| NVIDIA A10G | 2237 10DE 152F | | NVIDIA A10M | 2238 10DE 1677 | | NVIDIA GeForce RTX 3060 Ti | 2414 | | NVIDIA GeForce RTX 3080 Ti Laptop GPU | 2420 | diff --git a/kernel-open/common/inc/nv.h b/kernel-open/common/inc/nv.h index e1bfbb0d7..923967220 100644 --- a/kernel-open/common/inc/nv.h +++ b/kernel-open/common/inc/nv.h @@ -989,6 +989,7 @@ NvBool NV_API_CALL rm_disable_iomap_wc(void); void NV_API_CALL rm_init_dynamic_power_management(nvidia_stack_t *, nv_state_t *, NvBool); void NV_API_CALL rm_cleanup_dynamic_power_management(nvidia_stack_t *, nv_state_t *); +void NV_API_CALL rm_enable_dynamic_power_management(nvidia_stack_t *, nv_state_t *); NV_STATUS NV_API_CALL rm_ref_dynamic_power(nvidia_stack_t *, nv_state_t *, nv_dynamic_power_mode_t); void NV_API_CALL rm_unref_dynamic_power(nvidia_stack_t *, nv_state_t *, nv_dynamic_power_mode_t); NV_STATUS NV_API_CALL rm_transition_dynamic_power(nvidia_stack_t *, nv_state_t *, NvBool); diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh index dae07d2b4..ee19e0374 100755 --- a/kernel-open/conftest.sh +++ b/kernel-open/conftest.sh @@ -5288,22 +5288,6 @@ compile_test() { rm -f conftest$$.c ;; - acpi_bus_get_device) - # - # Determine if the acpi_bus_get_device() function is present - # - # acpi_bus_get_device() was removed by commit ac2a3feefad5 - # ("ACPI: bus: Eliminate acpi_bus_get_device()") in - # v5.18-rc2 (2022-04-05). - # - CODE=" - #include - int conftest_acpi_bus_get_device(void) { - return acpi_bus_get_device(); - }" - compile_check_conftest "$CODE" "NV_ACPI_BUS_GET_DEVICE_PRESENT" "" "functions" - ;; - dma_resv_add_fence) # # Determine if the dma_resv_add_fence() function is present. @@ -5365,6 +5349,23 @@ compile_test() { compile_check_conftest "$CODE" "NV_RESERVATION_OBJECT_RESERVE_SHARED_HAS_NUM_FENCES_ARG" "" "types" ;; + get_task_ioprio) + # + # Determine if the __get_task_ioprio() function is present. + # + # __get_task_ioprio was added by commit 893e5d32d583 + # ("block: Generalize get_current_ioprio() for any task") for + # v5.20 linux-next (2022-06-23). + # + CODE=" + #include + void conftest_get_task_ioprio(void) { + __get_task_ioprio(); + }" + + compile_check_conftest "$CODE" "NV_GET_TASK_IOPRIO_PRESENT" "" "functions" + ;; + # When adding a new conftest entry, please use the correct format for # specifying the relevant upstream Linux kernel commit. # diff --git a/kernel-open/nvidia/nv-acpi.c b/kernel-open/nvidia/nv-acpi.c index 6b8632a55..96e31faee 100644 --- a/kernel-open/nvidia/nv-acpi.c +++ b/kernel-open/nvidia/nv-acpi.c @@ -715,12 +715,11 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method( ) { acpi_status status; - struct acpi_device *device = NULL; union acpi_object *ddc = NULL; - struct list_head *node, *next; NvU32 i, largestEdidSize; acpi_handle dev_handle = NULL; acpi_handle lcd_dev_handle = NULL; + acpi_handle handle = NULL; if (!nv_acpi_get_device_handle(nv, &dev_handle)) return NV_ERR_NOT_SUPPORTED; @@ -728,15 +727,6 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method( if (!dev_handle) return NV_ERR_INVALID_ARGUMENT; -#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT) - status = acpi_bus_get_device(dev_handle, &device); -#else - return NV_ERR_NOT_SUPPORTED; -#endif - - if (ACPI_FAILURE(status) || !device) - return NV_ERR_INVALID_ARGUMENT; - if (!NV_MAY_SLEEP()) { #if defined(DEBUG) @@ -747,16 +737,16 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method( return NV_ERR_NOT_SUPPORTED; } - list_for_each_safe(node, next, &device->children) + while (lcd_dev_handle == NULL) { unsigned long long device_id = 0; - struct acpi_device *dev = - list_entry(node, struct acpi_device, node); - if (!dev) - continue; + status = acpi_get_next_object(ACPI_TYPE_DEVICE, dev_handle, + handle, &handle); + if (ACPI_FAILURE(status) || (handle == NULL)) + break; - status = acpi_evaluate_integer(dev->handle, "_ADR", NULL, &device_id); + status = acpi_evaluate_integer(handle, "_ADR", NULL, &device_id); if (ACPI_FAILURE(status)) /* Couldnt query device_id for this device */ continue; @@ -766,16 +756,13 @@ NV_STATUS NV_API_CALL nv_acpi_ddc_method( case 0x0118: case 0x0400: case 0xA420: - lcd_dev_handle = dev->handle; + lcd_dev_handle = handle; nv_printf(NV_DBG_INFO, "NVRM: %s Found LCD: %x\n", __FUNCTION__, device_id); break; default: break; } - - if (lcd_dev_handle != NULL) - break; } if (lcd_dev_handle == NULL) @@ -1125,15 +1112,14 @@ NV_STATUS NV_API_CALL nv_acpi_mux_method( ) { acpi_status status; - struct acpi_device *device = NULL; struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *mux = NULL; union acpi_object mux_arg = { ACPI_TYPE_INTEGER }; struct acpi_object_list input = { 1, &mux_arg }; acpi_handle dev_handle = NULL; acpi_handle mux_dev_handle = NULL; + acpi_handle handle = NULL; unsigned long long device_id = 0; - struct list_head *node, *next; if ((strcmp(pMethodName, "MXDS") != 0) && (strcmp(pMethodName, "MXDM") != 0)) @@ -1154,16 +1140,6 @@ NV_STATUS NV_API_CALL nv_acpi_mux_method( if (!dev_handle) return NV_ERR_INVALID_ARGUMENT; -#if defined(NV_ACPI_BUS_GET_DEVICE_PRESENT) - status = acpi_bus_get_device(dev_handle, &device); -#else - return NV_ERR_NOT_SUPPORTED; -#endif - - - if (ACPI_FAILURE(status) || !device) - return NV_ERR_INVALID_ARGUMENT; - if (!NV_MAY_SLEEP()) { #if defined(DEBUG) @@ -1172,23 +1148,16 @@ NV_STATUS NV_API_CALL nv_acpi_mux_method( return NV_ERR_NOT_SUPPORTED; } - list_for_each_safe(node, next, &device->children) + while (mux_dev_handle == NULL) { - struct acpi_device *dev = list_entry(node, struct acpi_device, node); - - if (!dev) - continue; - - status = acpi_evaluate_integer(dev->handle, "_ADR", NULL, &device_id); - if (ACPI_FAILURE(status)) - /* Could not query device_id for this device */ - continue; - - if (device_id == muxAcpiId) - { - mux_dev_handle = dev->handle; + status = acpi_get_next_object(ACPI_TYPE_DEVICE, dev_handle, + handle, &handle); + if (ACPI_FAILURE(status) || (handle == NULL)) break; - } + + status = acpi_evaluate_integer(handle, "_ADR", NULL, &device_id); + if (ACPI_SUCCESS(status) && (device_id == muxAcpiId)) + mux_dev_handle = handle; } if (mux_dev_handle == NULL) diff --git a/kernel-open/nvidia/nv-dmabuf.c b/kernel-open/nvidia/nv-dmabuf.c index f4f4d195b..29894e9d0 100644 --- a/kernel-open/nvidia/nv-dmabuf.c +++ b/kernel-open/nvidia/nv-dmabuf.c @@ -797,12 +797,12 @@ nv_dma_buf_reuse( } - - - - - - + if (buf->ops != &nv_dma_buf_ops) + { + nv_printf(NV_DBG_ERRORS, "NVRM: Invalid dma-buf fd\n"); + status = NV_ERR_INVALID_ARGUMENT; + goto cleanup_dmabuf; + } priv = buf->priv; diff --git a/kernel-open/nvidia/nv-pci.c b/kernel-open/nvidia/nv-pci.c index f9f64ec1f..5d3e4be87 100644 --- a/kernel-open/nvidia/nv-pci.c +++ b/kernel-open/nvidia/nv-pci.c @@ -608,6 +608,13 @@ next_bar: dev_pm_set_driver_flags(nvl->dev, DPM_FLAG_NEVER_SKIP); #endif + /* + * Dynamic power management should be enabled as the last step. + * Kernel runtime power management framework can put the device + * into the suspended state. Hardware register access should not be done + * after enabling dynamic power management. + */ + rm_enable_dynamic_power_management(sp, nv); nv_kmem_cache_free_stack(sp); return 0; @@ -683,8 +690,9 @@ nv_pci_remove(struct pci_dev *pci_dev) if ((NV_ATOMIC_READ(nvl->usage_count) != 0) && !(nv->is_external_gpu)) { nv_printf(NV_DBG_ERRORS, - "NVRM: Attempting to remove minor device %u with non-zero usage count!\n", - nvl->minor_num); + "NVRM: Attempting to remove device %04x:%02x:%02x.%x with non-zero usage count!\n", + NV_PCI_DOMAIN_NUMBER(pci_dev), NV_PCI_BUS_NUMBER(pci_dev), + NV_PCI_SLOT_NUMBER(pci_dev), PCI_FUNC(pci_dev->devfn)); /* * We can't return from this function without corrupting state, so we wait for @@ -708,9 +716,10 @@ nv_pci_remove(struct pci_dev *pci_dev) if (!nvl) { /* The device was not found, which should not happen */ - nv_printf(NV_DBG_ERRORS, "NVRM: Failed removal of minor device! %04x:%02x:%02x.%x\n", + nv_printf(NV_DBG_ERRORS, + "NVRM: Failed removal of device %04x:%02x:%02x.%x!\n", NV_PCI_DOMAIN_NUMBER(pci_dev), NV_PCI_BUS_NUMBER(pci_dev), - NV_PCI_SLOT_NUMBER(pci_dev), PCI_FUNC(pci_dev->devfn)); + NV_PCI_SLOT_NUMBER(pci_dev), PCI_FUNC(pci_dev->devfn)); WARN_ON(1); goto done; } @@ -719,8 +728,9 @@ nv_pci_remove(struct pci_dev *pci_dev) } nv_printf(NV_DBG_ERRORS, - "NVRM: Continuing with GPU removal for minor device %u\n", - nvl->minor_num); + "NVRM: Continuing with GPU removal for device %04x:%02x:%02x.%x\n", + NV_PCI_DOMAIN_NUMBER(pci_dev), NV_PCI_BUS_NUMBER(pci_dev), + NV_PCI_SLOT_NUMBER(pci_dev), PCI_FUNC(pci_dev->devfn)); } rm_check_for_gpu_surprise_removal(sp, nv); diff --git a/kernel-open/nvidia/nv.c b/kernel-open/nvidia/nv.c index 0b06d0c73..babdd2882 100644 --- a/kernel-open/nvidia/nv.c +++ b/kernel-open/nvidia/nv.c @@ -5443,7 +5443,19 @@ NvBool NV_API_CALL nv_s2idle_pm_configured(void) return NV_FALSE; } + /* + * init_sync_kiocb() internally uses GPL licensed __get_task_ioprio() from + * v5.20-rc1. + */ +#if defined(NV_GET_TASK_IOPRIO_PRESENT) + memset(&kiocb, 0, sizeof(kiocb)); + kiocb.ki_filp = file; + kiocb.ki_flags = iocb_flags(file); + kiocb.ki_ioprio = IOPRIO_DEFAULT; +#else init_sync_kiocb(&kiocb, file); +#endif + kiocb.ki_pos = 0; iov_iter_kvec(&iter, READ, &iov, 1, sizeof(buf)); diff --git a/kernel-open/nvidia/nvidia.Kbuild b/kernel-open/nvidia/nvidia.Kbuild index 5eee12034..6941c651b 100644 --- a/kernel-open/nvidia/nvidia.Kbuild +++ b/kernel-open/nvidia/nvidia.Kbuild @@ -199,7 +199,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_buf_ops_has_map_atomic NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_buf_has_dynamic_attachment NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_buf_attachment_has_peer2peer NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_set_mask_and_coherent -NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_bus_get_device +NV_CONFTEST_FUNCTION_COMPILE_TESTS += get_task_ioprio NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_gpl_of_node_to_nid NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_gpl_sme_active diff --git a/src/common/displayport/inc/dp_deviceimpl.h b/src/common/displayport/inc/dp_deviceimpl.h index b3ab32d24..a24ac928d 100644 --- a/src/common/displayport/inc/dp_deviceimpl.h +++ b/src/common/displayport/inc/dp_deviceimpl.h @@ -122,6 +122,8 @@ namespace DisplayPort ConnectorType connectorType; Address address; GUID guid; + GUID guid2; + bool bVirtualPeerDevice; NvU8 peerDevice; NvU8 dpcdRevisionMajor; NvU8 dpcdRevisionMinor; @@ -357,6 +359,29 @@ namespace DisplayPort return hal->setIgnoreMSATimingParamters(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; + } + + virtual void queryGUID2(); + virtual bool getSDPExtnForColorimetrySupported(); virtual bool isPowerSuspended(); @@ -447,6 +472,7 @@ namespace DisplayPort unsigned getDscPeakThroughputModel(); unsigned getDscMaxSliceWidth(); unsigned getDscDecoderColorDepthSupportMask(); + void setDscDecompressionDevice(bool bDscCapBasedOnParent); }; class DeviceHDCPDetection : public Object, MessageManager::Message::MessageEventSink, Timer::TimerCallback { diff --git a/src/common/displayport/src/dp_connectorimpl.cpp b/src/common/displayport/src/dp_connectorimpl.cpp index 01a6ec989..b9f2fd8c0 100644 --- a/src/common/displayport/src/dp_connectorimpl.cpp +++ b/src/common/displayport/src/dp_connectorimpl.cpp @@ -624,132 +624,36 @@ create: if (existingDev && existingDev->complianceDeviceEdidReadTest) existingDev->lazyExitNow = true; + if(newDev->isBranchDevice() && newDev->isAtLeastVersion(1,4)) + { + // + // GUID_2 will be non-zero for a virtual peer device and 0 for others. + // This will help identify if a device is virtual peer device or not. + // + newDev->queryGUID2(); + } + // Read panel DSC support only if GPU supports DSC bool bGpuDscSupported; main->getDscCaps(&bGpuDscSupported); - if (bGpuDscSupported && newDev->getDSCSupport()) + if (bGpuDscSupported) { - // Read and parse DSC caps only if panel supports DSC - newDev->readAndParseDSCCaps(); - - // Read and Parse Branch Specific DSC Caps - if (!newDev->isVideoSink() && !newDev->isAudioSink()) + if (newDev->getDSCSupport()) { - newDev->readAndParseBranchSpecificDSCCaps(); - } - } + // Read and parse DSC caps only if panel supports DSC + newDev->readAndParseDSCCaps(); - // Decide if DSC stream can be sent to new device - newDev->bDSCPossible = false; - newDev->devDoingDscDecompression = NULL; - if (bGpuDscSupported && !processedEdid.WARFlags.bIgnoreDscCap) - { - if (newDev->multistream) - { - if ((newDev->peerDevice == Dongle) && - (newDev->dpcdRevisionMajor != 0) && - !bDscCapBasedOnParent) + // Read and Parse Branch Specific DSC Caps + if (!newDev->isVideoSink() && !newDev->isAudioSink()) { - // For Peer Type 4 device with LAM DPCD rev != 0.0, check only the device's own DSC capability. - if (newDev->isDSCSupported()) - { - newDev->bDSCPossible = true; - newDev->devDoingDscDecompression = newDev; - } - } - else - { - if (this->bDscMstEnablePassThrough) - { - // - // Check the device's own and its parent's DSC capability. - // - Sink device will do DSC cecompression when - // 1. Sink device is capable of DSC decompression and parent - // supports DSC pass through. - // - // - Sink device's parent will do DSC decompression - // 1. If sink device supports DSC decompression but it's parent does not support - // DSC Pass through, but supports DSC decompression. - // 2. If the device does not support DSC decompression, but parent supports it. - // - if (newDev->isDSCSupported()) - { - if (newDev->videoSink && newDev->parent) - { - if (newDev->parent->isDSCPassThroughSupported()) - { - // - // This condition takes care of DSC capable sink devices - // connected behind a DSC Pass through capable branch - // - newDev->devDoingDscDecompression = newDev; - newDev->bDSCPossible = true; - } - else if (newDev->parent->isDSCSupported()) - { - // - // This condition takes care of DSC capable sink devices - // connected behind a branch device that is not capable - // of DSC pass through but can do DSC decompression. - // - newDev->bDSCPossible = true; - newDev->devDoingDscDecompression = newDev->parent; - } - } - else - { - // This condition takes care of branch device capable of DSC. - newDev->devDoingDscDecompression = newDev; - newDev->bDSCPossible = true; - } - } - else if (newDev->parent && newDev->parent->isDSCSupported()) - { - // - // This condition takes care of sink devices not capable of DSC - // but parent is capable of DSC decompression. - // - newDev->bDSCPossible = true; - newDev->devDoingDscDecompression = newDev->parent; - } - } - else - { - // - // Revert to old code if DSC Pass through support is not requested. - // This code will be deleted once DSC Pass through support will be enabled - // by default which will be done when 2Head1OR MST (GR-133) will be in production. - // - // Check the device's own and its parent's DSC capability. Parent of the device can do - // DSC decompression and send uncompressed stream to downstream device - // - if (newDev->isDSCSupported() || (newDev->parent && newDev->parent->isDSCSupported())) - { - newDev->bDSCPossible = true; - } - - // For multistream device, determine who will do the DSC decompression - if (newDev->bDSCPossible) - { - if(!newDev->isDSCSupported()) - { - newDev->devDoingDscDecompression = newDev->parent; - } - else - { - newDev->devDoingDscDecompression = newDev; - } - } - } + newDev->readAndParseBranchSpecificDSCCaps(); } } - else + + if (!processedEdid.WARFlags.bIgnoreDscCap) { - if (newDev->isDSCSupported()) - { - newDev->bDSCPossible = true; - newDev->devDoingDscDecompression = newDev; - } + // Check if DSC is possible for the device and if so, set DSC Decompression device. + newDev->setDscDecompressionDevice(this->bDscCapBasedOnParent); } } @@ -1953,8 +1857,9 @@ void ConnectorImpl::fireEvents() void ConnectorImpl::fireEventsInternal() { ListElement * next; - Address::StringBuffer sb; + Address::StringBuffer sb, sb1; DP_USED(sb); + DP_USED(sb1); for (ListElement * e = deviceList.begin(); e != deviceList.end(); e = next) { next = e->next; @@ -2096,7 +2001,7 @@ void ConnectorImpl::fireEventsInternal() DP_LOG(("DPCONN> New device %s | Native DSC Capability - %s | DSC Decompression Device - %s", dev->address.toString(sb), (dev->isDSCSupported() ? "Capable" : "Not Capable"), - (dev->devDoingDscDecompression) ? dev->devDoingDscDecompression->address.toString(sb):"NA")); + (dev->devDoingDscDecompression) ? dev->devDoingDscDecompression->address.toString(sb1):"NA")); } else { diff --git a/src/common/displayport/src/dp_deviceimpl.cpp b/src/common/displayport/src/dp_deviceimpl.cpp index 7285a92bf..0427ef138 100644 --- a/src/common/displayport/src/dp_deviceimpl.cpp +++ b/src/common/displayport/src/dp_deviceimpl.cpp @@ -81,6 +81,7 @@ DeviceImpl::DeviceImpl(DPCDHAL * hal, ConnectorImpl * connector, DeviceImpl * pa activeGroup(0), connector(connector), address(), + bVirtualPeerDevice(false), plugged(false), friendlyAux(this), isHDCPCap(False), @@ -1445,6 +1446,8 @@ NvBool DeviceImpl::getDSCSupport() NvU8 byte = 0; unsigned size = 0; unsigned nakReason = NakUndefined; + Address::StringBuffer sb; + DP_USED(sb); dscCaps.bDSCSupported = false; @@ -1462,6 +1465,11 @@ NvBool DeviceImpl::getDSCSupport() } } + else + { + DP_LOG(("DP-DEV> DSC Support AUX READ failed for %s!", address.toString(sb))); + } + return dscCaps.bDSCSupported; } @@ -1737,16 +1745,40 @@ bool DeviceImpl::readAndParseDSCCaps() unsigned sizeCompleted = 0; unsigned nakReason = NakUndefined; + Address::StringBuffer sb; + DP_USED(sb); if(AuxBus::success != this->getDpcdData(NV_DPCD14_DSC_SUPPORT, &rawDscCaps[0], sizeof(rawDscCaps), &sizeCompleted, &nakReason)) { + DP_LOG(("DP-DEV> Error querying DSC Caps on %s!", this->address.toString(sb))); return false; } return parseDscCaps(&rawDscCaps[0], sizeof(rawDscCaps)); } +void DeviceImpl::queryGUID2() +{ + unsigned sizeCompleted = 0; + unsigned nakReason = NakUndefined; + Address::StringBuffer sb; + DP_USED(sb); + + if(AuxBus::success == this->getDpcdData(NV_DPCD20_GUID_2, + &this->guid2.data[0], DPCD_GUID_SIZE, &sizeCompleted, &nakReason)) + { + if (!(this->guid2.isGuidZero())) + { + this->bVirtualPeerDevice = true; + } + } + else + { + DP_LOG(("DP-DEV> Error querying GUID2 on %s!", this->address.toString(sb))); + } +} + bool DeviceImpl::readAndParseBranchSpecificDSCCaps() { unsigned sizeCompleted = 0; @@ -1785,7 +1817,7 @@ bool DeviceImpl::getDscEnable(bool *pEnable) if (status != AuxBus::success) { - DP_LOG(("DP> Error querying DSC Enable State!")); + DP_LOG(("DP-DEV> Error querying DSC Enable State!")); return false; } @@ -1793,13 +1825,110 @@ bool DeviceImpl::getDscEnable(bool *pEnable) return true; } +void DeviceImpl::setDscDecompressionDevice(bool bDscCapBasedOnParent) +{ + // Decide if DSC stream can be sent to new device + this->bDSCPossible = false; + this->devDoingDscDecompression = NULL; + + if (this->multistream) + { + if ((this->peerDevice == Dongle) && + (this->dpcdRevisionMajor != 0) && + !bDscCapBasedOnParent) + { + // For Peer Type 4 device with LAM DPCD rev != 0.0, check only the device's own DSC capability. + if (this->isDSCSupported()) + { + this->bDSCPossible = true; + this->devDoingDscDecompression = this; + } + } + else + { + // + // Check the device's own and its parent's DSC capability. + // - Sink device will do DSC cecompression when + // 1. Sink device is capable of DSC decompression + // 2. Sink is on a logical port (8-15) + // + // OR + // + // 1. Sink device is capable of DSC decompression + // 2. Parent of sink is a Virtual Peer device + // 3. Parent of sink supports DSC Pass through + // + // - Sink device's parent will do DSC decompression + // 1. Above conditions are not true. + // 2. Parent of sink supports DSC decompression. + // + if (this->isDSCSupported()) + { + if (this->isVideoSink() && this->getParent() != NULL) + { + if (this->isLogical()) + { + this->devDoingDscDecompression = this; + this->bDSCPossible = true; + } + else if (this->parent->isVirtualPeerDevice() && + this->parent->isDSCPassThroughSupported()) + { + // + // This condition takes care of DSC capable sink devices + // connected behind a DSC Pass through capable branch + // + this->devDoingDscDecompression = this; + this->bDSCPossible = true; + } + else if (this->parent->isDSCSupported()) + { + // + // This condition takes care of DSC capable sink devices + // connected behind a branch device that is not capable + // of DSC pass through but can do DSC decompression. + // + this->bDSCPossible = true; + this->devDoingDscDecompression = this->parent; + } + } + else + { + // This condition takes care of branch device capable of DSC. + this->devDoingDscDecompression = this; + this->bDSCPossible = true; + } + } + else if (this->parent && this->parent->isDSCSupported()) + { + // + // This condition takes care of sink devices not capable of DSC + // but parent is capable of DSC decompression. + // + this->bDSCPossible = true; + this->devDoingDscDecompression = this->parent; + } + } + } + else + { + if (this->isDSCSupported()) + { + this->bDSCPossible = true; + this->devDoingDscDecompression = this; + } + } +} + bool DeviceImpl::setDscEnable(bool enable) { - NvU8 byte = 0; + NvU8 dscEnableByte = 0; + NvU8 dscPassthroughByte = 0; unsigned size = 0; unsigned nakReason = NakUndefined; bool bCurrDscEnable = false; bool bDscPassThrough = false; + bool bDscPassThroughUpdated = true; Address::StringBuffer buffer; DP_USED(buffer); @@ -1809,12 +1938,13 @@ bool DeviceImpl::setDscEnable(bool enable) return false; } - if ((this->devDoingDscDecompression == this) && this->parent != NULL && this->connector->bDscMstEnablePassThrough) + if ((this->devDoingDscDecompression == this) && !this->isLogical() && this->parent != NULL && this->connector->bDscMstEnablePassThrough) { // // If the device has a parent, that means the sink is on a MST link and // and on a MST link if DSC is possible on the path and devDoingDscDecompression - // is the sink itself, then the parent should be DSC Pass through capable.. + // is the sink itself and sink is not on a logical port, then the parent should be + // DSC Pass through capable. // bDscPassThrough = true; } @@ -1829,7 +1959,7 @@ bool DeviceImpl::setDscEnable(bool enable) // if (!getDscEnable(&bCurrDscEnable)) { - DP_LOG(("DP> Not able to get DSC Enable State!")); + DP_LOG(("DP-DEV> Not able to get DSC Enable State!")); return false; } } @@ -1838,66 +1968,59 @@ bool DeviceImpl::setDscEnable(bool enable) { if(bDscPassThrough) { - byte = FLD_SET_DRF(_DPCD20, _DSC_PASS_THROUGH, _ENABLE, _YES, byte); + dscPassthroughByte = FLD_SET_DRF(_DPCD20, _DSC_PASS_THROUGH, _ENABLE, _YES, dscPassthroughByte); DP_LOG(("DP-DEV> Enabling DSC Pass through on branch device - %s", this->parent->getTopologyAddress().toString(buffer))); } + + if (!bCurrDscEnable) + { + dscEnableByte = FLD_SET_DRF(_DPCD14, _DSC_ENABLE, _SINK, _YES, dscEnableByte); + DP_LOG(("DP-DEV> Enabling DSC decompression on device - %s", + this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); + } else { - if (!bCurrDscEnable) - { - byte = FLD_SET_DRF(_DPCD14, _DSC_ENABLE, _SINK, _YES, byte); - DP_LOG(("DP-DEV> Enabling DSC decompression on device - %s", - this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); - } - else - { - DP_LOG(("DP-DEV> DSC decompression is already enabled on device - %s", - this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); - return true; - } + DP_LOG(("DP-DEV> DSC decompression is already enabled on device - %s", + this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); + return true; } } else { if(bDscPassThrough) { - byte = FLD_SET_DRF(_DPCD20, _DSC_PASS_THROUGH, _ENABLE, _NO, byte); + dscPassthroughByte = FLD_SET_DRF(_DPCD20, _DSC_PASS_THROUGH, _ENABLE, _NO, dscPassthroughByte); DP_LOG(("DP-DEV> Disabling DSC Pass through on branch device - %s", this->parent->getTopologyAddress().toString(buffer))); } + + if (bCurrDscEnable) + { + dscEnableByte = FLD_SET_DRF(_DPCD14, _DSC_ENABLE, _SINK, _NO, dscEnableByte); + DP_LOG(("DP-DEV> Disabling DSC decompression on device - %s", + this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); + } else { - if (bCurrDscEnable) - { - byte = FLD_SET_DRF(_DPCD14, _DSC_ENABLE, _SINK, _NO, byte); - DP_LOG(("DP-DEV> Disabling DSC decompression on device - %s", - this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); - } - else - { - DP_LOG(("DP-DEV> DSC decompression is already disabled on device - %s", - this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); - return true; - } + DP_LOG(("DP-DEV> DSC decompression is already disabled on device - %s", + this->devDoingDscDecompression->getTopologyAddress().toString(buffer))); + return true; } } if (bDscPassThrough) { - // - // When sink is DSC decompression capable and parent is DSC pass through capable - // source needs to only enable DSC pass through on the parent branch and parent - // branch will take care of enabling DSC decompression on the sink. - // - return (!this->parent->setDpcdData(NV_DPCD20_DSC_PASS_THROUGH, - &byte, sizeof byte, &size, &nakReason)); - } - else - { - return (!this->devDoingDscDecompression->setDpcdData(NV_DPCD14_DSC_ENABLE, - &byte, sizeof byte, &size, &nakReason)); + if(this->parent->setDpcdData(NV_DPCD20_DSC_PASS_THROUGH, + &dscPassthroughByte, sizeof dscPassthroughByte, &size, &nakReason)) + { + DP_LOG(("DP-DEV> Setting DSC Passthrough state on parent branch failed")); + bDscPassThroughUpdated = false; + } } + + return (!this->devDoingDscDecompression->setDpcdData(NV_DPCD14_DSC_ENABLE, + &dscEnableByte, sizeof dscEnableByte, &size, &nakReason)) && bDscPassThroughUpdated; } unsigned DeviceImpl::getDscVersionMajor() diff --git a/src/common/displayport/src/dp_discovery.cpp b/src/common/displayport/src/dp_discovery.cpp index fc81f4208..59c720789 100644 --- a/src/common/displayport/src/dp_discovery.cpp +++ b/src/common/displayport/src/dp_discovery.cpp @@ -651,9 +651,19 @@ void DiscoveryManager::BranchDetection::handleLinkAddressDownReply() if (child[i].isInputPort) { parentDevice.peerDevice = child[i].peerDeviceType; - parentDevice.dpcdRevisionMajor = child[i].dpcdRevisionMajor; - parentDevice.dpcdRevisionMinor = child[i].dpcdRevisionMinor; 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(); + } } } diff --git a/src/common/displayport/src/dp_messagecodings.cpp b/src/common/displayport/src/dp_messagecodings.cpp index 0dc1b81d5..ac5ad7a17 100644 --- a/src/common/displayport/src/dp_messagecodings.cpp +++ b/src/common/displayport/src/dp_messagecodings.cpp @@ -82,8 +82,6 @@ ParseResponseStatus LinkAddressMessage::parseResponseAck(EncodedMessage * messag else { reader->readOrDefault(6 /*zeroes*/, 0x0); - reply.res[i].dpcdRevisionMajor = 1; - reply.res[i].dpcdRevisionMinor = 2; } } diff --git a/src/common/inc/displayport/dpcd20.h b/src/common/inc/displayport/dpcd20.h index aac81fd37..1d3e31e51 100644 --- a/src/common/inc/displayport/dpcd20.h +++ b/src/common/inc/displayport/dpcd20.h @@ -31,6 +31,8 @@ #define NV_DPCD20_DSC_PASS_THROUGH_ENABLE_NO (0x00000000) /* R-XUV */ #define NV_DPCD20_DSC_PASS_THROUGH_ENABLE_YES (0x00000001) /* R-XUV */ +#define NV_DPCD20_GUID_2 (0x00000040) /* R-XUR */ + // PANEL REPLAY RELATED DPCD #define NV_DPCD20_PANEL_REPLAY_CAPABILITY (0x000000B0) #define NV_DPCD20_PANEL_REPLAY_CAPABILITY_SUPPORTED 0:0 diff --git a/src/common/nvlink/kernel/nvlink/interface/nvlink_ioctl_entry.c b/src/common/nvlink/kernel/nvlink/interface/nvlink_ioctl_entry.c index 19f76b634..0afb10f8e 100644 --- a/src/common/nvlink/kernel/nvlink/interface/nvlink_ioctl_entry.c +++ b/src/common/nvlink/kernel/nvlink/interface/nvlink_ioctl_entry.c @@ -3424,7 +3424,7 @@ nvlink_lib_ctrl_get_device_link_states NvU32 i = 0; nvlink_link **links = (nvlink_link **)nvlink_malloc( - sizeof(nvlink_link *) * NVLINK_MAX_NVLINK_ENDPOINTS); + sizeof(nvlink_link *) * NVLINK_MAX_SYSTEM_LINK_NUM); if (links == NULL) { return NVL_NO_MEM; diff --git a/src/nvidia/arch/nvalloc/common/inc/nvcst.h b/src/nvidia/arch/nvalloc/common/inc/nvcst.h index 5514bd045..66a1c2643 100644 --- a/src/nvidia/arch/nvalloc/common/inc/nvcst.h +++ b/src/nvidia/arch/nvalloc/common/inc/nvcst.h @@ -63,6 +63,7 @@ CHIPSET_SETUP_FUNC(Intel_A301_setupFunc) CHIPSET_SETUP_FUNC(Intel_0685_setupFunc) CHIPSET_SETUP_FUNC(Intel_4381_setupFunc) CHIPSET_SETUP_FUNC(Intel_7A82_setupFunc) +CHIPSET_SETUP_FUNC(Intel_7A04_setupFunc) CHIPSET_SETUP_FUNC(SiS_656_setupFunc) CHIPSET_SETUP_FUNC(ATI_RS400_setupFunc) CHIPSET_SETUP_FUNC(ATI_RS480_setupFunc) @@ -182,6 +183,8 @@ CSINFO chipsetInfo[] = {PCI_VENDOR_ID_INTEL, 0x7A82, CS_INTEL_7A82, "Intel-AlderLake", Intel_7A82_setupFunc}, {PCI_VENDOR_ID_INTEL, 0x7A84, CS_INTEL_7A82, "Intel-AlderLake", Intel_7A82_setupFunc}, {PCI_VENDOR_ID_INTEL, 0x1B81, CS_INTEL_1B81, "Intel-SapphireRapids", NULL}, + {PCI_VENDOR_ID_INTEL, 0x18DC, CS_INTEL_18DC, "Intel-IceLake", NULL}, + {PCI_VENDOR_ID_INTEL, 0x7A04, CS_INTEL_7A04, "Intel-RaptorLake", Intel_7A04_setupFunc}, {PCI_VENDOR_ID_NVIDIA, 0x0FAE, CS_NVIDIA_T210, "T210", Nvidia_T210_setupFunc}, {PCI_VENDOR_ID_NVIDIA, 0x0FAF, CS_NVIDIA_T210, "T210", Nvidia_T210_setupFunc}, diff --git a/src/nvidia/arch/nvalloc/common/inc/nvdevid.h b/src/nvidia/arch/nvalloc/common/inc/nvdevid.h index 0e2561513..b4b65ed0a 100644 --- a/src/nvidia/arch/nvalloc/common/inc/nvdevid.h +++ b/src/nvidia/arch/nvalloc/common/inc/nvdevid.h @@ -642,6 +642,8 @@ enum { , CS_PHYTIUM_S2500 , CS_MELLANOX_BLUEFIELD2 , CS_INTEL_1B81 +, CS_INTEL_18DC +, CS_INTEL_7A04 , CS_MAX_PCIE }; diff --git a/src/nvidia/arch/nvalloc/unix/include/nv.h b/src/nvidia/arch/nvalloc/unix/include/nv.h index ac075eeab..1349d634d 100644 --- a/src/nvidia/arch/nvalloc/unix/include/nv.h +++ b/src/nvidia/arch/nvalloc/unix/include/nv.h @@ -943,6 +943,7 @@ NvBool NV_API_CALL rm_disable_iomap_wc(void); void NV_API_CALL rm_init_dynamic_power_management(nvidia_stack_t *, nv_state_t *, NvBool); void NV_API_CALL rm_cleanup_dynamic_power_management(nvidia_stack_t *, nv_state_t *); +void NV_API_CALL rm_enable_dynamic_power_management(nvidia_stack_t *, nv_state_t *); NV_STATUS NV_API_CALL rm_ref_dynamic_power(nvidia_stack_t *, nv_state_t *, nv_dynamic_power_mode_t); void NV_API_CALL rm_unref_dynamic_power(nvidia_stack_t *, nv_state_t *, nv_dynamic_power_mode_t); NV_STATUS NV_API_CALL rm_transition_dynamic_power(nvidia_stack_t *, nv_state_t *, NvBool); diff --git a/src/nvidia/arch/nvalloc/unix/src/exports-stubs.c b/src/nvidia/arch/nvalloc/unix/src/exports-stubs.c index ca3874f02..ef7008a4a 100644 --- a/src/nvidia/arch/nvalloc/unix/src/exports-stubs.c +++ b/src/nvidia/arch/nvalloc/unix/src/exports-stubs.c @@ -50,6 +50,13 @@ void NV_API_CALL rm_cleanup_dynamic_power_management( { } +void NV_API_CALL rm_enable_dynamic_power_management( + nvidia_stack_t *sp, + nv_state_t *nv +) +{ +} + NV_STATUS NV_API_CALL rm_ref_dynamic_power( nvidia_stack_t *sp, nv_state_t *nv, diff --git a/src/nvidia/exports_link_command.txt b/src/nvidia/exports_link_command.txt index ac7087523..1f6011da0 100644 --- a/src/nvidia/exports_link_command.txt +++ b/src/nvidia/exports_link_command.txt @@ -178,6 +178,7 @@ --undefined=rm_schedule_gpu_wakeup --undefined=rm_init_dynamic_power_management --undefined=rm_cleanup_dynamic_power_management +--undefined=rm_enable_dynamic_power_management --undefined=rm_ref_dynamic_power --undefined=rm_unref_dynamic_power --undefined=rm_transition_dynamic_power diff --git a/src/nvidia/generated/g_nv_name_released.h b/src/nvidia/generated/g_nv_name_released.h index 7e5628206..9251e5d5c 100644 --- a/src/nvidia/generated/g_nv_name_released.h +++ b/src/nvidia/generated/g_nv_name_released.h @@ -868,6 +868,8 @@ static const CHIPS_RELEASED sChipsReleased[] = { { 0x2233, 0x165a, 0x10de, "NVIDIA RTX A5500" }, { 0x2233, 0x165a, 0x17aa, "NVIDIA RTX A5500" }, { 0x2235, 0x145a, 0x10de, "NVIDIA A40" }, + { 0x2236, 0x1482, 0x10de, "NVIDIA A10" }, + { 0x2237, 0x152f, 0x10de, "NVIDIA A10G" }, { 0x2238, 0x1677, 0x10de, "NVIDIA A10M" }, { 0x2414, 0x0000, 0x0000, "NVIDIA GeForce RTX 3060 Ti" }, { 0x2420, 0x0000, 0x0000, "NVIDIA GeForce RTX 3080 Ti Laptop GPU" }, diff --git a/src/nvidia/generated/g_rs_resource_nvoc.h b/src/nvidia/generated/g_rs_resource_nvoc.h index be788fadb..a0a00003a 100644 --- a/src/nvidia/generated/g_rs_resource_nvoc.h +++ b/src/nvidia/generated/g_rs_resource_nvoc.h @@ -491,6 +491,7 @@ struct RS_CPU_UNMAP_PARAMS NvP64 pLinearAddress; ///< [in] Address of mapped memory NvU32 flags; ///< [in] Resource-specific flags NvU32 processId; + NvBool bTeardown; ///< [in] Unmap operation is due to client teardown /// [in] hContext Handle of resource that provides a context for the mapping (e.g., subdevice for channel map) NvHandle hContext; diff --git a/src/nvidia/inc/libraries/resserv/rs_resource.h b/src/nvidia/inc/libraries/resserv/rs_resource.h index 8df3313f9..e44500356 100644 --- a/src/nvidia/inc/libraries/resserv/rs_resource.h +++ b/src/nvidia/inc/libraries/resserv/rs_resource.h @@ -465,6 +465,7 @@ struct RS_CPU_UNMAP_PARAMS NvP64 pLinearAddress; ///< [in] Address of mapped memory NvU32 flags; ///< [in] Resource-specific flags NvU32 processId; + NvBool bTeardown; ///< [in] Unmap operation is due to client teardown /// [in] hContext Handle of resource that provides a context for the mapping (e.g., subdevice for channel map) NvHandle hContext; diff --git a/src/nvidia/src/kernel/gpu/disp/disp_sf_user.c b/src/nvidia/src/kernel/gpu/disp/disp_sf_user.c index 7c1bb0002..32e6cbea9 100644 --- a/src/nvidia/src/kernel/gpu/disp/disp_sf_user.c +++ b/src/nvidia/src/kernel/gpu/disp/disp_sf_user.c @@ -56,6 +56,8 @@ dispsfConstruct_IMPL return NV_ERR_INSUFFICIENT_PERMISSIONS; } + NV_CHECK_OR_RETURN(LEVEL_ERROR, pKernelDisplay != NULL, NV_ERR_NOT_SUPPORTED); + // Set sf user RegBase offset kdispGetDisplaySfUserBaseAndSize_HAL(pGpu, pKernelDisplay, &pDispSfUser->ControlOffset, diff --git a/src/nvidia/src/kernel/mem_mgr/gpu_vaspace.c b/src/nvidia/src/kernel/mem_mgr/gpu_vaspace.c index 326da22ed..e686c2219 100644 --- a/src/nvidia/src/kernel/mem_mgr/gpu_vaspace.c +++ b/src/nvidia/src/kernel/mem_mgr/gpu_vaspace.c @@ -3713,6 +3713,7 @@ gvaspaceWalkUserCtxRelease_IMPL { // If current context doesn't match, must have nested acquires (not allowed). NV_ASSERT_OR_RETURN_VOID(pUserCtx->pGpuState); + NV_ASSERT_OR_RETURN_VOID(pUserCtx->pGpuState->pWalk); NV_ASSERT(pUserCtx == mmuWalkGetUserCtx(pUserCtx->pGpuState->pWalk)); mmuWalkSetUserCtx(pUserCtx->pGpuState->pWalk, NULL); } diff --git a/src/nvidia/src/kernel/platform/chipset/chipset_info.c b/src/nvidia/src/kernel/platform/chipset/chipset_info.c index e03d541ce..f75f49491 100644 --- a/src/nvidia/src/kernel/platform/chipset/chipset_info.c +++ b/src/nvidia/src/kernel/platform/chipset/chipset_info.c @@ -880,6 +880,18 @@ Intel_7A82_setupFunc return NV_OK; } +// Intel Z790 platform (Raptor Lake) +static NV_STATUS +Intel_7A04_setupFunc +( + OBJCL *pCl +) +{ + pCl->setProperty(pCl, PDB_PROP_CL_HAS_RESIZABLE_BAR_ISSUE, NV_TRUE); + + return NV_OK; +} + static NV_STATUS Nvidia_T210_setupFunc ( diff --git a/src/nvidia/src/kernel/rmapi/mapping_cpu.c b/src/nvidia/src/kernel/rmapi/mapping_cpu.c index 35fefa3fe..150414847 100644 --- a/src/nvidia/src/kernel/rmapi/mapping_cpu.c +++ b/src/nvidia/src/kernel/rmapi/mapping_cpu.c @@ -974,11 +974,24 @@ serverUnmap_Prologue { rmStatus = osAttachToProcess(&pProcessHandle, ProcessId); if (rmStatus != NV_OK) - return rmStatus; + { + if (pUnmapParams->bTeardown) + pProcessHandle = NULL; + else + return rmStatus; + } pUnmapParams->pProcessHandle = pProcessHandle; } + // Don't do any filtering if this is a tear-down path + if (pUnmapParams->bTeardown) + { + pUnmapParams->fnFilter = NULL; + return NV_OK; + } + + pUnmapParams->fnFilter = bKernel ? serverutilMappingFilterKernel : serverutilMappingFilterCurrentUserProc; diff --git a/src/nvidia/src/libraries/mmu/mmu_walk.c b/src/nvidia/src/libraries/mmu/mmu_walk.c index 04fb9f71e..0b26e353f 100644 --- a/src/nvidia/src/libraries/mmu/mmu_walk.c +++ b/src/nvidia/src/libraries/mmu/mmu_walk.c @@ -205,7 +205,10 @@ mmuWalkLevelInstancesForceFree MMU_WALK *pWalk ) { - _mmuWalkLevelInstancesForceFree(pWalk, &pWalk->root); + if (pWalk != NULL) + { + _mmuWalkLevelInstancesForceFree(pWalk, &pWalk->root); + } } /*----------------------------Private Functions--------------------------------*/ diff --git a/src/nvidia/src/libraries/mmu/mmu_walk_reserve.c b/src/nvidia/src/libraries/mmu/mmu_walk_reserve.c index 59bcfe63d..8a2ae4e49 100644 --- a/src/nvidia/src/libraries/mmu/mmu_walk_reserve.c +++ b/src/nvidia/src/libraries/mmu/mmu_walk_reserve.c @@ -110,6 +110,8 @@ mmuWalkReleaseEntries MMU_WALK_OP_PARAMS opParams = {0}; NV_STATUS status = NV_OK; + NV_ASSERT_OR_RETURN(NULL != pWalk, NV_ERR_INVALID_ARGUMENT); + NV_ASSERT_OR_RETURN(NULL != mmuWalkFindLevel(pWalk, pLevelFmt), NV_ERR_INVALID_ARGUMENT); NV_ASSERT_OR_RETURN(NV_IS_ALIGNED(vaLo, mmuFmtLevelPageSize(pLevelFmt)), diff --git a/src/nvidia/src/libraries/resserv/src/rs_client.c b/src/nvidia/src/libraries/resserv/src/rs_client.c index 2ad40a4d6..c4950049b 100644 --- a/src/nvidia/src/libraries/resserv/src/rs_client.c +++ b/src/nvidia/src/libraries/resserv/src/rs_client.c @@ -1084,7 +1084,8 @@ _clientUnmapResourceRefMappings : pCpuMapping->pContextRef->hResource; params.hMemory = pResourceRef->hResource; params.pLinearAddress = pCpuMapping->pLinearAddress; - params.processId = pCpuMapping->processId; + params.processId = pCpuMapping->processId; + params.bTeardown = NV_TRUE; params.flags = pCpuMapping->flags; params.pSecInfo = &pCallContext->secInfo; params.pLockInfo = &lockInfo; @@ -1147,6 +1148,7 @@ _clientUnmapBackRefMappings params.hMemory = pBackRef->hResource; params.pLinearAddress = pCpuMapping->pLinearAddress; params.processId = pCpuMapping->processId; + params.bTeardown = NV_TRUE; params.flags = pCpuMapping->flags; params.pSecInfo = &pCallContext->secInfo; params.pLockInfo = &lockInfo;