mbox series

[0/5] iommu: apple-dart: Support locked DARTs

Message ID 20250210-locked-dart-v1-0-5d97fe247f35@rosenzweig.io (mailing list archive)
Headers show
Series iommu: apple-dart: Support locked DARTs | expand

Message

Alyssa Rosenzweig Feb. 10, 2025, 7:39 p.m. UTC
Some DARTs on Apple SoCs are "locked" at boot time, meaning we cannot
write most of their configuration registers. Currently, we refuse to
probe locked DARTs and do not include any in the upstream device trees.
However, the DARTs used for the display controller are locked, so we
need to handle locked DARTs as a prerequisite for a KMS driver.

This series teaches the iommu/apple-dart driver about locked DARTs,
preparing for a future upstream display driver. It has been extensively
tested downstream with our work-in-progress display driver.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
---
Alyssa Rosenzweig (5):
      iommu/dart: Track if the DART is locked
      iommu/dart: Skip reset for locked DARTs
      iommu/dart: Set DMA domain for locked DARTs
      iommu/dart: Reject identity domain for locked DARTs
      iommu/dart: Assert !locked when configuring

 drivers/iommu/apple-dart.c | 47 +++++++++++++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 15 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250210-locked-dart-d7ece05f19a8

Best regards,

Comments

Neal Gompa Feb. 10, 2025, 7:48 p.m. UTC | #1
On Mon, Feb 10, 2025 at 2:44 PM Alyssa Rosenzweig <alyssa@rosenzweig.io> wrote:
>
> Some DARTs on Apple SoCs are "locked" at boot time, meaning we cannot
> write most of their configuration registers. Currently, we refuse to
> probe locked DARTs and do not include any in the upstream device trees.
> However, the DARTs used for the display controller are locked, so we
> need to handle locked DARTs as a prerequisite for a KMS driver.
>
> This series teaches the iommu/apple-dart driver about locked DARTs,
> preparing for a future upstream display driver. It has been extensively
> tested downstream with our work-in-progress display driver.
>
> Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
> ---
> Alyssa Rosenzweig (5):
>       iommu/dart: Track if the DART is locked
>       iommu/dart: Skip reset for locked DARTs
>       iommu/dart: Set DMA domain for locked DARTs
>       iommu/dart: Reject identity domain for locked DARTs
>       iommu/dart: Assert !locked when configuring
>
>  drivers/iommu/apple-dart.c | 47 +++++++++++++++++++++++++++++++---------------
>  1 file changed, 32 insertions(+), 15 deletions(-)
> ---
> base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
> change-id: 20250210-locked-dart-d7ece05f19a8
>
> Best regards,
> --
> Alyssa Rosenzweig <alyssa@rosenzweig.io>
>
>

Series LGTM, having looked over this many times as part of kernel
maintenance for Fedora Asahi Remix.

Reviewed-by: Neal Gompa <neal@gompa.dev>