Ding Wei a6943befb9 video: rockchip: mpp: fix share iommu issue for rk3528 on Arch32
Issue:
1. On arm32 platform iommu use the mapping->domain, while use the
   group->domain on arm64 platform.
2. __iommu_attach_group use group->default to judge whether new device
   in kernel 5.10 branch, while use group->domain in kernel 6.1 branch.
   For this change, when two devices share the iommu, the first device
   attach success, while the second device failed in kernel 6.1 branch.

Method:
1. Set driver_managed_dma=true to ensure that during the IOMMU probe
phase,
   even if attach group failed, the mapping will not be released.
2. After the IOMMU probe succeeds, record info->domain=mapping->domain
and
   detach it, ensuring that group->domain is set to NULL. This prevents
the
   next device which sharing the IOMMU, not return -EBUSY when attach
the
   group.
3. Before hardware running, the shared IOMMU should check whether the
   device has been switched. If so, it needs to attach the current
   device's info->domain.
4. When removing a shared IOMMU, it must also ensure that group->domain
   corresponds to the current device.

Change-Id: If0fec01a0bcf9c49850129bfa5ac28484fece9a2
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2025-02-10 16:15:29 +08:00
2025-01-25 10:26:37 +08:00
2025-01-10 17:48:57 +08:00
2025-01-25 10:26:37 +08:00
2025-01-10 17:48:57 +08:00
2025-01-25 10:26:37 +08:00
2025-01-25 10:26:37 +08:00
2025-01-25 10:26:37 +08:00
2025-01-10 17:48:57 +08:00
2022-09-28 09:02:20 +02:00
2024-11-17 15:07:22 +01:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%