Skip to content

Commit d97b924

Browse files
committed
r0.6.6
1 parent a686d73 commit d97b924

File tree

7 files changed

+50
-51
lines changed

7 files changed

+50
-51
lines changed

AMD Power Gadget/Base.lproj/Main.storyboard

Lines changed: 31 additions & 38 deletions
Large diffs are not rendered by default.

AMD Power Gadget/Power Tool/PowerToolViewController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,20 @@ class PowerToolViewController: NSViewController, NSWindowDelegate {
128128

129129
override func viewWillAppear() {
130130
view.window?.delegate = self
131+
132+
if timer == nil || !timer!.isValid{
133+
timer = Timer.scheduledTimer(withTimeInterval: updateTime, repeats: true, block: { (_) in
134+
self.sampleCPUGraph()
135+
})
136+
}
131137
}
132138

133139
override func viewWillDisappear() {
134140
timer?.invalidate()
135141
}
136142

143+
144+
137145
func windowWillClose(_ notification: Notification) {
138146
PowerToolViewController.activeSelf = nil
139147
}

AMD Power Gadget/ProcessorModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ProcessorModel {
5555
&outputStr, &outputStrCount)
5656
AMDRyzenCPUPowerManagementVersion = String(cString: Array(outputStr[0...outputStrCount-1]))
5757

58-
let compatVers = ["0.6.3", "0.6.4", "0.6.5"]
58+
let compatVers = ["0.6.3", "0.6.4", "0.6.5", "0.6.6"]
5959

6060
if !compatVers.contains(AMDRyzenCPUPowerManagementVersion){
6161
alertAndQuit(message: "Your AMDRyzenCPUPowerManagement version is outdated. Please use the lastest version and start this application again.")

AMD Power Gadget/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class ViewController: NSViewController, NSWindowDelegate {
136136
}
137137

138138
@IBAction func buttonPressed(_ sender: Any) {
139-
NSWorkspace.shared.open(URL(string: "https://github.com/trulyspinach/AMDRyzenCPUPowerManagement")!)
139+
NSWorkspace.shared.open(URL(string: "https://github.com/trulyspinach/SMCAMDProcessor")!)
140140
}
141141

142142

AMDRyzenCPUPowerManagement/AMDRyzenCPUPowerManagement.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ void AMDRyzenCPUPowerManagement::calculateEffectiveFrequency(uint8_t physical){
505505
uint64_t lastAPERF = lastAPERF_PerCore[physical];
506506
uint64_t lastMPERF = lastMPERF_PerCore[physical];
507507

508+
lastAPERF_PerCore[physical] = APERF;
509+
lastMPERF_PerCore[physical] = MPERF;
508510
//If an overflow of either the MPERF or APERF register occurs between read of last MPERF and
509511
//read of last APERF, the effective frequency calculated in is invalid.
510512
if(APERF <= lastAPERF || MPERF <= lastMPERF) {
@@ -515,14 +517,11 @@ void AMDRyzenCPUPowerManagement::calculateEffectiveFrequency(uint8_t physical){
515517
float freqP0 = PStateDefClock_perCore[0];
516518

517519
uint64_t deltaAPERF = APERF - lastAPERF;
518-
deltaAPERF_PerCore[physical] = deltaAPERF;
519-
deltaMPERF_PerCore[physical] = MPERF - lastMPERF;
520520
float effFreq = ((float)deltaAPERF / (float)(MPERF - lastMPERF)) * freqP0;
521521

522522
effFreq_perCore[physical] = effFreq;
523523

524-
lastAPERF_PerCore[physical] = APERF;
525-
lastMPERF_PerCore[physical] = MPERF;
524+
526525
}
527526

528527
void AMDRyzenCPUPowerManagement::updateInstructionDelta(uint8_t cpu_num){

AMDRyzenCPUPowerManagement/AMDRyzenCPUPowerManagement.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ class AMDRyzenCPUPowerManagement : public IOService {
194194

195195
uint64_t lastMPERF_PerCore[CPUInfo::MaxCpus];
196196
uint64_t lastAPERF_PerCore[CPUInfo::MaxCpus];
197-
uint64_t deltaAPERF_PerCore[CPUInfo::MaxCpus];
198197
uint64_t deltaMPERF_PerCore[CPUInfo::MaxCpus];
199198

200199
// uint64_t lastAPERF_PerCore[CPUInfo::MaxCpus];

SMCAMDProcessor.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@
564564
"@executable_path/../Frameworks",
565565
);
566566
MACOSX_DEPLOYMENT_TARGET = 10.13;
567-
MARKETING_VERSION = 1.6.1;
567+
MARKETING_VERSION = 1.6.2;
568568
PRODUCT_BUNDLE_IDENTIFIER = "wtf.spinach.AMD-Power-Gadget";
569569
PRODUCT_NAME = "$(TARGET_NAME)";
570570
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -588,7 +588,7 @@
588588
"@executable_path/../Frameworks",
589589
);
590590
MACOSX_DEPLOYMENT_TARGET = 10.13;
591-
MARKETING_VERSION = 1.6.1;
591+
MARKETING_VERSION = 1.6.2;
592592
PRODUCT_BUNDLE_IDENTIFIER = "wtf.spinach.AMD-Power-Gadget";
593593
PRODUCT_NAME = "$(TARGET_NAME)";
594594
SWIFT_COMPILATION_MODE = wholemodule;
@@ -712,7 +712,7 @@
712712
buildSettings = {
713713
CODE_SIGN_STYLE = Manual;
714714
COMBINE_HIDPI_IMAGES = YES;
715-
CURRENT_PROJECT_VERSION = 0.6.5;
715+
CURRENT_PROJECT_VERSION = 0.6.6;
716716
GCC_PREPROCESSOR_DEFINITIONS = (
717717
"DEBUG=1",
718718
"$(inherited)",
@@ -727,7 +727,7 @@
727727
INFOPLIST_FILE = AMDRyzenCPUPowerManagement/Info.plist;
728728
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/Lilu.kext/Contents/Resources/Library";
729729
MACOSX_DEPLOYMENT_TARGET = 10.13;
730-
MARKETING_VERSION = 0.6.5;
730+
MARKETING_VERSION = 0.6.6;
731731
MODULE_NAME = wtf.spinach.AMDRyzenCPUPowerManagement;
732732
MODULE_START = amdryzencpupm_kern_start;
733733
MODULE_STOP = amdryzencpupm_kern_stop;
@@ -759,7 +759,7 @@
759759
buildSettings = {
760760
CODE_SIGN_STYLE = Manual;
761761
COMBINE_HIDPI_IMAGES = YES;
762-
CURRENT_PROJECT_VERSION = 0.6.5;
762+
CURRENT_PROJECT_VERSION = 0.6.6;
763763
GCC_PREPROCESSOR_DEFINITIONS = (
764764
"PRODUCT_NAME=$(PRODUCT_NAME)",
765765
"MODULE_VERSION=$(MODULE_VERSION)",
@@ -772,7 +772,7 @@
772772
INFOPLIST_FILE = AMDRyzenCPUPowerManagement/Info.plist;
773773
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/Lilu.kext/Contents/Resources/Library";
774774
MACOSX_DEPLOYMENT_TARGET = 10.13;
775-
MARKETING_VERSION = 0.6.5;
775+
MARKETING_VERSION = 0.6.6;
776776
MODULE_NAME = wtf.spinach.AMDRyzenCPUPowerManagement;
777777
MODULE_START = amdryzencpupm_kern_start;
778778
MODULE_STOP = amdryzencpupm_kern_stop;

0 commit comments

Comments
 (0)