Skip to content

Commit

Permalink
konabess: Allow adding more levels for newer chips
Browse files Browse the repository at this point in the history
  • Loading branch information
libxzr committed Jul 19, 2022
1 parent 8301141 commit a4474e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/src/main/java/xzr/konabess/ChipInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public enum type {
unknown
}

public static int getMaxTableLevels(type type) {
if (type == ChipInfo.type.cape_singleBin || type == ChipInfo.type.waipio_singleBin)
return 16;
return 11;
}

public static boolean shouldIgnoreVoltTable(type type) {
return type == ChipInfo.type.lahaina || type == ChipInfo.type.lahaina_singleBin
|| type == ChipInfo.type.shima || type == ChipInfo.type.yupik
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/xzr/konabess/GpuTableEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ private static void patch_throttle_level() throws Exception {
}

public static boolean canAddNewLevel(int binID, Context context) throws Exception {
int max_levels = 11 - min_level_chip_offset();
int max_levels = ChipInfo.getMaxTableLevels(ChipInfo.which) - min_level_chip_offset();
if (bins.get(binID).levels.size() <= max_levels)
return true;
Toast.makeText(context, R.string.unable_add_more, Toast.LENGTH_SHORT).show();
Expand Down

1 comment on commit a4474e0

@Henry2o1o
Copy link
Contributor

@Henry2o1o Henry2o1o commented on a4474e0 Jul 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about CPU support?
Can this also be realized?

Please sign in to comment.