mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2025-03-14 09:29:24 +01:00
Add prints in case of frequent GSP->CPU semaphore notifiers
We've found that some userspace programs end up taking a legacy path where they wait on a notification from GSP for every vblank. This change will make nvidia.ko print out an occasional message if this path is hit frequently. This will help us confirm/rule-out a cause of stutter.
This commit is contained in:
parent
e5ae570abb
commit
8c1c49b2de
@ -141,8 +141,15 @@ NV_STATUS dispswReleaseSemaphoreAndNotifierFill
|
||||
NvBool bFound = NV_FALSE;
|
||||
NV_STATUS status;
|
||||
|
||||
#define PRINT_INTERVAL 3600 // At 60Hz, this will emit about once per minute.
|
||||
|
||||
if (flags & F_SEMAPHORE_ADDR_VALID)
|
||||
{
|
||||
static NvU64 counter;
|
||||
if ((++counter % PRINT_INTERVAL) == 0) {
|
||||
NV_PRINTF(LEVEL_ERROR, "XXXMT: NVRM debugging - F_SEMAPHORE_ADDR_VALID = %llu\n", counter);
|
||||
}
|
||||
|
||||
bFound = CliGetDmaMappingInfo(RES_GET_CLIENT(pDevice),
|
||||
RES_GET_HANDLE(pDevice),
|
||||
vaSpace,
|
||||
@ -154,6 +161,11 @@ NV_STATUS dispswReleaseSemaphoreAndNotifierFill
|
||||
}
|
||||
else if (flags & F_SEMAPHORE_RELEASE)
|
||||
{
|
||||
static NvU64 counter;
|
||||
if ((++counter % PRINT_INTERVAL) == 0) {
|
||||
NV_PRINTF(LEVEL_ERROR, "XXXMT: NVRM debugging - F_SEMAPHORE_RELEASE = %llu\n", counter);
|
||||
}
|
||||
|
||||
status = semaphoreFillGPUVA(pGpu,
|
||||
pDevice,
|
||||
vaSpace,
|
||||
@ -165,6 +177,11 @@ NV_STATUS dispswReleaseSemaphoreAndNotifierFill
|
||||
}
|
||||
else if (flags & F_NOTIFIER_FILL)
|
||||
{
|
||||
static NvU64 counter;
|
||||
if ((++counter % PRINT_INTERVAL) == 0) {
|
||||
NV_PRINTF(LEVEL_ERROR, "XXXMT: NVRM debugging - F_NOTIFIER_FILL = %llu\n", counter);
|
||||
}
|
||||
|
||||
status = notifyFillNotifierGPUVA(pGpu,
|
||||
pDevice,
|
||||
vaSpace,
|
||||
@ -175,5 +192,11 @@ NV_STATUS dispswReleaseSemaphoreAndNotifierFill
|
||||
NV9072_NOTIFIERS_NOTIFY_ON_VBLANK /* Index */);
|
||||
return status;
|
||||
}
|
||||
else {
|
||||
static NvU64 counter;
|
||||
if ((++counter % PRINT_INTERVAL) == 0) {
|
||||
NV_PRINTF(LEVEL_ERROR, "XXXMT: NVRM debugging - ??? 0x%08x = %llu\n", flags, counter);
|
||||
}
|
||||
}
|
||||
return NV9072_NOTIFICATION_STATUS_DONE_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user