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

force xhci usb mode on steam deck to workaround firmware bug #2

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c220215
ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER
heftig Sep 16, 2019
e81a18c
drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set
martinezjavier May 19, 2022
cf8f76c
arch/Kconfig: Default to maximum amount of ASLR bits
heftig Jan 13, 2024
d81e943
amdgpu: enable overdrive by default
BoukeHaarsma23 Dec 12, 2023
e449809
drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
Samsagax Jun 21, 2023
b0a4037
drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition
Samsagax Jun 21, 2023
56ec8d5
drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK
Samsagax Jun 21, 2023
5a587d4
drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero
BoukeHaarsma23 Oct 7, 2023
ee5c6c7
drm: panel-orientation-quirks: Add quirk for Ayn Loki Max
BoukeHaarsma23 Oct 7, 2023
ad8aade
Ayaneo geek headset patch
BoukeHaarsma23 Sep 22, 2023
8a01a81
ayaneo 2 headphone fix
BoukeHaarsma23 Sep 22, 2023
9733953
HACK: add KConfig to enable driver-specific color mgmt props
melissawen Apr 22, 2023
e75761e
Don't create color_mgmt_properties on asics < SIENNA_CICHLID
BoukeHaarsma23 Dec 15, 2023
1bd3d58
drm: Add GPU reset sysfs event
contactshashanksharma Mar 7, 2022
945b74b
drm/amdgpu: add work function for GPU reset event
contactshashanksharma Mar 7, 2022
a37b55c
drm/amdgpu: schedule GPU reset event work function
Mar 10, 2022
b756809
oxp-sensors: hwmon: Add OrangePi Neo PWM fan control
pastaq Mar 28, 2024
78c8501
oxp-sensors: hwmon: Add OneXPlayer 2 and OneXFly
pastaq Mar 28, 2024
f12bdbb
oxp-sensors: hwmon: Add support for AYANEO 2s, air 1s, geek 1s and ku…
pastaq Mar 28, 2024
61740ea
oxp-sensors: hwmon: Add GPD Win Mini
pastaq Mar 28, 2024
cc81de3
bump the sensitivity of AMD SFH
antheas Mar 3, 2024
0545e78
IIO: add aya neo tablet identifier
BoukeHaarsma23 Apr 10, 2024
acbef60
iio: imu: Add driver for Bosch BMI260 IMU
justinweiss Feb 14, 2024
39dc3ed
Codec: Add aw87xxx codec with partial acpi implementation
ruineka Apr 25, 2024
3c361b0
Updated AW87xxx driver to be more verbose for debugging purposes, but…
CVMagic May 16, 2024
a23fb72
Updated AW87xxx driver to automatically enumerate a second I2C chip i…
CVMagic May 19, 2024
98c4c31
Updated AW87xxx driver to implement Suspend and Resume.
CVMagic May 22, 2024
9a3f8a9
fixup aw87xxx.{c,h} warnings
BoukeHaarsma23 Jul 27, 2024
b88198e
Add Atari VCS quirk
fewtarius May 28, 2024
584aafc
iio: imu: bmi323: Use iio read_acpi_mount_matrix() helper
NeroReflex May 23, 2024
db41c3a
fix Air 1S audio - thanks in part to @linh1987!
fewtarius Jul 26, 2024
fdb5899
platform/x86: asus-wmi: Add quirk for ROG Ally X
flukejones Jul 24, 2024
3b27942
Fix ROG ALLY X audio
jlobue10 Jul 13, 2024
e65c67c
Add azoth
flukejones Jun 18, 2024
bbb6229
Input: xpad - add support for ASUS ROG RAIKIRI PRO
flukejones Jun 7, 2024
b98a698
hid-asus: use hid for brightness control on keyboard
flukejones May 13, 2024
e88bc3b
platform/x86: asus-wmi: don't fail if platform_profile already regist…
flukejones May 23, 2024
096348c
platform/x86: asus-wmi: fix TUF laptop RGB variant
flukejones Jul 13, 2024
ca0cc4f
ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models
flukejones Jul 15, 2024
58be6c2
hid-asus: add ROG Ally X prod ID to quirk list
flukejones Jul 24, 2024
ba7f94b
platform/x86 asus-armoury: move existing tunings to asus-armoury module
flukejones May 30, 2024
638854b
platform/x86: asus-armoury: add dgpu tgp control
flukejones Jun 2, 2024
b71fe51
platform/x86: asus-armoury: add apu-mem control support
flukejones Jun 2, 2024
b5f169c
platform/x86: asus-armoury: add core count control
flukejones Jun 2, 2024
dd25e1d
asus-wmi: deprecate bios features
flukejones Jun 3, 2024
c13f8b8
HID: asus: add ROG Ally xpad settings
flukejones Jul 25, 2024
9f43d14
Use DMI matching for conflicting SSID 0x1f660101 between Ayaneo and AYN
CVMagic Jul 13, 2024
245ab97
hid-asus-ally-x: Basic driver for the ASUS ROG Ally X
flukejones Jul 27, 2024
ceba9d0
linux-chimeraos v6.10.2-chos1
BoukeHaarsma23 Jul 28, 2024
29eb7d7
force xhci usb mode on steam deck to workaround firmware bug
endrift Feb 13, 2024
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
85 changes: 85 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-hid-asus
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/gamepad_mode
Date: December 2023
Contact: [email protected]
Description: Set the mode the ROG Ally xpad operates in:
- 1 = Game mode
- 2 = WASD mode
- 3 = Mouse mode
This setting applies instantly and applies settings that were previously changed
under that mode which are:
- deadzones
- anti-deadzones
- button mapping
- button turbo settings
- response curves

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/apply
Date: December 2023
Contact: [email protected]
Description: Apply the settings that have been stored in attributes so far. Because there are
many individual settings across a dozen packets this separation is required to
prevent spamming the MCU when userspace applications apply many changes at once.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/reset_btn_mapping
Date: December 2023
Contact: [email protected]
Description: Reset a gamepad mode to its default button mapping.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y/z>_<left/right>/deadzone
Date: December 2023
Contact: [email protected]
Description: Set the inner and outer deadzones of joysticks and triggers. These settings are not
written to the MCU until `apply` is set.
- range 0-64 (corresponds to 0-100%)

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y/z>_<left/right>/deadzone_index
Date: December 2023
Contact: [email protected]
Description: Descriptive labels for joystick deadzone array.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y>_<left/right>/anti-deadzone
Date: December 2023
Contact: [email protected]
Description: Set the joystick anti-deadzone feature:
- range 0-32 (corresponds to 0-50%)

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y/z>_<left/right>/calibration
Date: December 2023
Contact: [email protected]
Description: Calibration values for the joysticks and trigger analogues. There are no default
values as the calibration is determined in userspace.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y/z>_<left/right>/calibration_index
Date: December 2023
Contact: [email protected]
Description: Descriptive labels for joystick and triggers calibration array.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y>_<left/right>/rc_point<n>
Date: December 2023
Contact: [email protected]
Description: Set the joystick response curve. There are 4 points available with 1 being the lowest
point and 4 being the highest point.
- range 0-64 (corresponds to 0-100%)

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/axis_<x/y>_<left/right>/rc_point_index
Date: December 2023
Contact: [email protected]
Description: Descriptive labels for joystick response curve points.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/btn_<label>/turbo
Date: December 2023
Contact: [email protected]
Description: Set the turbo mode of the button:
- 0 = no turbo, a separate press and release is registered on press and release
- 1-16 = interval between presses if button held down in steps of 1000ms/16
These settings are not written to the MCU until `apply` is set.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/vibration_intensity
Date: December 2023
Contact: [email protected]
Description: Set the vibration intensity for left and right haptics. Applies instantly.

