From 170299cf920ec9bf3981d9656e55b54fdc2d2bb5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 31 Mar 2023 19:30:47 -0600 Subject: [PATCH] Convert whitespace from spaces to tabs in last commit Change-Id: I5c7338cc0542b48a0dbe0d71a4a2a4a5fd44aadf --- src/drivers/gfx/nvidia/acpi/common/gps.asl | 80 ++++----- src/drivers/gfx/nvidia/acpi/common/nvpcf.asl | 180 +++++++++---------- 2 files changed, 130 insertions(+), 130 deletions(-) diff --git a/src/drivers/gfx/nvidia/acpi/common/gps.asl b/src/drivers/gfx/nvidia/acpi/common/gps.asl index 1076cefea7..7d69b19406 100644 --- a/src/drivers/gfx/nvidia/acpi/common/gps.asl +++ b/src/drivers/gfx/nvidia/acpi/common/gps.asl @@ -7,60 +7,60 @@ #define GPS_FUNC_PSHAREPARAMS 0x0000002A Method(GPS, 2, Serialized) { - Printf(" GPU GPS") - Switch(ToInteger(Arg0)) { - Case(GPS_FUNC_SUPPORT) { + Printf(" GPU GPS") + Switch(ToInteger(Arg0)) { + Case(GPS_FUNC_SUPPORT) { Printf(" Supported Functions") Return(ITOB( (1 << GPS_FUNC_SUPPORT) | (1 << GPS_FUNC_PSHARESTATUS) | (1 << GPS_FUNC_PSHAREPARAMS) )) - } - Case(GPS_FUNC_PSHARESTATUS) { + } + Case(GPS_FUNC_PSHARESTATUS) { Printf(" Power Share Status") - Return(ITOB(0)) - } - Case(GPS_FUNC_PSHAREPARAMS) { + Return(ITOB(0)) + } + Case(GPS_FUNC_PSHAREPARAMS) { Printf(" Power Share Parameters") - CreateField(Arg1, 0, 4, QTYP) // Query type + CreateField(Arg1, 0, 4, QTYP) // Query type - Name(GPSP, Buffer(36) { 0x00 }) - CreateDWordField(GPSP, 0, RSTS) // Response status - CreateDWordField(GPSP, 4, VERS) // Version + Name(GPSP, Buffer(36) { 0x00 }) + CreateDWordField(GPSP, 0, RSTS) // Response status + CreateDWordField(GPSP, 4, VERS) // Version - // Set query type of response - RSTS = QTYP - // Set version of response - VERS = 0x00010000 + // Set query type of response + RSTS = QTYP + // Set version of response + VERS = 0x00010000 - Switch(ToInteger(QTYP)) { - Case(0) { - Printf(" Request Current Information") - // No required information - Return(GPSP) - } - Case(1) { - Printf(" Request Supported Fields") - // Support GPU temperature field - RSTS |= (1 << 8) - Return(GPSP) - } - Case(2) { - Printf(" Request Current Limits") - // No required limits - Return(GPSP) - } - Default { - Printf(" Unknown Query: %o", SFST(QTYP)) - Return(NV_ERROR_UNSUPPORTED) - } - } - } + Switch(ToInteger(QTYP)) { + Case(0) { + Printf(" Request Current Information") + // No required information + Return(GPSP) + } + Case(1) { + Printf(" Request Supported Fields") + // Support GPU temperature field + RSTS |= (1 << 8) + Return(GPSP) + } + Case(2) { + Printf(" Request Current Limits") + // No required limits + Return(GPSP) + } + Default { + Printf(" Unknown Query: %o", SFST(QTYP)) + Return(NV_ERROR_UNSUPPORTED) + } + } + } Default { Printf(" Unsupported function: %o", SFST(Arg0)) Return(NV_ERROR_UNSUPPORTED) } - } + } } diff --git a/src/drivers/gfx/nvidia/acpi/common/nvpcf.asl b/src/drivers/gfx/nvidia/acpi/common/nvpcf.asl index 9510376c61..e789a5315d 100644 --- a/src/drivers/gfx/nvidia/acpi/common/nvpcf.asl +++ b/src/drivers/gfx/nvidia/acpi/common/nvpcf.asl @@ -10,123 +10,123 @@ Name(CDIS, 0) Method(_HID) { - CDIS = 0 - Return("NVDA0820") + CDIS = 0 + Return("NVDA0820") } Name(_UID, "NPCF") Method(_DIS) { - CDIS = 1 + CDIS = 1 } Method(_STA) { - If (CDIS == 1) { - Return(0x0D) - } Else { - Return(0x0F) - } + If (CDIS == 1) { + Return(0x0D) + } Else { + Return(0x0F) + } } Method(_DSM, 4, Serialized) { Printf("NVPCF _DSM") - If (Arg0 == ToUUID(NVPCF_DSM_GUID)) { - If (ToInteger(Arg1) == NVPCF_REVISION_ID) { - Return(NPCF(Arg2, Arg3)) - } Else { + If (Arg0 == ToUUID(NVPCF_DSM_GUID)) { + If (ToInteger(Arg1) == NVPCF_REVISION_ID) { + Return(NPCF(Arg2, Arg3)) + } Else { Printf(" Unsupported NVPCF revision: %o", SFST(Arg1)) Return(NVPCF_ERROR_GENERIC) - } - } Else { + } + } Else { Printf(" Unsupported GUID: %o", IDST(Arg0)) - } + } } Method(NPCF, 2, Serialized) { Printf(" NVPCF NPCF") - Switch(ToInteger(Arg0)) { - Case(NVPCF_FUNC_GET_SUPPORTED) { + Switch(ToInteger(Arg0)) { + Case(NVPCF_FUNC_GET_SUPPORTED) { Printf(" Supported Functions") Return(ITOB( (1 << NVPCF_FUNC_GET_SUPPORTED) | - (1 << NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) | - (1 << NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS) + (1 << NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) | + (1 << NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS) )) - } - Case(NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) { + } + Case(NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) { Printf(" Get Static Config") - Return(Buffer(14) { - // Device table header - 0x20, 0x03, 0x01, - // Intel + NVIDIA - 0x00, - // Controller table header - 0x23, 0x04, 0x05, 0x01, - // Dynamic boost controller - 0x01, - // Supports DC - 0x01, - // Reserved - 0x00, 0x00, 0x00, - // Checksum - 0xAD - }) - } - Case(NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS) { + Return(Buffer(14) { + // Device table header + 0x20, 0x03, 0x01, + // Intel + NVIDIA + 0x00, + // Controller table header + 0x23, 0x04, 0x05, 0x01, + // Dynamic boost controller + 0x01, + // Supports DC + 0x01, + // Reserved + 0x00, 0x00, 0x00, + // Checksum + 0xAD + }) + } + Case(NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS) { Printf(" Update Dynamic Boost") - CreateField(Arg1, 0x28, 2, ICMD) // Input command + CreateField(Arg1, 0x28, 2, ICMD) // Input command - Name(PCFP, Buffer(49) { - // Table version - 0x23, - // Table header size - 0x05, - // Size of common status in bytes - 0x10, - // Size of controller entry in bytes - 0x1C, - // Other fields filled in later - }) - CreateByteField(PCFP, 0x04, CCNT) // Controller count - CreateWordField(PCFP, 0x05, ATGP) // AC TGP offset - CreateWordField(PCFP, 0x07, DTGP) // DC TGP offset (unused) - CreateWordField(PCFP, 0x19, ATPP) // AC TPP offset - CreateWordField(PCFP, 0x1B, DTPP) // DC TPP offset (unused) - CreateWordField(PCFP, 0x1D, AMXP) // AC maximum TGP offset - CreateWordField(PCFP, 0x21, AMNP) // AC minimum TGP offset + Name(PCFP, Buffer(49) { + // Table version + 0x23, + // Table header size + 0x05, + // Size of common status in bytes + 0x10, + // Size of controller entry in bytes + 0x1C, + // Other fields filled in later + }) + CreateByteField(PCFP, 0x04, CCNT) // Controller count + CreateWordField(PCFP, 0x05, ATGP) // AC TGP offset + CreateWordField(PCFP, 0x07, DTGP) // DC TGP offset (unused) + CreateWordField(PCFP, 0x19, ATPP) // AC TPP offset + CreateWordField(PCFP, 0x1B, DTPP) // DC TPP offset (unused) + CreateWordField(PCFP, 0x1D, AMXP) // AC maximum TGP offset + CreateWordField(PCFP, 0x21, AMNP) // AC minimum TGP offset - Switch(ToInteger(ICMD)) { - Case(0) { - Printf(" Get Controller Params") - // Number of controllers - CCNT = 1 - // AC configurable TGP baseline offset in 1/8 watt units - ATGP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_BASELINE << 3) - // AC total processor power offset from baseline in 1/8 watt units - ATPP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP << 3) - // AC maximum TGP offset from baseline in 1/8 watt units - AMXP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX << 3) - // AC minimum TGP offset from baseline in 1/8 watt units - AMNP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MIN << 3) - Printf("PCFP: %o", SFST(PCFP)) - Return(PCFP) - } - Case(1) { - Printf(" Set Controller Status") - //TODO - Printf("PCFP: %o", SFST(PCFP)) - Return(PCFP) - } - Default { - Printf(" Unknown Input Command: %o", SFST(ICMD)) - Return(NV_ERROR_UNSUPPORTED) - } - } - } - Default { + Switch(ToInteger(ICMD)) { + Case(0) { + Printf(" Get Controller Params") + // Number of controllers + CCNT = 1 + // AC configurable TGP baseline offset in 1/8 watt units + ATGP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_BASELINE << 3) + // AC total processor power offset from baseline in 1/8 watt units + ATPP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP << 3) + // AC maximum TGP offset from baseline in 1/8 watt units + AMXP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX << 3) + // AC minimum TGP offset from baseline in 1/8 watt units + AMNP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MIN << 3) + Printf("PCFP: %o", SFST(PCFP)) + Return(PCFP) + } + Case(1) { + Printf(" Set Controller Status") + //TODO + Printf("PCFP: %o", SFST(PCFP)) + Return(PCFP) + } + Default { + Printf(" Unknown Input Command: %o", SFST(ICMD)) + Return(NV_ERROR_UNSUPPORTED) + } + } + } + Default { Printf(" Unsupported function: %o", SFST(Arg0)) - Return(NVPCF_ERROR_UNSUPPORTED) - } - } + Return(NVPCF_ERROR_UNSUPPORTED) + } + } }