Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork fixes issue where RP would not launch #283

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8f376b4
handle null chars in dxorg.cpp:getValueFromSysFsFile()
emerge-e-world Dec 2, 2021
0abbbfc
Add workaround for marazmista/radeon-profile#151
FMeinicke Oct 7, 2020
bb8a755
Remove unnecessary variable holding current PWM state
FMeinicke Nov 1, 2020
b056354
Add bounds check to move left/right buttons in topbar cfg dialog
emerge-e-world Dec 2, 2021
45afd7c
extend the ValueID type to allow multiple instances of values of the …
emerge-e-world Dec 7, 2021
c2f30de
Add driver level support for multiple temperature sensors
emerge-e-world Dec 7, 2021
8b59ada
display all temperature sensor readings in GPU data list
emerge-e-world Dec 7, 2021
c699f98
reset min/max readings of all temperature sensors on reset event
emerge-e-world Dec 7, 2021
7d3219c
Support selecting all temperature sensors in topbar items
emerge-e-world Dec 7, 2021
7d22edf
Generate default topbar items for known temperature sensors
emerge-e-world Dec 7, 2021
8c2f779
add support for multiple sensors to events tab
emerge-e-world Dec 7, 2021
70d5d28
Include all temperature sensor readings when logging on exec
emerge-e-world Dec 7, 2021
e83166e
fix typo
emerge-e-world Dec 7, 2021
1e3f023
display critical and emergency temperature limits in GPU data list
emerge-e-world Dec 7, 2021
4b3b94e
Make hysteresis a per fan profile setting
emerge-e-world Dec 8, 2021
295d189
allow selecting temperature sensor in fan profiles
emerge-e-world Dec 8, 2021
1e744e1
add some more verbose debug output when parsing pp_od_clk_voltage
emerge-e-world Feb 24, 2022
aefd56a
fix segfault when parsing pp_od_clk_voltage for navi2x based cards
emerge-e-world Feb 24, 2022
ff1facc
ignore empty sclk_table instead of segfaulting when building OC tab
emerge-e-world Feb 24, 2022
0d632ba
fix incomplete bounds checks in parseOcTable()
emerge-e-world Feb 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions radeon-profile/components/topbarcomponents.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,23 @@ class TopbarManager {
addSchema(tis);
}