What: /sys/bus/usb/devices/1-3:1.0/0003:0B05:1ABE.0001/vibration_intensity_index
Date: December 2023
Contact: [email protected]
Description: Descriptive labels for index points of vibration_intensity.
17 changes: 17 additions & 0 deletions Documentation/ABI/testing/sysfs-platform-asus-wmi
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Date: Aug 2022
KernelVersion: 6.1
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Switch the GPU hardware MUX mode. Laptops with this feature can
can be toggled to boot with only the dGPU (discrete mode) or in
standard Optimus/Hybrid mode. On switch a reboot is required:
Expand All @@ -75,6 +76,7 @@ Date: Aug 2022
KernelVersion: 5.17
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Disable discrete GPU:
* 0 - Enable dGPU,
* 1 - Disable dGPU
Expand All @@ -84,6 +86,7 @@ Date: Aug 2022
KernelVersion: 5.17
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Enable the external GPU paired with ROG X-Flow laptops.
Toggling this setting will also trigger ACPI to disable the dGPU:

Expand All @@ -95,6 +98,7 @@ Date: Aug 2022
KernelVersion: 5.17
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Enable an LCD response-time boost to reduce or remove ghosting:
* 0 - Disable,
* 1 - Enable
Expand All @@ -104,6 +108,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Get the current charging mode being used:
* 1 - Barrel connected charger,
* 2 - USB-C charging
Expand All @@ -114,6 +119,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Show if the egpu (XG Mobile) is correctly connected:
* 0 - False,
* 1 - True
Expand All @@ -123,6 +129,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Change the mini-LED mode:
* 0 - Single-zone,
* 1 - Multi-zone
Expand All @@ -133,13 +140,15 @@ Date: Apr 2024
KernelVersion: 6.10
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
List the available mini-led modes.

