Skip to content

Commit 48f5d03

Browse files
Update Tyr Upstream Development Process
Currently the upstream development process for Tyr suggests that a developer could open a merge request for review and discussion in the panfrost-linux repository on Freedesktop GitLab. While merge requests can still be a useful collaboration tool, other DRM developers might not be reading those merge requests, so to be absolutely clear, just direct new upstream contributions to the mailing lists. Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
1 parent 3a8115a commit 48f5d03

1 file changed

Lines changed: 26 additions & 64 deletions

File tree

src/Tyr-GPU-Driver.md

Lines changed: 26 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22

33
## What is Tyr?
44

5-
Tyr is a new Rust-based DRM driver for CSF-based Arm Mali GPUs. It is a port of
6-
Panthor — a driver written in C for the same hardware — and written as a joint
7-
effort between Collabora, Arm and Google engineers.
5+
Tyr is a new Rust-based DRM driver for CSF-based Arm Mali GPUs. It is a Rust
6+
reimplementation of Panthor — a driver written in C for the same hardware —
7+
developed jointly by Collabora, Arm, and Google engineers.
88

99
Tyr aims to eventually implement the same userspace API offered by Panthor for
10-
compatibility reasons, so that it can be used as a drop-in replacement in our
11-
Vulkan driver, called
12-
[PanVK](https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/panfrost/vulkan?ref_type=heads).
13-
In any case, we foresee Panthor being used — and of course supported — for a
14-
relatively long time, as it is a mature driver with a large adoption in the
15-
ecosystem. It will probably take a couple of years for Tyr to fully pick up.
10+
compatibility reasons, so that it can be used as a drop-in replacement by the
11+
[PanVK](https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/panfrost/vulkan?ref_type=heads) Vulkan driver.
1612

1713
## Where is Tyr developed?
1814

@@ -22,76 +18,42 @@ Tyr is developed both upstream and downstream.
2218

2319
The initial skeleton of the Tyr driver is now [upstream](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/tyr). Submissions against
2420
the upstream Tyr driver should go to the [`dri-devel`](https://lore.kernel.org/dri-devel/)
25-
and [`rust-for-linux`](https://lore.kernel.org/rust-for-linux/) mailing lists. If the
26-
submission is larger and/or needs to be pre-reviewed, open a merge request
27-
against the
28-
[`tyr-for-upstream`](https://gitlab.freedesktop.org/panfrost/linux/-/tree/tyr-for-upstream)
29-
branch in the [`panfrost/linux`](https://gitlab.freedesktop.org/panfrost/linux)
30-
repository.
21+
and [`rust-for-linux`](https://lore.kernel.org/rust-for-linux/) mailing lists.
22+
23+
Tyr commits should usually apply cleanly to [`drm-rust-next`](https://gitlab.freedesktop.org/drm/rust/kernel.git).
3124

3225
### Downstream
3326

34-
A more complete implementation of the Tyr driver is also available in the
27+
Patches that are close to going upstream are collected for convenience in the
28+
[`tyr-for-upstream`](https://gitlab.freedesktop.org/panfrost/linux/-/tree/tyr-for-upstream) branch.
29+
30+
A work-in-progress implementation of the full Tyr driver is also available in the
3531
[`tyr-dev`](https://gitlab.freedesktop.org/panfrost/linux/-/tree/tyr-dev) branch.
36-
Make submissions against the downstream Tyr driver by opening a merge request
37-
against `tyr-dev`. It's expected that `tyr-dev` will be significantly
38-
refactored before upstreaming.
39-
40-
This split is unfortunately necessary as we do not have the required
41-
infrastructure in upstream yet, although our plan is to eventually migrate to
42-
an upstream-only development model once this changes.
43-
44-
We go into more details about why we chose to develop Tyr this way on our
45-
series of [blog
46-
posts](https://www.collabora.com/news-and-blog/news-and-events/introducing-tyr-a-new-rust-drm-driver.html)
47-
at [Collabora's blog](https://www.collabora.com/news-and-blog/). Anyone willing
48-
to get acquainted with Mali's open source stack should refer to that, as we
49-
will be covering the whole infrastructure from a simple Vulkan application to
50-
the actual GPU hardware in Mali's CSF architecture. We will also cover the
51-
various components needed to write a driver, as well as the status of the
52-
abstractions needed to interact with them from Rust code.
53-
54-
As it currently stands, our downstream branch can be used to test the
55-
abstractions that are still being developed. It makes sure that we can write a
56-
functional driver with the abstractions that are currently being proposed.
5732

58-
## What is the current status of the driver?
5933

60-
The current upstream driver can power up the GPU and probe the device on an
61-
RK3588 system-on-chip. This lets us read a few sections of ROM in the GPU,
62-
which in turn lets us provide this information to userspace by means of a
63-
`DRM_IOCTL_PANTHOR_DEV_QUERY` call.
34+
## What is the current status of the driver?
6435

65-
This is all that can be done for now in upstream code, at least until the Micro
66-
Controller Unit can be made to work.
36+
The current upstream driver can probe and register an Arm Mali Valhall CSF GPU,
37+
currently tested on RK3588 systems. During probe it enables the required clocks
38+
and regulators, maps the GPU registers, issues a soft reset, powers on the L2
39+
block, reads the GPU identification and feature registers, and exposes that
40+
information to userspace through `DRM_IOCTL_PANTHOR_DEV_QUERY`.
6741

68-
Our downstream branch (`tyr-dev`) provides a full, working prototype that can run GNOME, Weston, and full-screen 3D games like SuperTuxKart: see [Racing karts on a Rust GPU kernel driver](https://www.collabora.com/news-and-blog/news-and-events/racing-karts-on-a-rust-gpu-kernel-driver.html).
42+
The next major milestone is the Microcontroller Unit (MCU) firmware bring-up.
43+
Until that is in place, the upstream driver is limited to device probing and
44+
basic GPU information queries.
6945

7046
## Can I try it out?
7147

72-
Anyone with a RK3588 SoC can test Tyr, but the driver is not capable of
48+
Anyone with an RK3588 SoC can test Tyr, but the driver is not capable of
7349
replacing Panthor yet. A good candidate device is Radxa's
7450
[ROCK 5B](https://radxa.com/products/rock5/5b/) Single Board Computer.
7551

76-
A good starting point is to use the Tyr driver to run the Panthor [IGT
52+
A good starting point is to experiment with the Panthor [IGT
7753
tests](https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/tree/master/tests/panthor).
78-
While only a subset of the tests pass on the upstream code for the reasons
79-
highlighted above, they should all pass if run on `tyr-dev`.
80-
81-
Note that Mali GPUs are found in a vast array of devices, and that we will
82-
support more hardware as we progress in the implementation.
83-
84-
## Contributing
85-
86-
Tyr is open-source software, and as such, anyone interested in its development
87-
can check our [issue
88-
board](https://gitlab.freedesktop.org/panfrost/linux/-/issues/?label_name%5B%5D=tyr).
89-
We will be posting good starting tasks at a future point.
90-
91-
To work on any given task, assign it to yourself and follow up with a merge
92-
request against `tyr-for-upstream` (for patches targeting the upstream driver)
93-
or `tyr-dev` (for work in the downstream staging branch).
9454

95-
Please also write the IGT tests needed to ensure that your code works.
55+
If you would like to contribute, check our [issue
56+
board](https://gitlab.freedesktop.org/panfrost/linux/-/issues/?label_name%5B%5D=tyr)
57+
to look for open tasks.
9658

9759
Happy hacking!

0 commit comments

Comments
 (0)