mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-10 18:19:58 +00:00
535.113.01
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user