What: /sys/devices/platform/<platform>/ppt_pl1_spl
Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the Package Power Target total of CPU: PL1 on Intel, SPL on AMD.
Shown on Intel+Nvidia or AMD+Nvidia based systems:

Expand All @@ -150,6 +159,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the Slow Package Power Tracking Limit of CPU: PL2 on Intel, SPPT,
on AMD. Shown on Intel+Nvidia or AMD+Nvidia based systems:

Expand All @@ -160,6 +170,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the Fast Package Power Tracking Limit of CPU. AMD+Nvidia only:
* min=5, max=250

Expand All @@ -168,6 +179,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the APU SPPT limit. Shown on full AMD systems only:
* min=5, max=130

Expand All @@ -176,6 +188,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the platform SPPT limit. Shown on full AMD systems only:
* min=5, max=130

Expand All @@ -184,6 +197,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the dynamic boost limit of the Nvidia dGPU:
* min=5, max=25

Expand All @@ -192,6 +206,7 @@ Date: Jun 2023
KernelVersion: 6.5
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set the target temperature limit of the Nvidia dGPU:
* min=75, max=87

Expand All @@ -200,6 +215,7 @@ Date: Apr 2024
KernelVersion: 6.10
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set if the BIOS POST sound is played on boot.
* 0 - False,
* 1 - True
Expand All @@ -209,6 +225,7 @@ Date: Apr 2024
KernelVersion: 6.10
Contact: "Luke Jones" <[email protected]>
Description:
DEPRECATED, WILL BE REMOVED SOON
Set if the MCU can go in to low-power mode on system sleep
* 0 - False,
* 1 - True
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 10
SUBLEVEL = 2
EXTRAVERSION =
EXTRAVERSION = -chos1
NAME = Baby Opossum Posse

# *DOCUMENTATION*
Expand Down
4 changes: 2 additions & 2 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ config ARCH_MMAP_RND_BITS
int "Number of bits to use for ASLR of mmap base address" if EXPERT
range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
default ARCH_MMAP_RND_BITS_MIN
default ARCH_MMAP_RND_BITS_MAX
depends on HAVE_ARCH_MMAP_RND_BITS
help
This value can be used to select the number of bits to use to
Expand Down Expand Up @@ -1084,7 +1084,7 @@ config ARCH_MMAP_RND_COMPAT_BITS
int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
default ARCH_MMAP_RND_COMPAT_BITS_MIN
default ARCH_MMAP_RND_COMPAT_BITS_MAX
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
help
This value can be used to select the number of bits to use to
Expand Down
18 changes: 17 additions & 1 deletion drivers/firmware/sysfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@
#include <linux/screen_info.h>
#include <linux/sysfb.h>

static int skip_simpledrm;

static int __init simpledrm_disable(char *opt)
{
if (!opt)
return -EINVAL;

get_option(&opt, &skip_simpledrm);

if (skip_simpledrm)
pr_info("The simpledrm driver will not be probed\n");

return 0;
}
early_param("nvidia-drm.modeset", simpledrm_disable);

static struct platform_device *pd;
static DEFINE_MUTEX(disable_lock);
static bool disabled;
Expand Down Expand Up @@ -136,7 +152,7 @@ static __init int sysfb_init(void)

