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

fixup! drm/asahi: Add the Asahi driver for Apple AGX GPUs #135

Open
wants to merge 562 commits into
base: gpu/rust-wip
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Mar 5, 2023

  1. rust: upgrade to Rust 1.66.0

    Upgrade the Rust version from 1.62.0 to 1.66.0.
    
    The overwhelming majority of the commit is about upgrading our `alloc`
    fork to the new version from upstream [1]. License has not changed [2][3]
    (there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).
    
    As in the previous version upgrades (done out of tree so far), upgrading
    `alloc` requires checking that our small additions (`try_*`) still match
    their original (non`-try_*`) versions.
    
    With this version upgrade, the following unstable Rust features were
    stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
    `core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
    remove them.
    
    This also implies that only two unstable features remain allowed for
    non-`rust/` code: `allocator_api` and `const_refs_to_cell`.
    
    There are some new Clippy warnings that we are triggering (i.e.
    introduced since 1.62.0), as well as a few others that were not
    triggered before, thus allow them in this commit and clean up or
    remove them as needed later on:
    
      - `borrow_deref_ref` (new in 1.63.0).
      - `explicit_auto_deref` (new in 1.64.0).
      - `bool_to_int_with_if` (new in 1.65.0).
      - `needless_borrow`.
      - `type_complexity`.
      - `unnecessary_cast` (allowed only on `CONFIG_ARM`).
    
    Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
    links pointing to `macro_export` `macro_rules` defined in the same
    module (i.e. appearing in the crate root).
    
    However, even if the warning appears, the link still gets generated
    like in previous versions, thus it is a bit confusing. An issue has
    been opened upstream [4], and it appears that the link still being
    generated was a compatibility measure, thus we will need to adapt
    to the new behavior (done in the next patch).
    
    In addition, there is an added `#[const_trait]` attribute in
    `RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
    for `impl const Trait`") [5].
    
    Finally, the `-Aunused-imports` was added for compiling `core`. This was
    fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
    with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
    in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].
    
    Reviewed-by: Björn Roy Baron <[email protected]>
    Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
    Tested-by: Martin Rodriguez Reboredo <[email protected]>
    Reviewed-by: Gary Guo <[email protected]>
    Reviewed-by: Vincenzo Palazzo <[email protected]>
    Reviewed-by: Alice Ferrazzi <[email protected]>
    Tested-by: Alice Ferrazzi <[email protected]>
    Reviewed-by: Neal Gompa <[email protected]>
    Tested-by: Neal Gompa <[email protected]>
    Link: Rust-for-Linux#947
    Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
    Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
    Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
    Link: rust-lang/rust#106142 [4]
    Link: rust-lang/rust#100982 [5]
    Link: rust-lang/rust#105434 [6]
    Link: rust-lang/rust#105811 [7]
    Signed-off-by: Miguel Ojeda <[email protected]>
    ojeda authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    741f89a View commit details
    Browse the repository at this point in the history
  2. *RFL import: kernel::sync::rcu

    Commit reference: 3dfc5eb
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    cb96da1 View commit details
    Browse the repository at this point in the history
  3. *RFL import: kernel::revocable

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    1680c04 View commit details
    Browse the repository at this point in the history
  4. rust: Add name argument to Module::init()

    Co-developed-by: Wedson Almeida Filho <[email protected]>
    Signed-off-by: Wedson Almeida Filho <[email protected]>
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    e9b288d View commit details
    Browse the repository at this point in the history
  5. *RFL import: kernel::driver

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    1f29957 View commit details
    Browse the repository at this point in the history
  6. *RFL import: The rest of kernel::device (minus clk stuff)

    Commit reference: 3dfc5eb
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    b6d48ba View commit details
    Browse the repository at this point in the history
  7. *RFL import: kernel::io_mem

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    43effe0 View commit details
    Browse the repository at this point in the history
  8. *RFL import: kernel::of

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    873202f View commit details
    Browse the repository at this point in the history
  9. *RFL import: kernel::platform

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    5cbe984 View commit details
    Browse the repository at this point in the history
  10. *RFL import: kernel::delay

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    86fe42d View commit details
    Browse the repository at this point in the history
  11. rust: of: Add OF node abstraction

    This abstraction enables Rust drivers to walk Device Tree nodes and
    query their properties.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    578c008 View commit details
    Browse the repository at this point in the history
  12. rust: driver,of: Support passing ID tables to modpost for alias gener…

    …ation
    
    In order for modpost to work and correctly generate module aliases from
    device ID tables, it needs those tables to exist as global symbols with
    a specific name. Additionally, modpost checks the size of the symbol, so
    it cannot contain trailing data.
    
    To support this, split IdArrayIds out of IdArray. The former contains
    just the IDs. Then split out the device table definition macro from the
    macro that defines the device table for a given bus driver, and add
    another macro to declare a device table as a module device table.
    Drivers can now define their ID table once, and then specify that it
    should be used for both the driver and the module:
    
    // Generic OF Device ID table.
    kernel::define_of_id_table! {ASAHI_ID_TABLE, &'static hw::HwConfig, [
        (of::DeviceId::Compatible(b"apple,agx-t8103"), Some(&hw::t8103::HWCONFIG)),
        (of::DeviceId::Compatible(b"apple,agx-t8112"), Some(&hw::t8112::HWCONFIG)),
        // ...
    ]}
    
    /// Platform Driver implementation for `AsahiDriver`.
    impl platform::Driver for AsahiDriver {
        /// Data associated with each hardware ID.
        type IdInfo = &'static hw::HwConfig;
    
        // Assign the above OF ID table to this driver.
        kernel::driver_of_id_table!(ASAHI_ID_TABLE);
    
        // ...
    }
    
    // Export the OF ID table as a module ID table, to make modpost/autoloading work.
    kernel::module_of_id_table!(MOD_TABLE, ASAHI_ID_TABLE);
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    49d7a5a View commit details
    Browse the repository at this point in the history
  13. rust: platform: add ioremap_resource and get_resource methods

    This patch adds a logic similar to `devm_platform_ioremap_resource`
    function adding:
      - `IoResource` enumerated type that groups the `IORESOURCE_*` macros.
      - `get_resource()` method that is a binding of `platform_get_resource`
      - `ioremap_resource` that is newly written method similar to
        `devm_platform_ioremap_resource`.
    
    Lina: Removed `bit` dependency and rebased
    
    Co-developed-by: Asahi Lina <[email protected]>
    Signed-off-by: Maciej Falkowski <[email protected]>
    Maciej Falkowski authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    2a61320 View commit details
    Browse the repository at this point in the history
  14. rust: kernel: platform: Add Device.set_dma_masks()

    Allows drivers to configure the DMA masks for a device. Implemented
    here, not in device, because it requires a mutable platform device
    reference this way (device::Device is a safely clonable reference).
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    694fb97 View commit details
    Browse the repository at this point in the history
  15. rust: Add ioremap_np support to io_mem & friends

    Apple SoCs require non-posted mappings for MMIO, and this is
    automatically handled by devm_ioremap_resource() and friends via a
    resource flag. Implement the same logic in kernel::io_mem, so it can
    work the same way.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    5e5260b View commit details
    Browse the repository at this point in the history
  16. *RFL import: macros::module params functionality & deps

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    609c338 View commit details
    Browse the repository at this point in the history
  17. *RFL import: Rest of kernel::error::code::*

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    2e38894 View commit details
    Browse the repository at this point in the history
  18. rust: bindings: Add resource_size wrapper

    TODO: This isn't abstracted properly yet
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    d5870ca View commit details
    Browse the repository at this point in the history
  19. rust: Allow feature new_uninit

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    3f7ae71 View commit details
    Browse the repository at this point in the history
  20. rust: Allow feature allocator_api

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    bb0c93f View commit details
    Browse the repository at this point in the history
  21. *RFL import: kernel::KParamGuard & friends

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    ea83867 View commit details
    Browse the repository at this point in the history
  22. *RFL import: kernel::error::Error Debug impl & dependencies

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    507c7a1 View commit details
    Browse the repository at this point in the history
  23. *RFL import: kernel::sync::smutex

    Commit reference: 3dfc5eb
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    ad5770d View commit details
    Browse the repository at this point in the history
  24. iommu/io-pgtable: Add Apple UAT variant format

    Apple Silicon SoCs (M1, M2, etc.) have a GPU with an ARM64 firmware
    coprocessor. The firmware and the GPU share page tables in the standard
    ARM64 format (the firmware literally sets the base as its TTBR0/1
    registers). TTBR0 covers the low half of the address space and is
    intended to be per-GPU-VM (GPU user mappings and kernel-managed
    buffers), while TTBR1 covers the upper half and is global (firmware
    code, data, management structures shared with the AP, and a few
    GPU-accessible data structures).
    
    In typical Apple fashion, the permissions are interpreted differently
    from traditional ARM PTEs. By default, firmware mappings use Apple SPRR
    permission remapping. The firmware only uses that for its own
    code/data/MMIO mappings, and those pages are not accessible by the GPU
    hardware. We never need to touch/manage these mappings, so this patch
    does not support them.
    
    When a specific bit is set in the PTEs, permissions switch to a
    different scheme which supports various combinations of firmware/GPU
    access. This is the mode intended to be used by AP GPU drivers, and what
    we implement here.
    
    The prot bits are interpreted as follows:
    
    - IOMMU_READ and IOMMU_WRITE have the usual meaning.
    
    - IOMMU_PRIV creates firmware-only mappings (no GPU access)
    - IOMMU_NOEXEC creates GPU-only structures (no FW access)
    - Otherwise structures are accessible by both GPU and FW
    
    - IOMMU_MMIO creates Device mappings for firmware
    - IOMMU_CACHE creates Normal-NC mappings for firmware (cache-coherent
      from the point of view of the AP, but slower)
    - Otherwise creates Normal mappings for firmware (this requires manual
      cache management on the firmware side, as it is not coherent with the
      SoC fabric)
    
    GPU-only mappings (textures/etc) are expected to use IOMMU_CACHE and are
    seemingly coherent with the CPU (or otherwise the firmware/GPU already
    issue the required cache management operations when correctly
    configured).
    
    There is a GPU-RO/FW-RW mode, but it is not currently implemented (it
    doesn't seem to be very useful for the driver). There seems to be no
    real noexec control (i.e. for shaders) on the GPU side. All of these
    mappings are implicitly noexec for the firmware.
    
    Drivers are expected to fully manage per-user (TTBR0) page tables, but
    ownership of shared kernel (TTBR1) page tables is shared between the
    firmware and the AP OS. We handle this by simply using a smaller IAS to
    drop down one level of page tables, so the driver can install a PTE in
    the top-level (firmware-initialized) page table directly and just add an
    offset to the VAs passed into the io_pgtable code. This avoids having to
    have any special handling for this here. The firmware-relevant data
    structures are small, so we do not expect to ever require more VA space
    than one top-level PTE covers (IAS=36 for the next level, 64 GiB).
    
    Only 16K page mode is supported. The coprocessor MMU supports huge pages
    as usual for ARM64, but the GPU MMU does not, so we do not enable them.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    0603bcf View commit details
    Browse the repository at this point in the history
  25. rust: io_pgtable: Add the Apple UAT format abstraction

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    1ac44e8 View commit details
    Browse the repository at this point in the history
  26. rust: drm: ioctl: Add DRM ioctl abstraction

    DRM drivers need to be able to declare which driver-specific ioctls they
    support. This abstraction adds the required types and a helper macro to
    generate the ioctl definition inside the DRM driver.
    
    Note that this macro is not usable until further bits of the
    abstraction are in place (but it will not fail to compile on its own, if
    not called).
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    da4086c View commit details
    Browse the repository at this point in the history
  27. rust: drm: Add Device and Driver abstractions

    Add the initial abstractions for DRM drivers and devices. These go
    together in one commit since they are fairly tightly coupled types.
    
    A few things have been stubbed out, to be implemented as further bits of
    the DRM subsystem are introduced.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    b6f2408 View commit details
    Browse the repository at this point in the history
  28. rust: drm: file: Add File abstraction

    A DRM File is the DRM counterpart to a kernel file structure,
    representing an open DRM file descriptor. Add a Rust abstraction to
    allow drivers to implement their own File types that implement the
    DriverFile trait.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    558123b View commit details
    Browse the repository at this point in the history
  29. rust: drm: gem: Add GEM object abstraction

    The DRM GEM subsystem is the DRM memory management subsystem used by
    most modern drivers. Add a Rust abstraction to allow Rust DRM driver
    implementations to use it.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    2fd9d65 View commit details
    Browse the repository at this point in the history
  30. drm/gem-shmem: Export VM ops functions

    There doesn't seem to be a way for the Rust bindings to get a
    compile-time constant reference to drm_gem_shmem_vm_ops, so we need to
    duplicate that structure in Rust... this isn't nice...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    02c2e41 View commit details
    Browse the repository at this point in the history
  31. rust: drm: gem: shmem: Add DRM shmem helper abstraction

    The DRM shmem helper includes common code useful for drivers which
    allocate GEM objects as anonymous shmem. Add a Rust abstraction for
    this. Drivers can choose the raw GEM implementation or the shmem layer,
    depending on their needs.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    73bd5e1 View commit details
    Browse the repository at this point in the history
  32. rust: drm: mm: Add DRM MM Range Allocator abstraction

    drm_mm provides a simple range allocator, useful for managing virtual
    address ranges. Add a Rust abstraction to expose this module to Rust
    drivers.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    b9b7883 View commit details
    Browse the repository at this point in the history
  33. rust: dma_fence: Add DMA Fence abstraction

    DMA fences are the internal synchronization primitive used for DMA
    operations like GPU rendering, video en/decoding, etc. Add an
    abstraction to allow Rust drivers to interact with this subsystem.
    
    Note: This uses a raw spinlock living next to the fence, since we do
    not interact with it other than for initialization.
    TODO: Expose this to the user at some point with a safe abstraction.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    4d2c649 View commit details
    Browse the repository at this point in the history
  34. rust: drm: syncobj: Add DRM Sync Object abstraction

    DRM Sync Objects are a container for a DMA fence, and can be waited on
    signaled, exported, and imported from userspace. Add a Rust abstraction
    so Rust DRM drivers can support this functionality.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    85ccad9 View commit details
    Browse the repository at this point in the history
  35. drm/sched: Add can_run_job callback

    Some hardware may require more complex resource utilization accounting
    than the simple job count supported by drm_sched internally. Add a
    can_run_job callback to allow drivers to implement more logic before
    deciding whether to run a GPU job.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    c8ea6d4 View commit details
    Browse the repository at this point in the history
  36. rust: drm: sched: Add GPU scheduler abstraction

    The GPU scheduler manages scheduling GPU jobs and dependencies between
    them. This Rust abstraction allows Rust DRM drivers to use this
    functionality.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    e38bda4 View commit details
    Browse the repository at this point in the history
  37. drm/gem: Add a flag to control whether objects can be exported

    Drivers may want to support driver-private objects, which cannot be
    shared. This allows them to share a single lock and enables other
    optimizations.
    
    Add an `exportable` field to drm_gem_object, which blocks PRIME export
    if set to false. It is initialized to true in
    drm_gem_private_object_init.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    6781661 View commit details
    Browse the repository at this point in the history
  38. rust: drm: gem: Add set_exportable() method

    This allows drivers to control whether a given GEM object is allowed to
    be exported via PRIME to other drivers.
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    66fee7f View commit details
    Browse the repository at this point in the history
  39. drm/asahi: Add the Asahi driver UAPI

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    020a96a View commit details
    Browse the repository at this point in the history
  40. rust: bindings: Bind the Asahi DRM UAPI

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    cec0bcb View commit details
    Browse the repository at this point in the history
  41. rust: macros: Add versions macro

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    be7a692 View commit details
    Browse the repository at this point in the history
  42. drm/asahi: Add the Asahi driver for Apple AGX GPUs

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    9060476 View commit details
    Browse the repository at this point in the history
  43. drm/asahi: buffer: Add stats methods

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    a82420d View commit details
    Browse the repository at this point in the history
  44. drm/asahi: render: Fix timestamp mixup

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    d9f4243 View commit details
    Browse the repository at this point in the history
  45. drm/asahi: UAPI: Add result/statistics UAPI

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    c3bd230 View commit details
    Browse the repository at this point in the history
  46. drm/asahi: workqueue: Add conversion to UAPI status struct

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    06e7fef View commit details
    Browse the repository at this point in the history
  47. drm/asahi: Implement command feedback/statistics

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    72c6c67 View commit details
    Browse the repository at this point in the history
  48. drm/asahi: Convert timeouts to faults if fault info is available

    Most faults seem to be reported as what I call timeouts anyway.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    06e3bc7 View commit details
    Browse the repository at this point in the history
  49. drm/asahi: Skip timestamp commands if there is no result BO

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    73a016c View commit details
    Browse the repository at this point in the history
  50. drm/asahi: Reject submissions with zero commands

    This does not work and isn't intended to work. While trivial submissions
    like this are valid in Vulkan, Mesa should lower it to waiting on the
    last valid syncobj instead, since it doesn't make any sense at the
    firmware level.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    f79b612 View commit details
    Browse the repository at this point in the history
  51. drm/asahi: queue: Add more debugging IDs

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    864581d View commit details
    Browse the repository at this point in the history
  52. drm/asahi: render: Always flush stamps on both vertex & frag

    They could complete in either order, and not forcing flushes on both can
    leave us with stuck stamps...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    522756e View commit details
    Browse the repository at this point in the history
  53. drm/apple: simplify IOMFB_THUNK_INOUT

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 5, 2023
    Configuration menu
    Copy the full SHA
    81de906 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. dt-bindings: power: apple,pmgr-pwrstate: Add t8112 compatible

    Add the apple,t8112-pmgr-pwrstate compatible for the Apple M2 SoC.
    
    This goes after t8103. The sort order logic here is having SoC numeric
    code families in release order, and SoCs within each family in release
    order:
    
    - t8xxx (Apple HxxP/G series, "phone"/"tablet" chips)
      - t8103 (Apple H13G/M1)
      - t8112 (Apple H14G/M2)
    - t6xxx (Apple HxxJ series, "desktop" chips)
      - t6000 (Apple H13J(S)/M1 Pro)
      - t6001 (Apple H13J(C)/M1 Max)
      - t6002 (Apple H13J(D)/M1 Ultra)
    
    Note that t600[0-2] share the t6000 compatible where the hardware is
    100% compatible, which is usually the case in this highly related set
    of SoCs.
    
    Signed-off-by: Hector Martin <[email protected]>
    Reviewed-by: Janne Grunau <[email protected]>
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    marcan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    7f46467 View commit details
    Browse the repository at this point in the history
  2. dt-bindings: arm: apple: apple,pmgr: Add t8112-pmgr compatible

    The block on Apple M2 SoCs is compatible with the existing driver so
    just add its per-SoC compatible.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    0af5e4f View commit details
    Browse the repository at this point in the history
  3. dt-bindings: watchdog: apple,wdt: Add t8112-wdt compatible

    The block on the Apple M2 SoC is compatible with the existing driver so
    add its per-SoC compatible.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    a2e7532 View commit details
    Browse the repository at this point in the history
  4. dt-bindings: arm: cpus: Add apple,avalanche & blizzard compatibles

    These are the CPU cores in the Apple silicon M2 SoC.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    bb5949c View commit details
    Browse the repository at this point in the history
  5. dt-bindings: interrupt-controller: apple,aic2: Add apple,t8112-aic co…

    …mpatible
    
    The Apple M2 SoC uses AICv2 and is compatible with the existing driver.
    Add its per-SoC compatible.
    Since multi-die versions of the M2 are not expected decrease
    '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled
    inside the driver.
    
    Acked-by: Marc Zyngier <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    1b294cd View commit details
    Browse the repository at this point in the history
  6. dt-bindings: iommu: apple,sart: Add apple,t8112-sart compatible string

    "apple,t8112-sart" as found on the Apple M2 SoC appears to be SART3 as
    well. To allow for later discovered incompatibilities use
    '"apple,t8112-sart", "apple,t6000-sart"' as compatible string.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    cd3d306 View commit details
    Browse the repository at this point in the history
  7. dt-bindings: mailbox: apple,mailbox: Add t8112 compatibles

    The mailbox hardware remains unchanged on M2 SoCs so just add its
    per-SoC compatible.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    3fa77f3 View commit details
    Browse the repository at this point in the history
  8. dt-bindings: nvme: apple: Add apple,t8112-nvme-ans2 compatible string

    "apple,t8112-nvme-ans2" as found on Apple M2 SoCs is compatible with the
    existing driver. Add its SoC specific compatible string to allow special
    handling if it'll be necessary.
    t8112 uses only 2 power-domains as no 4 and 8 TB configurations are
    offered.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    dc3fd5f View commit details
    Browse the repository at this point in the history
  9. dt-bindings: pci: apple,pcie: Add t8112 support

    The block found in the Apple M2 SoC is compatible with the existing
    driver, and supports 4 downstream ports like the t6000 one.
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    3130f20 View commit details
    Browse the repository at this point in the history
  10. dt-bindings: pinctrl: apple,pinctrl: Add apple,t8112-pinctrl compatible

    This new SoC uses the same pinctrl hardware, so just add a new per-SoC
    compatible.
    
    Reviewed-by: Linus Walleij <[email protected]>
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    c957acd View commit details
    Browse the repository at this point in the history
  11. dt-bindings: i2c: apple,i2c: Add apple,t8112-i2c compatible

    This block on the Apple M2 is compatible with the existing driver so
    just add the per-SoC compatible.
    
    Acked-by: Wolfram Sang <[email protected]> # for I2C
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    4d7dea2 View commit details
    Browse the repository at this point in the history
  12. dt-bindings: clock: apple,nco: Add t8112-nco compatible

    The block found on Apple's M2 SoC is compatible with the existing driver
    so add its per-SoC compatible.
    
    Acked-by: Martin Povišer <[email protected]>
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    a193595 View commit details
    Browse the repository at this point in the history
  13. dt-bindings: dma: apple,admac: Add t8112-admac compatible

    The block found on Apple's M2 SoC is compatible with the existing driver
    so add its per-SoC compatible.
    
    Acked-by: Vinod Koul <[email protected]>
    Acked-by: Martin Povišer <[email protected]>
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    3ce4585 View commit details
    Browse the repository at this point in the history
  14. dt-bindings: arm: apple: Add t8112 j413/j473/j493 compatibles

    This adds the following apple,t8112 platforms:
    
    - apple,j413 - MacBook Air (M2, 2022)
    - apple,j473 - Mac mini (M2, 2023)
    - apple,j493 - MacBook Pro (13-inch, M2, 2022)
    
    The sort order logic here is having SoC numeric code families in release
    order, and SoCs within each family in release order:
    
    - t8xxx (Apple HxxP/G series, "phone"/"tablet" chips)
      - t8103 (Apple H13G/M1)
      - t8112 (Apple H14G/M2)
    - t6xxx (Apple HxxJ series, "desktop" chips)
      - t6000 (Apple H13J(S)/M1 Pro)
      - t6001 (Apple H13J(C)/M1 Max)
      - t6002 (Apple H13J(D)/M1 Ultra)
    
    Acked-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    2bd1339 View commit details
    Browse the repository at this point in the history
  15. arm64: dts: apple: t8112: Initial t8112 (M2) device trees

    This adds device trees for the following devices:
     - Macbook Air (M2, 2022)
     - Macbook Pro 13" (M2, 2022)
     - Mac mini (M2, 2023)
    
    This brings the hardware support of the machines to the same level as M1
    and M1 Pro / Max / Ultra. Supported hardware include NVMe, PCIe, serial,
    pinctrl/gpio, I2C, iommu, watchdog, admac, nco, cpufreq, boot
    framebuffer for laptop panels and the interrupt controller.
    
    The ethernet LAN device on the M2 Mac mini is the only working PCIe
    device. The Wlan/BT devices are powered off and controlled by the not
    yet supported SMC. The ASMedia xHCI on the M2 Mac mini requires firmware
    to be loaded at startup.
    
    The main missing hardware support to make these devices useful are the
    integrated USB 2/3/4 controller, keyboard and trackpad on the laptops
    and SMC to power the PCIe Wlan/BT device on.
    The M2 Mac mini has currently no working display output. Due to changes
    in the display pipeline it is currently not possible to initialize the
    HDMI output in the bootloader.
    
    Signed-off-by: Hector Martin <[email protected]>
    Co-developed-by: Janne Grunau <[email protected]>
    Reviewed-by: Sven Peter <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    marcan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    589d5c5 View commit details
    Browse the repository at this point in the history
  16. arm64: dts: apple: t8103: Disable unused PCIe ports

    The PCIe ports are unused (without devices) so disable them instead of
    removing them.
    
    Fixes: 7c77ab9 ("arm64: dts: apple: Add missing M1 (t8103) devices")
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    8e65775 View commit details
    Browse the repository at this point in the history
  17. arm64: dts: apple: t600x: Disable unused PCIe ports

    The PCIe ports are unused (without devices) so disable them instead of
    removing them.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    51b6df5 View commit details
    Browse the repository at this point in the history
  18. arm64: dts: apple: t8112: Add wlan/bt PCIe device nodes

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    9a0e5ab View commit details
    Browse the repository at this point in the history
  19. arm64: dts: apple: t8112: Add PMU NVMEM and SMC RTC/reboot nodes

    Signed-off-by: Hector Martin <[email protected]>
    marcan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    d527fd2 View commit details
    Browse the repository at this point in the history
  20. arm64: dts: apple: t8112-j493: Add spi3 node

    Used for the touchbar, clock frequency is probably wrong.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    c946704 View commit details
    Browse the repository at this point in the history
  21. arm64: dts: apple: t8112: Add SMC node to devicetree

    Signed-off-by: Hector Martin <[email protected]>
    marcan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    8c11fc0 View commit details
    Browse the repository at this point in the history
  22. arm64: dts: apple: t8112*: Put in audio nodes

    Signed-off-by: Martin Povišer <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    povik authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    3dd8662 View commit details
    Browse the repository at this point in the history
  23. arm64: dts: apple: t8112: Add dwc3 nodes

    Signed-off-by: Hector Martin <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    f896a52 View commit details
    Browse the repository at this point in the history
  24. arm64: dts: apple: Add backlight node to j413/j493

    It can be turned off with:
    
    echo 1 > /sys/class/backlight/backlight/bl_power
    
    It can be turned on with:
    
    echo 0 > /sys/class/backlight/backlight/bl_power
    
    Needs CONFIG_BACKLIGHT_GPIO=m.
    
    Signed-off-by: Thomas Glanzmann <[email protected]>
    Signed-off-by: Janne Grunau <[email protected]>
    sithglan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    72d4d52 View commit details
    Browse the repository at this point in the history
  25. arm64: dts: apple: t8112: Add mtp device nodes for j413/j493

    Those provide trackpad and keyboard for j413/j493.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    99cb2d0 View commit details
    Browse the repository at this point in the history
  26. arm64: dts: apple: t8103: Add dwc3 nodes

    Signed-off-by: Hector Martin <[email protected]>
    marcan authored and jannau committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    ceb486b View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. dmaengine: apple-admac: Handle 'global' interrupt flags

    In addition to TX channel and RX channel interrupt flags there's
    another class of 'global' interrupt flags with unknown semantics. Those
    weren't being handled up to now, and they are the suspected cause of
    stuck IRQ states that have been sporadically occurring. Check the global
    flags and clear them if raised.
    
    Fixes: b127315 ("dmaengine: apple-admac: Add Apple ADMAC driver")
    Signed-off-by: Martin Povišer <[email protected]>
    povik authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    dbe87a0 View commit details
    Browse the repository at this point in the history
  2. drm/apple: Fix parse_string() memory leaks

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    ebd3bf0 View commit details
    Browse the repository at this point in the history
  3. drm/apple: Fix bad error return

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    d00883f View commit details
    Browse the repository at this point in the history
  4. drm/apple: Set backlight level indirectly if no mode is set

    Fixes following warning when systemd-backlight restores the backlight
    level on boot before a mode is set:
    
    Call trace:
      drm_atomic_helper_crtc_duplicate_state+0x58/0x74
      drm_atomic_get_crtc_state+0x84/0x120
      dcp_set_brightness+0xd8/0x21c [apple_dcp]
      backlight_device_set_brightness+0x78/0x130
      ...
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    ee6bfa7 View commit details
    Browse the repository at this point in the history
  5. drm/apple: Use backlight_get_brightness()

    Backlight drivers are expected to use this instead of accessing
    backlight properties.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    e4c2f4d View commit details
    Browse the repository at this point in the history
  6. fixup! PCI: apple: Probe all GPIOs for availability first

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    aad9b06 View commit details
    Browse the repository at this point in the history
  7. PCI: apple: Set only available ports up

    Fixes "interrupt-map" parsing in of_irq_parse_raw() which takes the
    node's availability into account.
    
    This became apparent after disabling unused PCIe ports in the Apple
    silicon device trees instead of disabling them.
    
    Link: https://lore.kernel.org/asahi/20230214-apple_dts_pcie_disable_unused-v1-0-5ea0d3ddcde3@jannau.net/
    Link: https://lore.kernel.org/asahi/[email protected]/
    Fixes: 1e33888 ("PCI: apple: Add initial hardware bring-up")
    Cc: [email protected]
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    d57163d View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2023

  1. arm64: dts: apple: t8103: Add spi3/keyboard nodes

    Enables keyboard and touchpad input on MacBook Air (M1, 2020) and
    MacBook Pro (13-inch, M1, 2020).
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    91ff0ab View commit details
    Browse the repository at this point in the history
  2. arm64: dts: apple: Add PCI power enable GPIOs

    t8103:
    - WLAN (SMC PMU GPIO torvalds#13)
    t600x:
    - WLAN (SMC PMU GPIO torvalds#13)
    - SD (SMC PMU GPIO torvalds#26)
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5551408 View commit details
    Browse the repository at this point in the history
  3. arm64: dts: apple: Add SMC node to t8103/t6001 devicetrees

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    2c8716b View commit details
    Browse the repository at this point in the history
  4. arm64: dts: apple: Add PMU NVMEM and SMC RTC/reboot nodes

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    a0ba52f View commit details
    Browse the repository at this point in the history
  5. arm64: dts: apple: Mark ATC USB AON domains as always-on

    Shutting these down breaks dwc3 init done by the firmware. We probably
    never want to do this anyway. It might be possible remove this once
    a PHY driver is in place to do the init properly, but it may not be
    worth it.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    0490bf8 View commit details
    Browse the repository at this point in the history
  6. arm64: dts: apple: Add backlight node to j293/j313

    It can be turned off with:
    
    echo 1 > /sys/class/backlight/backlight/bl_power
    
    It can be turned on with:
    
    echo 0 > /sys/class/backlight/backlight/bl_power
    
    Needs CONFIG_BACKLIGHT_GPIO=m.
    
    Signed-off-by: Thomas Glanzmann <[email protected]>
    sithglan authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    9d781a9 View commit details
    Browse the repository at this point in the history
  7. arm64: dts: apple: Keep PCIe power domain on

    This causes flakiness if shut down; don't do it until we find out
    what's going on.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    4ccc904 View commit details
    Browse the repository at this point in the history
  8. arm64: dts: apple: Add SMC node to t600x devicetrees

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    9f7cba8 View commit details
    Browse the repository at this point in the history
  9. arm64: dts: apple: Add PMU NVMEM and SMC RTC/reboot nodes

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    ecc0d1a View commit details
    Browse the repository at this point in the history
  10. arm64: dts: apple: t6000: Add spi1 node

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    460f079 View commit details
    Browse the repository at this point in the history
  11. arm64: dts: apple: t600x-j314-j316: Add NOR flash node

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    995677b View commit details
    Browse the repository at this point in the history
  12. arm64: dts: apple: t600x: Add spi3 node

    Used for keyboard and touchpad input on MacBook Pro (14/16-inch,
    M1 Pro/Max, 2021).
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    3b0e372 View commit details
    Browse the repository at this point in the history
  13. arm64: dts: apple: j31[46]: Add keyboard nodes

    Enables keyboard and touchpad input on MacBook Pro (14/16-inch,
    M1 Pro/Max, 2021).
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    0a4367f View commit details
    Browse the repository at this point in the history
  14. arm64: dts: apple: t600x: Add dwc3 nodes

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    f0dbdd6 View commit details
    Browse the repository at this point in the history
  15. arm64: dts: apple: Add WiFi module and antenna properties

    Add the new module-instance/antenna-sku properties required to select
    WiFi firmwares properly to all board device trees.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5ec8b5f View commit details
    Browse the repository at this point in the history
  16. arm64: dts: apple: Add PCI power enable GPIOs

    t8103:
    - WLAN (SMC PMU GPIO torvalds#13)
    t600x:
    - WLAN (SMC PMU GPIO torvalds#13)
    - SD (SMC PMU GPIO torvalds#26)
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    9088d67 View commit details
    Browse the repository at this point in the history
  17. arm64: dts: apple: Add backlight node to j314/j316

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    8129fba View commit details
    Browse the repository at this point in the history
  18. arm64: dts: apple: t8103: Fix spi4 power domain sort order

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    487043d View commit details
    Browse the repository at this point in the history
  19. arm64: dts: apple: t600x: Add bluetooth device trees

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    2df967f View commit details
    Browse the repository at this point in the history
  20. arm64: dts: apple: t8103*: Put in audio nodes

    Signed-off-by: Martin Povišer <[email protected]>
    povik authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    1a63ba8 View commit details
    Browse the repository at this point in the history
  21. arm64: dts: apple: t600x-jxxx: Put in audio nodes

    Signed-off-by: Martin Povišer <[email protected]>
    povik authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    35224a4 View commit details
    Browse the repository at this point in the history
  22. arm64: dts: apple: Drop 'integrated audio' from sound models

    Even though my preference would be to keep it in, the long name crops in
    a bunch of places and the verbiage at the end needs to go.
    
    Signed-off-by: Martin Povišer <[email protected]>
    povik authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    8d5362c View commit details
    Browse the repository at this point in the history
  23. arm64: dts: apple: t6001-j375c: Add USB3 hub GPIO initialization

    The Mac Studio M1 Max (t6001) model has a built-in USB3 hub. This hub
    has a firmware flash which is also connected to an AP SPI controller.
    The hub starts out in reset and the host is expected to bring it out of
    reset, potentially after upgrading/validating the firmware.
    
    We won't be doing anything with the firmware, so just use gpio-hog to
    flip the two GPIOs needed to bring up the hub chip.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    809653e View commit details
    Browse the repository at this point in the history
  24. arch: arm64: apple: Add missing power state deps for display

    The dcp co-processor crashes on HDMI unplug while it apparently tries
    to notify pmp. Handle "notify_pmp" as a parent dependency for
    "ps_disp0_fe" and "ps_dispext_fe".
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    260d191 View commit details
    Browse the repository at this point in the history
  25. arch: arm64: apple: t600x: Mark USB and PCIe as "dma-coherent"

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    011652e View commit details
    Browse the repository at this point in the history
  26. arch: arm64: apple: Add display controller related device tree nodes

    The display system is initialized by the bootloader to provide a simple
    framebuffer at startup. Memory for the framebuffer and heap for the
    display co-processor are alreay mapped through the IOMMU. IOMMU
    intialization must preserve this mappings to avoid crashing the display
    co-processor. The exisitng mappings are caried in the devicetree. They
    are applied during device attach to ensure the IOMMU framework is aware
    of these mapping.
    
    Mappings are filled by m1n1 during boot.
    
    Based on https://lore.kernel.org/asahi/[email protected]
    
    Signed-off-by: Janne Grunau <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    719a17d View commit details
    Browse the repository at this point in the history
  27. arch: arm64: apple: t600x: Add display controller related device tree…

    … nodes
    
    The display system is initialized by the bootloader to provide a simple
    framebuffer at startup. Memory for the framebuffer and heap for the
    display co-processor are alreay mapped through the IOMMU. IOMMU
    intialization must preserve this mappings to avoid crashing the display
    co-processor. The exisitng mappings are caried in the devicetree. They
    are applied during device attach to ensure the IOMMU framework is aware
    of these mapping.
    
    Mappings are filled by m1n1 during boot.
    
    Based on https://lore.kernel.org/asahi/[email protected]
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5937bf3 View commit details
    Browse the repository at this point in the history
  28. arch: arm64: apple: t8103: Add connector type property for DCP*

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    32ccda0 View commit details
    Browse the repository at this point in the history
  29. arch: arm64: apple: t600x: Add connector type property for DCP*

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    6b2fbba View commit details
    Browse the repository at this point in the history
  30. arm64: dts: apple: t8103: Add PWM controller

    Adds PWM controller and keyboard backlight bindings for M1 MacBooks
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    2b62347 View commit details
    Browse the repository at this point in the history
  31. arm64: dts: apple: t8112: Add PWM controller

    Adds PWM controller and keyboard backlight bindings for M2 MacBooks
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    e031b5d View commit details
    Browse the repository at this point in the history
  32. arm64: dts: apple: t600x: Add PWM controller

    Adds PWM controller and keyboard backlight bindings for M1 Pro/Max MacBook Pros
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    b764ebb View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    5838d87 View commit details
    Browse the repository at this point in the history
  34. arm64: dts: apple: t8103: Add ATCPHY node

    Signed-off-by: Sven Peter <[email protected]>
    svenpeter42 authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5ab2e1e View commit details
    Browse the repository at this point in the history
  35. arch: arm64: dts: apple: t6000: Add eFuses node

    Signed-off-by: R <[email protected]>
    ArcaneNibble authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    83b78a2 View commit details
    Browse the repository at this point in the history
  36. arch: arm64: dts: apple: t600x: Add ATCPHY nodes

    Signed-off-by: R <[email protected]>
    ArcaneNibble authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    e56ad4f View commit details
    Browse the repository at this point in the history
  37. arch: arm64: apple: Add dcp panel node for t8103 based laptops and imacs

    The panel node will contain among other properties backlight control
    related properties from the "backlight" node in the ADT.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    4caeef7 View commit details
    Browse the repository at this point in the history
  38. arch: arm64: apple: Add dcp panel node for t600x based laptops

    The panel node will contain among other properties backlight control
    related properties from the "backlight" node in the ADT.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    d09219d View commit details
    Browse the repository at this point in the history
  39. arm64: dts: apple: t8112: Add eFuses node

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    d9b427e View commit details
    Browse the repository at this point in the history
  40. arm64: dts: apple: t8112: Add ATCPHY nodes

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    2c73189 View commit details
    Browse the repository at this point in the history
  41. arm64: dts: apple: t8112: Add dcp/disp0 nodes

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    717839f View commit details
    Browse the repository at this point in the history
  42. scripts/dtc: Add support for floating-point literals

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    f110e42 View commit details
    Browse the repository at this point in the history
  43. arm64: dts: apple: t8103*: Add GPU nodes

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    aea2f4c View commit details
    Browse the repository at this point in the history
  44. arm64: dts: Add GPU performance data to t8103.dts

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    34cb8c3 View commit details
    Browse the repository at this point in the history
  45. arm64: dts: Add power data for t8103

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    fbc9344 View commit details
    Browse the repository at this point in the history
  46. arm64: dts: Add t600x GPU nodes

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5e879d6 View commit details
    Browse the repository at this point in the history
  47. arm64: dts: t8103: Add GPU leak coefficients

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    fdbca28 View commit details
    Browse the repository at this point in the history
  48. arm64: dts: apple: Add no-map to GPU reserved-memory nodes

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    339b2a2 View commit details
    Browse the repository at this point in the history
  49. arm64: dts: apple: Add GPU nodes to T8112

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    d99ceb8 View commit details
    Browse the repository at this point in the history
  50. arm64: dts: apple: Add GPU firmware versions to t8113/t600x

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    dad177e View commit details
    Browse the repository at this point in the history
  51. arm64: dts: apple: t600x: Add the NVRAM bindings

    Add the SPI controller and the nvram partition bindings
    for M1 Pro/Max/Ultra Macs
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    76e8a9f View commit details
    Browse the repository at this point in the history
  52. arm64: dts: apple: t8112: Add the NVRAM bindings

    Add the SPI controller and the nvram partition bindings for M2 Macs
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    29c2ff8 View commit details
    Browse the repository at this point in the history
  53. arm64: dts: apple: t8103: Add the NVRAM bindings

    Add the SPI controller and the nvram partition bindings for M1 Macs
    
    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    1072a88 View commit details
    Browse the repository at this point in the history
  54. arm64: dts: apple: t600x: Add DCP power domain to missing devices

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    054bd2c View commit details
    Browse the repository at this point in the history
  55. arm64: dts: apple: t8103: Add DCP power domain to missing devices

    Removes the "apple,always-on" property from ps_disp0_fe.
    
    Signed-off-by: Janne Grunau <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5c91876 View commit details
    Browse the repository at this point in the history
  56. arm64: dts: apple: t8112: Add DCP power domain to missing devices

    Moves "apple,always-on" property to ps_disp0_cpu0. To be removed by DCP
    after initialization.
    
    Signed-off-by: Janne Grunau <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    0b23d78 View commit details
    Browse the repository at this point in the history
  57. arm64: dts: apple: t8103: Add missing ps_pmp dependency to ps_gfx

    AGX' ASC crashes shortly after ps_pmp is powered down due to dcp
    runtime PM suspend.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    3f8b4db View commit details
    Browse the repository at this point in the history
  58. arm64: dts: apple: t600x: Add "ps_disp0_cpu0" as resets for dcp

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    220d698 View commit details
    Browse the repository at this point in the history
  59. arm64: dts: apple: t8103: Add "ps_disp0_cpu0" as resets for dcp

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    e855f3d View commit details
    Browse the repository at this point in the history
  60. arm64: dts: apple: t8112: Add "ps_disp0_cpu0" as resets for dcp

    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    a89511a View commit details
    Browse the repository at this point in the history
  61. arm64: dts: apple: j314/j316: Disable ATC3_USB_AON power domain

    These power domains are normally always on for real Thunderbolt ports
    (or else dwc3 breaks), but not for the port that's hardwired to the HDMI
    bridge.
    
    Fixes some dmesg spam:
    
    apple-pmgr-pwrstate 292280000.power-management:power-controller@a0:
        always-on domain atc3_usb_aon is not on at boot
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    54adb61 View commit details
    Browse the repository at this point in the history
  62. arm64: dts: apple: HACK: Make ans2 PD always on

    We have an inherent issue with deferred probing and power domains. This
    is breaking ans2 sometimes. Until we fix it, just set these as
    always-on.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    eb03ef7 View commit details
    Browse the repository at this point in the history
  63. fixup! ASoC: apple: Add macaudio machine driver

    Signed-off-by: Sasha Finkelstein <[email protected]>
    WhatAmISupposedToPutHere authored and marcan committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    b4adc8d View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. soc: apple: rtkit: Add register dump decoding to crashlog

    When the coprocessor crashes, it's useful to get a proper register dump
    so we can find out what the firmware was doing. Add a decoder for this.
    
    Originally this had ESR decoding by reusing the ARM64 arch header for
    this, but that introduces some module linking and cross-arch compilation
    issues, so let's leave that out for now.
    
    Reviewed-by: Sven Peter <[email protected]>
    Reviewed-by: Eric Curtin <[email protected]>
    Signed-off-by: Asahi Lina <[email protected]>
    Signed-off-by: Hector Martin <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    72d241b View commit details
    Browse the repository at this point in the history
  2. soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem

    This allows downstream consumers to keep track of private data for shmem
    mappings. In particular, the Rust abstraction will use this to safely
    drop data associated with a mapping when it is unmapped.
    
    Signed-off-by: Asahi Lina <[email protected]>
    Reviewed-by: Sven Peter <[email protected]>
    Reviewed-by: Eric Curtin <[email protected]>
    Signed-off-by: Hector Martin <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    91ca104 View commit details
    Browse the repository at this point in the history
  3. soc: apple: rtkit: Add devm_apple_rtkit_free()

    To be used to free a RTKit interface while the associated device remains
    alive. Probably useless since it's unknown how or if RTKit based
    co-processors can be restarted.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    6e9c7aa View commit details
    Browse the repository at this point in the history
  4. soc: apple: rtkit: Add apple_rtkit_idle() function

    This is yet another low power mode, used by DCP.
    
    Reviewed-by: Eric Curtin <[email protected]>
    Reviewed-by: Sven Peter <[email protected]>
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    594737b View commit details
    Browse the repository at this point in the history
  5. soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode

    This requires changing the reset path locking primitives to the spinlock
    path in genpd, instead of the mutex path.
    
    Reviewed-by: Eric Curtin <[email protected]>
    Reviewed-by: Sven Peter <[email protected]>
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    deee42c View commit details
    Browse the repository at this point in the history
  6. PCI: apple: Increase link up timeout

    The 10GbE ethernet on Mac Studios still seems to fail to come up
    sometimes, let's try increasing this timeout.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    8f5af81 View commit details
    Browse the repository at this point in the history
  7. init/Kconfig: Only block on RANDSTRUCT for RUST

    When enabling Rust in the kernel, we only need to block on the
    RANDSTRUCT feature and GCC plugin. The rest of the GCC plugins
    are reasonably safe to enable.
    
    Signed-off-by: Neal Gompa <[email protected]>
    Conan-Kudo authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    c5188ac View commit details
    Browse the repository at this point in the history
  8. rust: Fixes for 1.67.0

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7fc6c8c View commit details
    Browse the repository at this point in the history
  9. scripts: Exclude Rust CUs with pahole

    Version 1.24 of pahole has the capability to exclude compilation units
    (CUs) of specific languages. Rust, as of writing, is not currently
    supported by pahole and if it's used with a build that has BTF debugging
    enabled it results in malformed kernel and module binaries (see
    Rust-for-Linux#735). So it's better for pahole to exclude Rust
    CUs until support for it arrives.
    
    Eric altered the Kconfig a little differently.
    
    Co-authored-by: Eric Curtin <[email protected]>
    Signed-off-by: Martin Rodriguez Reboredo <[email protected]>
    2 people authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    a292f99 View commit details
    Browse the repository at this point in the history
  10. drm/asahi: Remove the | 4 from pipeline addresses

    This is variable, let userspace do it.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    3cf8e76 View commit details
    Browse the repository at this point in the history
  11. drm/asahi: Bump UAPI

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    df47f03 View commit details
    Browse the repository at this point in the history
  12. rust: Fix bindgen on arm64

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    9eaa35b View commit details
    Browse the repository at this point in the history
  13. rust: helpers: Fix spinlock helper for various spinlock modes

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7e56f99 View commit details
    Browse the repository at this point in the history
  14. rust: helpers: Add missing mutex_[un]lock() wrappers

    Whether these are macros or real functions depends on the config. Wrap
    them if they are macros.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    22e8f6d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    45739e5 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6460b47 View commit details
    Browse the repository at this point in the history
  17. drm/scheduler: Clean up jobs when the scheduler is torn down.

    drm_sched_fini() currently leaves any pending jobs dangling, which
    causes segfaults and other badness when job completion fences are
    signaled after the scheduler is torn down.
    
    Explicitly detach all jobs from their completion callbacks and free
    them. This makes it possible to write a sensible safe abstraction for
    drm_sched, without having to externally duplicate the tracking of
    in-flight jobs.
    
    This shouldn't regress any existing drivers, since calling
    drm_sched_fini() with any pending jobs is broken and this change should
    be a no-op if there are no pending jobs.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    bf31022 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4a60e4f View commit details
    Browse the repository at this point in the history
  19. drm/asahi: Move GPU context drop inside refcount

    Instead of invalidating the GPU context when the Queue gets dropped (at
    which point jobs might still be running), wrap the object and put the
    drop logic in the wrapper, which is inside the Arc<>.
    
    Since the WorkQueues stay alive until all commands are complete (via the
    EventManager reference), that means the GPU context will only be
    invalidated when there is no work in progress or queued for it and the
    Arc<> loses its last reference.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    36408c7 View commit details
    Browse the repository at this point in the history
  20. drm/asahi: Promote two fields in vert/frag structs to all versions

    Seen on 12.3:
    
      asahi 206400000.gpu: Allocator: Corruption after object of type
      asahi::fw::fragment::RunFragmentG13V12_3 at 0xffffffa00009be00:0x928 + 0x0..0x5
    
    5 bytes sounds like exactly the two fields we had as >= 13_0B4 at the
    end of the structs, so let's just enable them for all versions.
    
    Plus we already had them for compute!
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    b981dd6 View commit details
    Browse the repository at this point in the history
  21. drm/asahi: Remove padding from Vertex commands, move to 13_0B4+

    This was probably papering over the issue in the previous commit. Doing
    this makes both command types have the same structure at the end, which
    makes sense... let's see how it goes.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    6e979d1 View commit details
    Browse the repository at this point in the history
  22. drm/asahi: alloc: Make corruption ranges end-inclusive

    And use Rust syntax to make it clear that it is.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    4e956ec View commit details
    Browse the repository at this point in the history
  23. rust: module_param: Tolerate a trailing newline when parsing

    This is the same behavior as kstrtol/kstrtoul, and allows simple
    `echo 0 > /sys/module/foo/parameters/bar` commands to work.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    4fe3779 View commit details
    Browse the repository at this point in the history
  24. drm/asahi: channel: Increase timeouts, add sleeping mode

    Increase timeouts to 1s, but switch to sleeping between polls at the
    10ms boundary so we don't busy-loop when the firmware is too busy to
    service rings (which can happen in rare cases).
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    22ed3d3 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    35cdfed View commit details
    Browse the repository at this point in the history
  26. drm/asahi: Clippy cleanups

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    0dd0667 View commit details
    Browse the repository at this point in the history
  27. drm/asahi: Add missing timeline syncobj signaling support

    Still untested, but it might even work now?
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7a1237a View commit details
    Browse the repository at this point in the history
  28. drm/asahi: Merge conflict avoidance hack

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    7bca4c7 View commit details
    Browse the repository at this point in the history
  29. soc: apple: rtkit: Check for failure to send mgmt messages & log

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    9d67659 View commit details
    Browse the repository at this point in the history
  30. soc: apple: rtkit: Log failure to send messages

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    021fb28 View commit details
    Browse the repository at this point in the history
  31. soc: apple: rtkit: Fix buffer address field width

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    b166f21 View commit details
    Browse the repository at this point in the history
  32. soc: apple: rtkit: Log failed buffer requests

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    c48e971 View commit details
    Browse the repository at this point in the history
  33. soc: apple: rtkit: Add APPLE_RTKIT_PWR_STATE_INIT

    This state is needed to wake the dcp IOP after m1n1 shut it down.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    58a76c2 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    fd795e3 View commit details
    Browse the repository at this point in the history
  35. soc: apple: mailbox: Add ASC/M3 mailbox driver

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    fd4e8ef View commit details
    Browse the repository at this point in the history
  36. soc: apple: rtkit: Port to the internal mailbox driver

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    62f3af8 View commit details
    Browse the repository at this point in the history
  37. mailbox: apple: Delete driver

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    d49d048 View commit details
    Browse the repository at this point in the history
  38. soc: apple: Drop !APPLE_MAILBOX dependency

    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    e0a12b2 View commit details
    Browse the repository at this point in the history
  39. soc: apple: rtkit: Export non-devm init/free functions

    While we normally encourage devm usage by drivers, some consumers (and
    in particular the upcoming Rust abstractions) might want to manually
    manage memory. Export the raw functions to make this possible.
    
    Signed-off-by: Asahi Lina <[email protected]>
    Reviewed-by: Sven Peter <[email protected]>
    Reviewed-by: Eric Curtin <[email protected]>
    Signed-off-by: Hector Martin <[email protected]>
    asahilina authored and marcan committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    29506b4 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Configuration menu
    Copy the full SHA
    c7dd93e View commit details
    Browse the repository at this point in the history
  2. drm/asahi: Increase GPU FW garbage threshold to 16MiB

    This should significantly reduce overhead for submission-heavy
    workloads.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    bbe7daa View commit details
    Browse the repository at this point in the history
  3. drm/scheduler: Fix race in drm_sched_entity_push_job()

    After a job is pushed into the queue, it is owned by the scheduler core
    and may be freed at any time, so we can't write nor read the submit
    timestamp after that point.
    
    Fixes oopses observed with the drm/asahi driver, found with kASAN.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    1dcbf89 View commit details
    Browse the repository at this point in the history
  4. drm/asahi: Identify vertex attachment list

    This needs to go into the UAPI...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    1731caf View commit details
    Browse the repository at this point in the history
  5. drm/asahi: Track event sequences properly

    Looks like these fields of the commands count events (actual GPU
    commands), not work commands. The previous implementation was mixing
    these things up...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    d45127e View commit details
    Browse the repository at this point in the history
  6. drm/asahi: Fix compute stats size (maybe)

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    88cf062 View commit details
    Browse the repository at this point in the history
  7. drm/asahi: Identify no_preemption flag

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    d605918 View commit details
    Browse the repository at this point in the history
  8. dockchannel-hid: Use DT data for M2 keyboard types

    It looks like the keyboard type field is not reliable, so we need to
    pull this data from the device tree based on kblayout...
    
    Requires a m1n1 change.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    76d0ff1 View commit details
    Browse the repository at this point in the history
  9. dockchannel-hid: Add device-link dependency on RTKit helper device

    This fixes timeouts if the dockchannel-hid driver probes
    significantly before rtkit-helper, and MTP has already been initialized
    by the bootloader.
    
    Signed-off-by: Hector Martin <[email protected]>
    marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    66baae1 View commit details
    Browse the repository at this point in the history
  10. HID: transport: spi: Check status message after transmits

    Probably pointless but might be helpful to debug issues.
    Gets rid of 'spi_hid_apple_status_ok' is unused compiler warning.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    cf7d654 View commit details
    Browse the repository at this point in the history
  11. HID: magicmouse: Add .reset_resume for SPI trackpads

    The trackpad has to request multi touch reports during resume.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    199fadc View commit details
    Browse the repository at this point in the history
  12. HID: transport: spi: Add suspend support

    Working suspend and resume. The keyboard can not yet used as wakeup
    source. Most likely caused by missing irq_set_wake support in the
    gpio/pinctrl driver.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau authored and marcan committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    1417c4d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    275e03f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f43ae20 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cbcdaa3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d1e49f1 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ae253cc View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4387d5c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8dfb126 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    aaa3d06 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    94bfb1a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    62e9d25 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    18ca535 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    d7e84e3 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ab4379c View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    9a53d45 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    7b153cf View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    ba41e8e View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    b4187b0 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    b2f59a4 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. drm/asahi: Identify and set barrier_type field

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    a610c43 View commit details
    Browse the repository at this point in the history
  2. 4k iommu hack

    asahilina committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    400cb96 View commit details
    Browse the repository at this point in the history
  3. arm64: dts: apple: HACK: Make pmp PD always on

    Looks like we have another race condition...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    bebe37f View commit details
    Browse the repository at this point in the history
  4. iommu hack for DCP

    This is not safe but it should work...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    61599c1 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. drm/asahi: Align GEM object sizes to the UAT page size

    Makes sure object sizes are 16K aligned on 4K kernels.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    cbc8807 View commit details
    Browse the repository at this point in the history
  2. shmem: 16K on 4K hack

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    c15ef6a View commit details
    Browse the repository at this point in the history
  3. drm/apple: Align buffers to 16K page size

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    0bc60d2 View commit details
    Browse the repository at this point in the history
  4. drm/asahi: Make multi-page TLB invals use the CPU page size.

    This is just a guess, but worst case we over-invalidate which is better
    than under-invalidating.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    4de60ff View commit details
    Browse the repository at this point in the history
  5. drm/asahi: Add a flag to panic (oops) on GPU crashes

    This is useful so the driver won't try to abort everything, which leaves
    memory mostly untouched so it can be inspected from the hypervisor.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    38a6040 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    56cd037 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Configuration menu
    Copy the full SHA
    b949ab7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    19c4d68 View commit details
    Browse the repository at this point in the history
  3. drm/asahi: xarray & drm::file API updates

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    788bde6 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. rust: uapi: Add UAPI crate

    This crate mirrors the `bindings` crate, but will contain only UAPI
    bindings. Unlike the bindings crate, drivers may directly use this crate
    if they have to interface with userspace.
    
    In the future, we would also like to add additional checks to ensure
    that all types exposed by this crate satisfy UAPI-safety guarantees
    (that is, they are safely castable to/from a "bag of bits").
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    543d090 View commit details
    Browse the repository at this point in the history
  2. rust: ioctl: Move to the uapi crate

    Now that we have the uapi crate, this abstraction can use that instead
    of bindings.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    eacbab0 View commit details
    Browse the repository at this point in the history
  3. rust: drm: ioctl: Move to uapi crate

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    a925167 View commit details
    Browse the repository at this point in the history
  4. rust: Move asahi_drm bindings to uapi crate

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    2336c0e View commit details
    Browse the repository at this point in the history
  5. drm/asahi: Move to uapi crate

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    334bd1f View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Configuration menu
    Copy the full SHA
    d91817e View commit details
    Browse the repository at this point in the history
  2. rust: Fix container_of!()

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    0cc3ada View commit details
    Browse the repository at this point in the history
  3. drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

    A signaled scheduler fence can outlive its scheduler, since fences are
    independencly reference counted. Therefore, we can't reference the
    scheduler in the get_timeline_name() implementation.
    
    Fixes oopses on `cat /sys/kernel/debug/dma_buf/bufinfo` when shared
    dma-bufs reference fences from GPU schedulers that no longer exist.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    1d97ab3 View commit details
    Browse the repository at this point in the history
  4. drm/asahi: workqueue: Panic on context inval timeouts if requested

    Treat this like a GPU firmware crash, since it's at the very least a
    deadlock and a bad place to be in...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    a195a93 View commit details
    Browse the repository at this point in the history
  5. drm/asahi: workqueue: Keep a Device reference here too

    We need this to offload freeing completed work to the global GPU
    manager, since doing it in the event handler context is a recipe for
    deadlocks if the GPU faults.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    b332914 View commit details
    Browse the repository at this point in the history
  6. drm/asahi: Drop completed work asynchronously

    If we drop work in the main event completion thread, we can deadlock
    when we try to invalidate GPU contexts if the firmware is stuck.
    Instead, stash completed work in the global GPU manager and free it
    whenever we allocate anything.
    
    In the future this should move to a dedicated cleanup thread or
    something like that...
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    4b89724 View commit details
    Browse the repository at this point in the history
  7. drm/asahi: Also free unused GPU contexts asynchronously

    Since workqueues get freed in the event thread, that can drop the
    GpuContext there and deadlock when the firmware halts. Delegate it to
    the GpuManager too.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    1ee90e2 View commit details
    Browse the repository at this point in the history
  8. drm/asahi: queue: Drop redundant mutex around Buffer

    Buffer is already internally locked.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    8865e09 View commit details
    Browse the repository at this point in the history
  9. drm/asahi: workqueue: Hold a Buffer reference in GpuContextData

    It looks like the firmware can clean up currently mapped buffers at any
    arbitrary time. Let's assume this is cleaned up by context inval (which
    is the only explicit inval macOS does).
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    742f176 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. drm/asahi: Fail params requests if the GPU is crashed

    This should make Mesa fail the driver load and fall back to software
    rendering early.
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    f749073 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2023

  1. I don't know how to fix drm_sched.

    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    ff248d3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    745b345 View commit details
    Browse the repository at this point in the history
  3. drm/asahi: Identify more Render fields & update to UAPI 10007

    Also set the large_tib flag properly (implied from tib size for now, not
    sure if this should be a separate flag?)
    
    Signed-off-by: Asahi Lina <[email protected]>
    asahilina committed Apr 7, 2023
    Configuration menu
    Copy the full SHA
    ec153d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. fixup! drm/asahi: Add the Asahi driver for Apple AGX GPUs

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    5339dcb View commit details
    Browse the repository at this point in the history