535.113.01

This commit is contained in:
Maneet Singh
2023-09-21 10:43:43 -07:00
parent a8e01be6b2
commit f59818b751
94 changed files with 2414 additions and 800 deletions

View File

@@ -1221,6 +1221,29 @@ typedef struct _NVEvoDevRec {
} apiHead[NVKMS_MAX_HEADS_PER_DISP];
} NVDevEvoRec;
static inline NvBool nvEvoIsConsoleActive(const NVDevEvoRec *pDevEvo)
{
/*
* If (pDevEvo->modesetOwner == NULL) that means either the vbios
* console or the NVKMS console might be active.
*/
if (pDevEvo->modesetOwner == NULL) {
return TRUE;
}
/*
* If (pDevEvo->modesetOwner != NULL) but
* pDevEvo->modesetOwnerChanged is TRUE, that means the modeset
* ownership is grabbed by the external client but it hasn't
* performed any modeset and the console is still active.
*/
if ((pDevEvo->modesetOwner != NULL) && pDevEvo->modesetOwnerChanged) {
return TRUE;
}
return FALSE;
}
/*
* The NVHwModeTimingsEvo structure stores all the values necessary to
* perform a modeset with EVO

View File

@@ -274,8 +274,12 @@ NvU32 nvDIFRPrefetchSurfaces(NVDIFRStateEvoPtr pDifr, size_t l2CacheSize)
NvU32 i;
NvU32 status;
/* If DIFR is disabled it's because we know we were or will be flipping. */
if (pDifr->hwDisabled) {
/*
* If DIFR is disabled it's because we know we were or will be flipping, or
* if console is active then the scanout surfaces will get updated by the
* OS console driver without any knowledge of NVKMS.
*/
if (pDifr->hwDisabled || nvEvoIsConsoleActive(pDevEvo)) {
return NV2080_CTRL_LPWR_DIFR_PREFETCH_FAIL_OS_FLIPS_ENABLED;
}

View File

@@ -1069,23 +1069,11 @@ void nvHsConfigInitSwapGroup(
NVHsChannelConfig *pChannelConfig = &pHsConfigOneHead->channelConfig;
/*
* If (pDevEvo->modesetOwner == NULL) that means either the vbios
* console or the NVKMS console might be active, the console
* surface may not be set up to be the source of headSurface
* operations, and NVKMS may be unloaded, so we can't have the
* display rely on headSurface.
* The console surface may not be set up to be the source of
* headSurface operations, and NVKMS may be unloaded, so we can't
* have the display rely on headSurface.
*/
if (pDevEvo->modesetOwner == NULL) {
continue;
}
/*
* If (pDevEvo->modesetOwner != NULL) but
* pDevEvo->modesetOwnerChanged is TRUE, that means the modeset
* ownership is grabbed by the external client but it hasn't
* performed any modeset and the console is still active.
*/
if ((pDevEvo->modesetOwner != NULL) && pDevEvo->modesetOwnerChanged) {
if (nvEvoIsConsoleActive(pDevEvo)) {
continue;
}