if (availableData.contains(ValueID::TEMPERATURE_CURRENT)) {
TopbarItemDefinitionSchema tis(ValueID::TEMPERATURE_CURRENT, TopbarItemType::LARGE_LABEL, defaultForeground);
const ValueID t_edge = ValueID(ValueID::TEMPERATURE_CURRENT, ValueID::T_EDGE);
if (availableData.contains(t_edge)) {
TopbarItemDefinitionSchema tis(t_edge, TopbarItemType::LARGE_LABEL, defaultForeground);
addSchema(tis);
}

const ValueID t_junction = ValueID(ValueID::TEMPERATURE_CURRENT, ValueID::T_JUNCTION);
const ValueID t_mem = ValueID(ValueID::TEMPERATURE_CURRENT, ValueID::T_MEM);
if (availableData.contains(t_junction)) {
TopbarItemDefinitionSchema tis(t_junction, TopbarItemType::LABEL_PAIR, defaultForeground);
if (availableData.contains(t_mem)) {
tis.setSecondaryValueId(t_mem);
tis.setSecondaryColor(defaultForeground);
}
addSchema(tis);
} else if (availableData.contains(t_mem)) {
TopbarItemDefinitionSchema tis(t_mem, TopbarItemType::LABEL_PAIR, defaultForeground);
addSchema(tis);
}

Expand Down
33 changes: 16 additions & 17 deletions radeon-profile/dialogs/dialog_deinetopbaritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,27 @@ void Dialog_deineTopbarItem::createCombo(QComboBox *combo, const TopbarItemType
switch (type) {
case TopbarItemType::LABEL_PAIR:
case TopbarItemType::LARGE_LABEL:
for (int i = 0; i < availableGpuData->count(); ++i) {
if (availableGpuData->at(i) == ValueID::TEMPERATURE_BEFORE_CURRENT)
for (const ValueID id : *availableGpuData) {
if (id == ValueID::TEMPERATURE_BEFORE_CURRENT)
continue;

combo->addItem(globalStuff::getNameOfValueID(availableGpuData->at(i)), QVariant::fromValue(availableGpuData->at(i)));
combo->addItem(globalStuff::getNameOfValueID(id), QVariant::fromValue(id));
}
break;

case TopbarItemType::PIE:
for (int i = 0; i < availableGpuData->count(); ++i) {
if (globalStuff::getUnitFomValueId(availableGpuData->at(i)) == ValueUnit::PERCENT)
combo->addItem(globalStuff::getNameOfValueID(availableGpuData->at(i)), QVariant::fromValue(availableGpuData->at(i)));
for (const ValueID id : *availableGpuData) {
if (globalStuff::getUnitFomValueId(id) == ValueUnit::PERCENT)
combo->addItem(globalStuff::getNameOfValueID(id), QVariant::fromValue(id));

if (availableGpuData->at(i) == ValueID::CLK_CORE && gpuParams->maxCoreClock != -1)
combo->addItem(globalStuff::getNameOfValueID(ValueID::CLK_CORE), QVariant::fromValue(ValueID::CLK_CORE));
if (id == ValueID::CLK_CORE && gpuParams->maxCoreClock != -1)
combo->addItem(globalStuff::getNameOfValueID(id), QVariant::fromValue(id));

if (availableGpuData->at(i) == ValueID::CLK_MEM && gpuParams->maxMemClock != -1)
combo->addItem(globalStuff::getNameOfValueID(ValueID::CLK_MEM), QVariant::fromValue(ValueID::CLK_MEM));

if (availableGpuData->at(i) == ValueID::TEMPERATURE_CURRENT && gpuParams->temp1_crit != -1)
combo->addItem(globalStuff::getNameOfValueID(ValueID::TEMPERATURE_CURRENT), QVariant::fromValue(ValueID::TEMPERATURE_CURRENT));
if (id == ValueID::CLK_MEM && gpuParams->maxMemClock != -1)
combo->addItem(globalStuff::getNameOfValueID(id), QVariant::fromValue(id));

if (id == ValueID::TEMPERATURE_CURRENT)
combo->addItem(globalStuff::getNameOfValueID(id), QVariant::fromValue(id));
}
break;
}
Expand Down Expand Up @@ -166,7 +165,7 @@ void Dialog_deineTopbarItem::on_combo_primaryData_currentIndexChanged(int index)
ui->combo_secondaryData->clear();
ui->combo_secondaryData->addItem("");

switch (static_cast<ValueID>(ui->combo_primaryData->currentData().toInt())) {
switch (ui->combo_primaryData->currentData().value<ValueID>()) {
case ValueID::FAN_SPEED_PERCENT:
if (availableGpuData->contains(ValueID::FAN_SPEED_RPM))
ui->combo_secondaryData->addItem(globalStuff::getNameOfValueID(ValueID::FAN_SPEED_RPM), QVariant::fromValue(ValueID::FAN_SPEED_RPM));
Expand All @@ -191,16 +190,16 @@ void Dialog_deineTopbarItem::on_btn_cancel_clicked()

void Dialog_deineTopbarItem::on_btn_save_clicked()
{
editedSchema = TopbarItemDefinitionSchema(static_cast<ValueID>(ui->combo_primaryData->currentData().toInt()),
editedSchema = TopbarItemDefinitionSchema(ui->combo_primaryData->currentData().value<ValueID>(),
getItemType(), ui->frame_primaryColor->palette().background().color());

if (!ui->combo_secondaryData->currentText().isEmpty() && ui->combo_secondaryData->isEnabled()) {
editedSchema.setSecondaryValueId(static_cast<ValueID>(ui->combo_secondaryData->currentData().toInt()));
editedSchema.setSecondaryValueId(ui->combo_secondaryData->currentData().value<ValueID>());
editedSchema.setSecondaryColor(ui->frame_secondaryColor->palette().background().color());
}

if (ui->radio_pie->isChecked()) {
switch (static_cast<ValueID>(ui->combo_primaryData->currentData().toInt())) {
switch (ui->combo_primaryData->currentData().value<ValueID>()) {
case ValueID::CLK_CORE:
editedSchema.pieMaxValue = gpuParams->maxCoreClock;
break;
Expand Down
13 changes: 13 additions & 0 deletions radeon-profile/dialogs/dialog_rpevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ Dialog_RPEvent::Dialog_RPEvent(QWidget *parent) :
}

void Dialog_RPEvent::setFeatures(const GPUDataContainer &gpuData, const DriverFeatures &features, const QList<QString> &profiles) {
for (const ValueID::Instance instance : features.tempSensors) {
const ValueID id(ValueID::TEMPERATURE_CURRENT, instance);
ui->combo_sensorInstance->addItem(globalStuff::getNameOfValueID(id), QVariant(instance));
}

switch (features.currentPowerMethod) {
case PowerMethod::DPM:
ui->combo_powerLevelChange->addItems(globalStuff::createPowerLevelCombo(features.sysInfo.module));
Expand Down Expand Up @@ -72,6 +77,7 @@ void Dialog_RPEvent::on_btn_save_clicked()
switch (ui->combo_eventTrigger->currentIndex()) {
case 0:
createdEvent.type = RPEventType::TEMPERATURE;
createdEvent.sensorInstance = ui->combo_sensorInstance->currentData().value<ValueID::Instance>();
break;
case 1:
createdEvent.type = RPEventType::BINARY;
Expand Down Expand Up @@ -109,6 +115,7 @@ void Dialog_RPEvent::setEditedEvent(const RPEvent &rpe) {
createdEvent = rpe;

ui->combo_eventTrigger->setCurrentIndex(rpe.type);
ui->combo_sensorInstance->setCurrentIndex(ui->combo_sensorInstance->findData(rpe.sensorInstance));
ui->cb_enabled->setChecked(rpe.enabled);
ui->edt_eventName->setText(rpe.name);
ui->spin_tempActivate->setValue(rpe.activationTemperature);
Expand All @@ -129,6 +136,12 @@ void Dialog_RPEvent::on_combo_fanChange_currentIndexChanged(int index)
ui->spin_fixedFanSpeed->setVisible(index == 2);
}

void Dialog_RPEvent::on_combo_eventTrigger_currentIndexChanged(int index)
{
ui->combo_sensorInstance->setVisible(index == 0);
ui->label_sensorInstance->setVisible(index == 0);
}

void Dialog_RPEvent::on_btn_setBinary_clicked()
{
QString binaryPath = QFileDialog::getOpenFileName(this, tr("Select binary"),
Expand Down
1 change: 1 addition & 0 deletions radeon-profile/dialogs/dialog_rpevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ private slots:
void on_btn_cancel_clicked();
void on_btn_save_clicked();
void on_combo_fanChange_currentIndexChanged(int index);
void on_combo_eventTrigger_currentIndexChanged(int index);
void on_btn_setBinary_clicked();

private:
Expand Down
11 changes: 11 additions & 0 deletions radeon-profile/dialogs/dialog_rpevent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="combo_sensorInstance">
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_sensorInstance">
<property name="text">
<string>Temperature Sensor</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="3">
Expand Down
7 changes: 7 additions & 0 deletions radeon-profile/dialogs/dialog_topbarcfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void Dialog_topbarCfg::on_btn_cancel_clicked()

void Dialog_topbarCfg::on_btn_moveLeft_clicked()
{
if (ui->listWidget->currentRow() <= 0)
return;

int a = ui->listWidget->currentRow() == ui->listWidget->count() - 1 ? 0 : 1;

schemas.insert(ui->listWidget->currentRow() - 1, schemas.takeAt(ui->listWidget->currentRow()));
Expand All @@ -54,6 +57,10 @@ void Dialog_topbarCfg::on_btn_moveLeft_clicked()

void Dialog_topbarCfg::on_btn_moveRight_clicked()
{
if ((ui->listWidget->currentRow() == -1) ||
(ui->listWidget->currentRow() == ui->listWidget->count() - 1))
return;

schemas.insert(ui->listWidget->currentRow() + 1, schemas.takeAt(ui->listWidget->currentRow()));
ui->listWidget->insertItem(ui->listWidget->currentRow() + 1, ui->listWidget->takeItem(ui->listWidget->currentRow()));
ui->listWidget->setCurrentRow(ui->listWidget->currentRow() + 1);
Expand Down
Loading