Skip to content

Commit

Permalink
platform/x86: asus-armoury: add core count control
Browse files Browse the repository at this point in the history
Implement Intel core enablement under the asus-armoury module using the fw_attributes class.

This allows users to enable or disable preformance or efficiency cores depending on their requirements. After change a reboot is required.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
  • Loading branch information
uejji committed Sep 5, 2024
1 parent 1b154b9 commit 42f1573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions PKGBUILD/linux/0052-asus-armoury-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ diff -rupN linux-6.10.7.hid-asus-ally/drivers/platform/x86/asus-wmi.c linux-6.10
static int asus_wmi_get_devstate_bits(struct asus_wmi *asus,
diff -rupN linux-6.10.7.orig/include/linux/platform_data/x86/asus-wmi.h linux-6.10.7/include/linux/platform_data/x86/asus-wmi.h
--- linux-6.10.7.orig/include/linux/platform_data/x86/asus-wmi.h 2024-08-29 15:36:13.000000000 +0000
+++ linux-6.10.7/include/linux/platform_data/x86/asus-wmi.h 2024-09-03 03:58:46.950996169 +0000
+++ linux-6.10.7/include/linux/platform_data/x86/asus-wmi.h 2024-09-03 04:02:27.464319041 +0000
@@ -66,6 +66,7 @@
#define ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY 0x00120075

Expand All @@ -68,18 +68,22 @@ diff -rupN linux-6.10.7.orig/include/linux/platform_data/x86/asus-wmi.h linux-6.
#define ASUS_WMI_DEVID_PANEL_OD 0x00050019
#define ASUS_WMI_DEVID_CAMERA 0x00060013
#define ASUS_WMI_DEVID_LID_FLIP 0x00060062
@@ -126,6 +127,10 @@
@@ -126,6 +127,14 @@
/* dgpu on/off */
#define ASUS_WMI_DEVID_DGPU 0x00090020

+/* Intel E-core and P-core configuration in a format 0x0[E]0[P] */
+#define ASUS_WMI_DEVID_CORES 0x001200D2
+ /* Maximum Intel E-core and P-core availability */
+#define ASUS_WMI_DEVID_CORES_MAX 0x001200D3
+#define ASUS_WMI_DEVID_DGPU_BASE_TGP 0x00120099
+#define ASUS_WMI_DEVID_DGPU_SET_TGP 0x00120098
+#define ASUS_WMI_DEVID_APU_MEM 0x000600C1
+
/* gpu mux switch, 0 = dGPU, 1 = Optimus */
#define ASUS_WMI_DEVID_GPU_MUX 0x00090016
#define ASUS_WMI_DEVID_GPU_MUX_VIVO 0x00090026
@@ -151,8 +156,18 @@
@@ -151,8 +160,18 @@
#define ASUS_WMI_DSTS_LIGHTBAR_MASK 0x0000000F

#if IS_REACHABLE(CONFIG_ASUS_WMI)
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD/linux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ sha256sums=('SKIP'
'2728588169bb1e1b4d9987c0732a316e39670f0c873429179b894ddc6be9b0fa' # 0040-amdgpu-quirks.patch
'c6ff653b1e55c5524b237a40683a34240d4ec7b95e524441ed3ae09ed885f674' # 0050-AMD-Pstate-Core-Performance-Boost.patch
'7c7df8d4427c807e2cea0f1e147efcdfb1e7c1c5271823cc6bb49f10b1846d19' # 0051-drm-amd-display-let-update_planes_and_stream_state-d.patch
'24672faf5d8b25242a1d565c1f6d7a4f73cf9fc55a7ebff88cd784ffb88a1eac' # 0052-asus-armoury-support.patch
'3f11d682a401bd4748115c8daf72a9e3d5a5b01d6aaf65a79b56cde044129b67' # 0052-asus-armoury-support.patch
'a8e3c0f7a3cdcc82a12a5dc44772263c2dd7bc3207f16b98dac42e0e74184172' # 0053-add-support-for-screen-off-and-screen-on.patch
'abf7ddb74fa9eb0cfdbe81dba7bf4003e5d85ac1a4e1f2b5333ab97986c3e68e' # 0054-Notify-the-suspend-core-when-displays-are-changed-at.patch
'713653bbb8d96eba905d87864989ca2ee0363efbcdf8217121924f538be2adc8' # 0055-Move-screen-off_on-code-into-dedicated.patch
Expand Down

0 comments on commit 42f1573

Please sign in to comment.