/* try to create a simple-framebuffer device */
compatible = sysfb_parse_mode(si, &mode);
if (compatible) {
if (compatible && !skip_simpledrm) {
pd = sysfb_create_simplefb(si, &mode, parent);
if (!IS_ERR(pd))
goto put_device;
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include <drm/amdgpu_drm.h>
#include <drm/drm_gem.h>
#include <drm/drm_ioctl.h>
#include <drm/drm_sysfs.h>

#include <kgd_kfd_interface.h>
#include "dm_pp_interface.h"
Expand Down Expand Up @@ -1101,6 +1102,7 @@ struct amdgpu_device {

int asic_reset_res;
struct work_struct xgmi_reset_work;
struct work_struct gpu_reset_event_work;
struct list_head reset_list;

long gfx_timeout;
Expand Down Expand Up @@ -1132,6 +1134,7 @@ struct amdgpu_device {
bool barrier_has_auto_waitcnt;

struct amdgpu_reset_control *reset_cntl;
struct drm_reset_event reset_event_info;
uint32_t ip_versions[MAX_HWIP][HWIP_MAX_INSTANCE];

bool ram_is_direct_mapped;
Expand Down
27 changes: 27 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include <linux/pm_runtime.h>

#include <drm/drm_drv.h>
#include <drm/drm_sysfs.h>

#if IS_ENABLED(CONFIG_X86)
#include <asm/intel-family.h>
Expand Down Expand Up @@ -3816,6 +3817,17 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
return amdgpu_device_asic_has_dc_support(adev->asic_type);
}

static void amdgpu_device_reset_event_func(struct work_struct *__work)
{
struct amdgpu_device *adev = container_of(__work, struct amdgpu_device,
gpu_reset_event_work);
/*
* A GPU reset has happened, inform the userspace and pass the
* reset related information.
*/
drm_sysfs_reset_event(&adev->ddev, &adev->reset_event_info);
}

static void amdgpu_device_xgmi_reset_func(struct work_struct *__work)
{
struct amdgpu_device *adev =
Expand Down Expand Up @@ -4086,6 +4098,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
amdgpu_device_delay_enable_gfx_off);

INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
INIT_WORK(&adev->gpu_reset_event_work, amdgpu_device_reset_event_func);

adev->gfx.gfx_off_req_count = 1;
adev->gfx.gfx_off_residency = 0;
Expand Down Expand Up @@ -5455,6 +5468,20 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
if (!test_bit(AMDGPU_SKIP_COREDUMP, &reset_context->flags))
amdgpu_coredump(tmp_adev, vram_lost, reset_context);

if (reset_context->job && reset_context->job->vm) {
tmp_adev->reset_event_info.pid =
reset_context->job->vm->task_info->pid;
memset(tmp_adev->reset_event_info.pname, 0, TASK_COMM_LEN);
strcpy(tmp_adev->reset_event_info.pname,
reset_context->job->vm->task_info->process_name);
} else {
tmp_adev->reset_event_info.pid = 0;
memset(tmp_adev->reset_event_info.pname, 0, TASK_COMM_LEN);
}

tmp_adev->reset_event_info.flags = vram_lost;
schedule_work(&tmp_adev->gpu_reset_event_work);

if (vram_lost) {
DRM_INFO("VRAM is lost due to GPU reset!\n");
amdgpu_inc_vram_lost(tmp_adev);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ char *amdgpu_disable_cu;
char *amdgpu_virtual_display;
bool enforce_isolation;
/*
* OverDrive(bit 14) disabled by default
* OverDrive(bit 14) enabled by default
* GFX DCS(bit 19) disabled by default
*/
uint amdgpu_pp_feature_mask = 0xfff7bfff;
uint amdgpu_pp_feature_mask = 0xfff7ffff;
uint amdgpu_force_long_training;
int amdgpu_lbpw = -1;
int amdgpu_compute_multipipe = -1;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,8 @@ static const struct amdgpu_gfxoff_quirk amdgpu_gfxoff_quirk_list[] = {
{ 0x1002, 0x15dd, 0x103c, 0x83e7, 0xd3 },
/* GFXOFF is unstable on C6 parts with a VBIOS 113-RAVEN-114 */
{ 0x1002, 0x15dd, 0x1002, 0x15dd, 0xc6 },
/* GFXOFF is unstable on 91 (Atari VCS) with 113-RAVEN2-117 */
{ 0x1002, 0x15D8, 0x1002, 0x15D8, 0x91 },
/* Apple MacBook Pro (15-inch, 2019) Radeon Pro Vega 20 4 GB */
{ 0x1002, 0x69af, 0x106b, 0x019a, 0xc0 },
{ 0, 0, 0, 0, 0 },
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/amd/display/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,11 @@ config DRM_AMD_SECURE_DISPLAY
This option enables the calculation of crc of specific region via
debugfs. Cooperate with specific DMCU FW.

config DRM_AMD_COLOR_STEAMDECK
bool "Enable color calibration features for Steam Deck"
depends on DRM_AMD_DC
help
Choose this option if you want to use AMDGPU features for broader
color management support on Steam Deck.

endmenu
Loading