RHEL-69074: broken style fix for viogpu driver

Signed-off-by: Vitalii Chulak <[email protected]>
This commit is contained in:
Vitalii Chulak authored and Yan Vugenfirer committed 2025-01-13 09:12:14 +01:00
1 parent dd10de59ef
commit 092f97eb19
3 files changed
+19 -16

No files matched your search

+3 -1
View File
@@ -1,10 +1,12 @@
#include "baseobj.h"
#include "viogpu.h"
// clang-format off
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
__drv_reportError("Must succeed pool allocations are forbidden. "
"Allocation failures cause a system crash"))
void* __cdecl operator new(size_t Size, POOL_TYPE PoolType)
// clang-format on
{
Size = (Size != 0) ? Size : 1;
@@ -22,7 +24,7 @@ _When_((PoolType & NonPagedPoolMustSucceed) != 0,
}
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
__drv_reportError("Must succeed pool allocations are forbidden. "
__drv_reportError("Must succeed pool allocations are forbidden. "
"Allocation failures cause a system crash")) void *__cdecl
operator new[](size_t Size, POOL_TYPE PoolType)
{
+14 -13
View File
@@ -1,5 +1,6 @@
#include "edid.h"
// clang-format off
static VIC_MODE gpu_vic_mode_table[] =
{
{1, {640, 480}},
@@ -184,7 +185,7 @@ UCHAR g_gpu_edid[EDID_V1_BLOCK_SIZE] = {
0x00, // Number of Extentions
0x00 // CheckSum
};
// clang-format on
bool GetStandardTimingResolution(PSTANDARD_TIMING_DESCRIPTOR desc, PVIOGPU_DISP_MODE mode)
{
if (desc && mode && (desc->HorizontalActivePixels > 0))
@@ -192,18 +193,18 @@ bool GetStandardTimingResolution(PSTANDARD_TIMING_DESCRIPTOR desc, PVIOGPU_DISP_
mode->XResolution = (desc->HorizontalActivePixels + 31) * 8;
switch (desc->RefreshRate)
{
case AR_16_10:
mode->YResolution = ((mode->XResolution) / 16 * 10);
break;
case AR_4_3:
mode->YResolution = ((mode->XResolution) / 4 * 3);
break;
case AR_5_4:
mode->YResolution = ((mode->XResolution) / 5 * 4);
break;
case AR_16_9:
mode->YResolution = ((mode->XResolution) / 16 * 9);
break;
case AR_16_10:
mode->YResolution = ((mode->XResolution) / 16 * 10);
break;
case AR_4_3:
mode->YResolution = ((mode->XResolution) / 4 * 3);
break;
case AR_5_4:
mode->YResolution = ((mode->XResolution) / 5 * 4);
break;
case AR_16_9:
mode->YResolution = ((mode->XResolution) / 16 * 9);
break;
}
return true;
}
+2 -2
View File
@@ -266,7 +266,7 @@ void vdev_sleep(void *context, unsigned int msecs)
}
}
// clang-format off
VirtIOSystemOps VioGpuSystemOps = {
ReadVirtIODeviceByte,
ReadVirtIODeviceWord,
@@ -287,7 +287,7 @@ VirtIOSystemOps VioGpuSystemOps = {
vdev_get_msix_vector,
vdev_sleep,
};
// clang-format on
PVOID CPciBar::GetVA(PDXGKRNL_INTERFACE pDxgkInterface)
{