[VIDEOPRT]

- Add more debugging in resource code

svn path=/trunk/; revision=56122
This commit is contained in:
Cameron Gutman 2012-03-11 20:24:29 +00:00
parent e756ef1774
commit 72a03e8c29

View file

@ -65,6 +65,8 @@ IntVideoPortGetLegacyResources(
*AccessRangeCount = DriverExtension->InitializationData.HwLegacyResourceCount; *AccessRangeCount = DriverExtension->InitializationData.HwLegacyResourceCount;
} }
INFO_(VIDEOPRT, "Got %d legacy access ranges\n", *AccessRangeCount);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -580,7 +582,7 @@ VideoPortGetAccessRanges(
PIO_RESOURCE_REQUIREMENTS_LIST ResReqList; PIO_RESOURCE_REQUIREMENTS_LIST ResReqList;
BOOLEAN DeviceAndVendorFound = FALSE; BOOLEAN DeviceAndVendorFound = FALSE;
TRACE_(VIDEOPRT, "VideoPortGetAccessRanges\n"); TRACE_(VIDEOPRT, "VideoPortGetAccessRanges(%d, %p, %d, %p)\n", NumRequestedResources, RequestedResources, NumAccessRanges, AccessRanges);
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension); DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
DriverObject = DeviceExtension->DriverObject; DriverObject = DeviceExtension->DriverObject;
@ -729,7 +731,10 @@ VideoPortGetAccessRanges(
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
return ERROR_DEV_NOT_EXIST; return ERROR_DEV_NOT_EXIST;
if (NumAccessRanges < LegacyAccessRangeCount) if (NumAccessRanges < LegacyAccessRangeCount)
{
ERR_(VIDEOPRT, "Too many legacy access ranges found\n");
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
}
RtlCopyMemory(AccessRanges, LegacyAccessRanges, LegacyAccessRangeCount * sizeof(VIDEO_ACCESS_RANGE)); RtlCopyMemory(AccessRanges, LegacyAccessRanges, LegacyAccessRangeCount * sizeof(VIDEO_ACCESS_RANGE));
AssignedCount = LegacyAccessRangeCount; AssignedCount = LegacyAccessRangeCount;
for (FullList = AllocatedResources->List; for (FullList = AllocatedResources->List;
@ -751,7 +756,7 @@ VideoPortGetAccessRanges(
Descriptor->Type == CmResourceTypePort) && Descriptor->Type == CmResourceTypePort) &&
AssignedCount >= NumAccessRanges) AssignedCount >= NumAccessRanges)
{ {
WARN_(VIDEOPRT, "Too many access ranges found\n"); ERR_(VIDEOPRT, "Too many access ranges found\n");
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
} }
if (Descriptor->Type == CmResourceTypeMemory) if (Descriptor->Type == CmResourceTypeMemory)