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

Commits on Jul 28, 2024

  1. ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER

    Our default behavior continues to match the vanilla kernel.
    heftig authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    c220215 View commit details
    Browse the repository at this point in the history
  2. drivers/firmware: skip simpledrm if nvidia-drm.modeset=1 is set

    The Nvidia proprietary driver has some bugs that leads to issues if used
    with the simpledrm driver. The most noticeable is that does not register
    an emulated fbdev device.
    
    It just relies on a fbdev to be registered by another driver, that could
    be that could be attached to the framebuffer console. On UEFI machines,
    this is the efifb driver.
    
    This means that disabling the efifb driver will cause virtual consoles to
    not be present in the system when using the Nvidia driver. Legacy BIOS is
    not affected just because fbcon is not used there, but instead vgacon.
    
    Unless a VGA mode is specified using the vga= kernel command line option,
    in that case the vesafb driver is used instead and its fbdev attached to
    the fbcon.
    
    This is a problem because with CONFIG_SYSFB_SIMPLEFB=y, the sysfb platform
    code attempts to register a "simple-framebuffer" platform device (that is
    matched against simpledrm) and only registers either an "efi-framebuffer"
    or "vesa-framebuffer" if this fails to be registered due the video modes
    not being compatible.
    
    The Nvidia driver relying on another driver to register the fbdev is quite
    fragile, since it can't really assume those will stick around. For example
    there are patches posted to remove the EFI and VESA platform devices once
    a real DRM or fbdev driver probes.
    
    But in any case, moving to a simpledrm + emulated fbdev only breaks this
    assumption and causes users to not have VT if the Nvidia driver is used.
    
    So to prevent this, let's add a workaround and make the sysfb to skip the
    "simple-framebuffer" registration when nvidia-drm.modeset=1 option is set.
    
    This is quite horrible, but honestly I can't think of any other approach.
    
    For this to work, the CONFIG_FB_EFI and CONFIG_FB_VESA config options must
    be enabled besides CONFIG_DRM_SIMPLEDRM.
    
    Signed-off-by: Javier Martinez Canillas <[email protected]>
    Cherry-picked-for: https://bugs.archlinux.org/task/73720
    martinezjavier authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    e81a18c View commit details
    Browse the repository at this point in the history
  3. arch/Kconfig: Default to maximum amount of ASLR bits

    To mitigate https://zolutal.github.io/aslrnt/; do this with a patch to
    avoid having to enable `CONFIG_EXPERT`.
    heftig authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    cf8f76c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d81e943 View commit details
    Browse the repository at this point in the history
  5. drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model

    Add quirk orientation for AYA NEO 2. The name appears without spaces in
    dmi strings. That made it difficult to reuse the 2021 match and the
    display is greater in resolution.
    
    Tested by the JELOS team that has been patching their own kernel for a
    while now and confirmed by users in the AYA NEO and ChimeraOS discord
    servers.
    
    Signed-off-by: Joaquín Ignacio Aramendía <[email protected]>
    Samsagax authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    e449809 View commit details
    Browse the repository at this point in the history
  6. drm: panel-orientation-quirks: Add quirk for AYA NEO Founder edition

    Add quirk orientation for AYA NEO Founder. The name appears with spaces in
    dmi strings as other devices of the brand. The panel is the same as the
    NEXT and 2021 models. Those could not be reused as the former has VENDOR
    name as "AYANEO" without spaces and the latter has "AYADEVICE".
    
    Tested by the JELOS team that has been patching their own kernel for a
    while now and confirmed by users in the AYA NEO and ChimeraOS discord
    servers.
    
    Signed-off-by: Joaquín Ignacio Aramendía <[email protected]>
    Samsagax authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b0a4037 View commit details
    Browse the repository at this point in the history
  7. drm: panel-orientation-quirks: Add quirk for AYA NEO GEEK

    Add quirk orientation for AYA NEO GEEK. One of the more recent devices by
    the brand. The name appears without spaces in dmi strings. The board
    name is completely different to the previous models making it difficult
    to reuse their quirks despite being the same resolution and mounting.
    
    Tested by the JELOS team that has been patching their own kernel for a
    while now and confirmed by users in the AYA NEO and ChimeraOS discord
    servers.
    
    Signed-off-by: Joaquín Ignacio Aramendía <[email protected]>
    Samsagax authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    56ec8d5 View commit details
    Browse the repository at this point in the history
  8. drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero

    Add quirk orientation for the Ayn Loki Zero.
    
    This also has been tested/used by the JELOS team.
    
    Signed-off-by: Bouke Sybren Haarsma <[email protected]>
    BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    5a587d4 View commit details
    Browse the repository at this point in the history
  9. drm: panel-orientation-quirks: Add quirk for Ayn Loki Max

    Add quirk orientation for Ayn Loki Max model.
    
    This has been tested by JELOS team that uses their
    own patched kernel for a while now and confirmed by
    users in the ChimeraOS discord servers.
    
    Signed-off-by: Bouke Sybren Haarsma <[email protected]>
    BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    ee5c6c7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ad8aade View commit details
    Browse the repository at this point in the history
  11. ayaneo 2 headphone fix

    BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    8a01a81 View commit details
    Browse the repository at this point in the history
  12. HACK: add KConfig to enable driver-specific color mgmt props

    We are enabling a large set of color calibration features to enhance KMS
    color mgmt but these properties are specific of AMD display HW, and
    cannot be provided by other vendors. Therefore, set a config option to
    enable AMD driver-private properties used on Steam Deck color mgmt
    pipeline. Replace the agreed name `AMD_PRIVATE_COLOR` with
    our downstream version `CONFIG_DRM_AMD_COLOR_STEAMDECK`.
    
    Signed-off-by: Melissa Wen <[email protected]>
    melissawen authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    9733953 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e75761e View commit details
    Browse the repository at this point in the history
  14. drm: Add GPU reset sysfs event

    This patch adds a new sysfs event, which will indicate
    the userland about a GPU reset, and can also provide
    some information like:
    - process ID of the process involved with the GPU reset
    - process name of the involved process
    - the GPU status info (using flags)
    
    This patch also introduces the first flag of the flags
    bitmap, which can be appended as and when required.
    
    V2: Addressed review comments from Christian and Amar
       - move the reset information structure to DRM layer
       - drop _ctx from struct name
       - make pid 32 bit(than 64)
       - set flag when VRAM invalid (than valid)
       - add process name as well (Amar)
    
    Cc: Alexandar Deucher <[email protected]>
    Cc: Christian Koenig <[email protected]>
    Cc: Amaranath Somalapuram <[email protected]>
    Signed-off-by: Shashank Sharma <[email protected]>
    (cherry picked from commit 90230bd9d9c7d979038547460c9a2cbbeff8d6b9)
    [Forward port to 6.0]
    Signed-off-by: Cristian Ciocaltea <[email protected]>
    contactshashanksharma authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    1bd3d58 View commit details
    Browse the repository at this point in the history
  15. drm/amdgpu: add work function for GPU reset event

    This patch adds a work function, which sends a GPU reset
    uevent and some contextual infomration, like the PID and
    some status flags. This work should be scheduled during
    a GPU reset.
    
    The userspace can do some recovery and post-processing work
    based on this event and information.
    
    V2: Addressed review comments from Christian
    - Changed the name of the work to gpu_reset_event_work
    - Added a structure to accommodate some additional information
      (like a PID and some flags)
    - Do not add new structure in amdgpu.h
    
    Cc: Alexander Deucher <[email protected]>
    Cc: Christian Koenig <[email protected]>
    Cc: Amaranath Somalapuram <[email protected]>
    Signed-off-by: Shashank Sharma <[email protected]>
    (cherry picked from commit f63b09e78126f7da67b69409e2cce1d3ab2d7f46)
    [Forward port to 6.0]
    Signed-off-by: Cristian Ciocaltea <[email protected]>
    contactshashanksharma authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    945b74b View commit details
    Browse the repository at this point in the history
  16. drm/amdgpu: schedule GPU reset event work function

    Schedule work function with valid PID, process name,
    and vram lost status during a GPU reset/ recovery.
    
    Signed-off-by: Somalapuram Amaranath <[email protected]>
    (cherry picked from commit 293c019a84c6402b08db9579819b555b01cd613b)
    [Forward ported to 6.0]
    Signed-off-by: Cristian Ciocaltea <[email protected]>
    [Forward ported to 6.9]
    Signed-off-by: Bouke Sybren Haarsma <[email protected]>
    Somalapuram Amaranath authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    a37b55c View commit details
    Browse the repository at this point in the history
  17. oxp-sensors: hwmon: Add OrangePi Neo PWM fan control

    Add OrangePi NEO handheld device. The OrangePi Neo uses different registers
    for PWM manual mode, set PWM, and read fan speed than previous devices. Valid
    PWM input and duty cycle is 1-244, we scale this to 1-155 to maintain
    compatibility with existing userspace tools.
    pastaq authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b756809 View commit details
    Browse the repository at this point in the history
  18. oxp-sensors: hwmon: Add OneXPlayer 2 and OneXFly

    Add OneXPlayer 2 series and OneXFly handhelds. The 2 series uses a new register
    for turbo button takeover. While at it, adjust formatting of some constants and
    reorder all cases alphabetically for consistency. Rename some constants for
    disambiguation.
    pastaq authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    78c8501 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f12bdbb View commit details
    Browse the repository at this point in the history
  20. oxp-sensors: hwmon: Add GPD Win Mini

    Add GPD Win Mini. GPD devices don't have a separate enable register, the PWM
    register is used for this purpose. A write value of 0 puts the PWM into auto
    mode, writing anything 1-244 puts the PWM into manual mode, and 245-255 are
    undefined. We scale to 1-255 and handle manual by writing a value to 70% as a
    common sense default.
    pastaq authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    61740ea View commit details
    Browse the repository at this point in the history
  21. bump the sensitivity of AMD SFH

    Bumps the sensitivity of AMD sfh gyro and accelerometers by removing the division
    operation and rebasing the units in the hid descriptor.
    This helps with the gyro deadzone of the Legion Go. Should not affect existing
    devices.
    antheas authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    cc81de3 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0545e78 View commit details
    Browse the repository at this point in the history
  23. iio: imu: Add driver for Bosch BMI260 IMU

    The ultra-low power BMI260 is an IMU consisting of a 16-bit tri-axial
    gyroscope and a 16-bit tri-axial accelerometer combining precise
    acceleration, angular rate measurement and intelligent on-chip
    motion-triggered interrupt features.
    
    The driver supports the BMI260 over I2C. It is based on the BMI160
    driver, and like that driver supports accelerometer and gyroscope
    reading, as well as data ready interrupts.
    justinweiss authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    acbef60 View commit details
    Browse the repository at this point in the history
  24. Codec: Add aw87xxx codec with partial acpi implementation

    Contribution by CVMagic (https://github.com/CVMagic)
    
    aw87xxx: Use strscpy instead of strlcpy
    
    awinic: i2c_driver cleanup and fixes
    ruineka authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    39dc3ed View commit details
    Browse the repository at this point in the history
  25. Updated AW87xxx driver to be more verbose for debugging purposes, but…

    … also fixed Reset Pin GPIO initialization issue with Ayn Loki Mini
    CVMagic authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    3c361b0 View commit details
    Browse the repository at this point in the history
  26. Updated AW87xxx driver to automatically enumerate a second I2C chip i…

    …f specified in ACPI
    CVMagic authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    a23fb72 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    98c4c31 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    9a3f8a9 View commit details
    Browse the repository at this point in the history
  29. Add Atari VCS quirk

    fewtarius authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b88198e View commit details
    Browse the repository at this point in the history
  30. iio: imu: bmi323: Use iio read_acpi_mount_matrix() helper

    bmi150-accel and bmi323-imu are declared in an almost identical way in the ACPI and in some devices such as the Asus RC71L the "ROTM" property can be found: parse and use the ACPI-defined mount-matrix.
    
    Co-developed-by: Luke D. Jones <[email protected]>
    Co-developed-by: Jonathan LoBue <[email protected]>
    Signed-off-by: Denis Benato <[email protected]>
    NeroReflex authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    584aafc View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    db41c3a View commit details
    Browse the repository at this point in the history
  32. platform/x86: asus-wmi: Add quirk for ROG Ally X

    The new ROG Ally X functions the same as the previus model so we can use
    the same method to ensure the MCU USB devices wake and reconnect
    correctly.
    
    Given that two devices marks the start of a trend, this patch also adds
    a quirk table to make future additions easier if the MCU is the same.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    fdb5899 View commit details
    Browse the repository at this point in the history
  33. Fix ROG ALLY X audio

    Patch to test fixing TAS2781 amp getting bound properly to i2c
    for ASUS ROG ALLY X.
    jlobue10 authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    3b27942 View commit details
    Browse the repository at this point in the history
  34. Add azoth

    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    e65c67c View commit details
    Browse the repository at this point in the history
  35. Input: xpad - add support for ASUS ROG RAIKIRI PRO

    Add the VID/PID for ASUS ROG RAIKIRI PRO to
    xpad_device and the VID to xpad_table.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    bbb6229 View commit details
    Browse the repository at this point in the history
  36. hid-asus: use hid for brightness control on keyboard

    On almost all ASUS ROG series laptops the MCU used for the USB keyboard
    also has a HID packet used for setting the brightness. This is usually
    the same as the WMI method. But in some laptops the WMI method either
    is missing or doesn't work, so we should default to the HID control.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b98a698 View commit details
    Browse the repository at this point in the history
  37. platform/x86: asus-wmi: don't fail if platform_profile already regist…

    …ered
    
    On some newer laptops it appears that an AMD driver can register a
    platform_profile handler. If this happens then the asus_wmi driver would
    error with -EEXIST when trying to register its own handler leaving the
    user with a possibly unusable system - this is especially true for
    laptops with an MCU that emit a stream of HID packets, some of which can
    be misinterpreted as shutdown signals.
    
    We can safely continue loading the driver instead of bombing out.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    e88bc3b View commit details
    Browse the repository at this point in the history
  38. platform/x86: asus-wmi: fix TUF laptop RGB variant

    In kbd_rgb_mode_store the dev_get_drvdata() call was assuming the device
    data was asus_wmi when it was actually led_classdev.
    
    This patch corrects this by making the correct chain of calls to get the
    asus_wmi driver data.
    
    Fixes: ae834a5 ("platform/x86: asus-wmi: add support variant of TUF RGB")
    Tested-by: Denis Benato <[email protected]>
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    096348c View commit details
    Browse the repository at this point in the history
  39. ALSA: hda/realtek: cs35l41: Fixup remaining asus strix models

    Adjust quirks for 0x3a20, 0x3a30, 0x3a50 to match the 0x3a60. This
    set has now been confirmed to work with this patch.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    ca0cc4f View commit details
    Browse the repository at this point in the history
  40. hid-asus: add ROG Ally X prod ID to quirk list

    The new ASUS ROG Ally X functions almost exactly the same as the previous
    model, so we can use the same quirks.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    58be6c2 View commit details
    Browse the repository at this point in the history
  41. platform/x86 asus-armoury: move existing tunings to asus-armoury module

    The fw_attributes_class provides a much cleaner interface to all of the
    attributes introduced to asus-wmi. This patch moves all of these extra
    attributes over to fw_attributes_class, and shifts the bulk of these
    definitions to a new kernel module to reduce the clutter of asus-wmi
    with the intention of deprecating the asus-wmi attributes in future.
    
    The work applies only to WMI methods which don't have a clearly defined
    place within the sysfs and as a result ended up lumped together in
    /sys/devices/platform/asus-nb-wmi/ with no standard API.
    
    Where possible the fw attrs now implement defaults, min, max, scalar,
    choices, etc. As en example dgpu_disable becomes:
    
    /sys/class/firmware-attributes/asus-armoury/attributes/dgpu_disable/
    ├── current_value
    ├── display_name
    ├── possible_values
    └── type
    
    as do other attributes.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    ba7f94b View commit details
    Browse the repository at this point in the history
  42. platform/x86: asus-armoury: add dgpu tgp control

    Implement the dgpu TGP control under the asus-armoury module using the
    fw_attributes class.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    638854b View commit details
    Browse the repository at this point in the history
  43. platform/x86: asus-armoury: add apu-mem control support

    Implement the APU memory size control under the asus-armoury module using
    the fw_attributes class.
    
    This allows the APU allocated memory size to be adjusted depending on
    the users priority. A reboot is required after change.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b71fe51 View commit details
    Browse the repository at this point in the history
  44. platform/x86: asus-armoury: add core count control

    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 <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    b5f169c View commit details
    Browse the repository at this point in the history
  45. asus-wmi: deprecate bios features

    With the existence of the asus-bioscfg module the attributes no-longer
    need to live under the /sys/devices/platform/asus-nb-wmi/ path.
    
    Deprecate all those that were implemented in asus-bioscfg with the goal
    of removing them fully in the next LTS cycle.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    dd25e1d View commit details
    Browse the repository at this point in the history
  46. HID: asus: add ROG Ally xpad settings

    - move ROG specific stuff to new .c
    - add a header for common parts
    - add xpad mode
    - add deadzones
    - add anti-deadzones
    - add gamepad button remapping
    - add gamepad mapping reset for xpad and wasd modes
    - add turbo mode for individual buttons
    - add joystick response curves
    - add vibration intensity settings
    - add calibration setting
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    c13f8b8 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    9f43d14 View commit details
    Browse the repository at this point in the history
  48. hid-asus-ally-x: Basic driver for the ASUS ROG Ally X

    The Ally X has the same MCU as the previous Ally, but ASUS have changed
    how they set up the gamepad in it to use d-input instead of x-input.
    
    This driver sets up the capabilities to match the XBox controllers,
    and implements very basic rumble support.
    
    Signed-off-by: Luke D. Jones <[email protected]>
    flukejones authored and BoukeHaarsma23 committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    245ab97 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    ceba9d0 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. force xhci usb mode on steam deck to workaround firmware bug

    this allows booting on steam deck with external usb devices,
    particularly important for the installer
    endrift authored and alkazar committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    29eb7d7 View commit details
    Browse the repository at this point in the history